From e79277eafa2c293b52a1b5ed5bbee977343bc45c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 3 Mar 2016 16:53:04 +0100 Subject: [PATCH 1/3] add another set of testimonials on community page --- _src/_assets/javascripts/page-community.js | 3 +++ _src/community.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/_src/_assets/javascripts/page-community.js b/_src/_assets/javascripts/page-community.js index ab88b7b..a77f41a 100644 --- a/_src/_assets/javascripts/page-community.js +++ b/_src/_assets/javascripts/page-community.js @@ -1,8 +1,11 @@ //=include ../../../node_modules/is-in-viewport/lib/isInViewport.js +//=include bigchain/testimonials.js jQuery(function($) { + Testimonials.init(); + var wrigley = $('#wrigley'), wrigleyArm = wrigley.find('#arm'), wrigleyHead = wrigley.find('#head'), diff --git a/_src/community.html b/_src/community.html index 7981100..284cf17 100644 --- a/_src/community.html +++ b/_src/community.html @@ -5,6 +5,7 @@ title: Community description: 'There are many ways you can contribute to the BigchainDB project, some very easy and others more involved.' js: page-community.min.js +quotes: set3 ---
@@ -68,3 +69,5 @@ js: page-community.min.js
{% include section-newsletter.html %} + +{% include section-testimonials.html %} From d9be25a66c5c39c4eab818aa7debdbc7464a757e Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 3 Mar 2016 16:54:38 +0100 Subject: [PATCH 2/3] switch contributing button to link to GitHub file --- _src/features.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_src/features.html b/_src/features.html index f85a00a..b2f4a1d 100644 --- a/_src/features.html +++ b/_src/features.html @@ -227,7 +227,7 @@ js: page-features.min.js

- Learn More + Read Guidelines

From 2dc8de57195c5eab4dcf51d9f4195e786602c5c4 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 3 Mar 2016 17:08:35 +0100 Subject: [PATCH 3/3] track social links with GA Custom Events --- .../_assets/javascripts/bigchain/analytics.js | 25 +++++++++++++++++++ _src/community.html | 12 ++++----- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/_src/_assets/javascripts/bigchain/analytics.js b/_src/_assets/javascripts/bigchain/analytics.js index 081fe30..1a2fc4b 100644 --- a/_src/_assets/javascripts/bigchain/analytics.js +++ b/_src/_assets/javascripts/bigchain/analytics.js @@ -29,6 +29,31 @@ var GoogleAnalytics = (function(w,d,$) { $('.js-tracking-whitepaper-download').on('click', function() { ga('send', 'event', 'whitepaper', 'download', 'button', true); }); + + // Social links + $('.js-social-link').on('click', function() { + + var href = this.getAttribute('href'), + network = extractDomain(href); + + ga('send', 'event', 'social', 'click', network); + }); + + function extractDomain(url) { + var domain; + //find & remove protocol (http, ftp, etc.) and get domain + if (url.indexOf("://") > -1) { + domain = url.split('/')[2]; + } + else { + domain = url.split('/')[0]; + } + + //find & remove port number + domain = domain.split(':')[0]; + + return domain; + } }, diff --git a/_src/community.html b/_src/community.html index 284cf17..f82e867 100644 --- a/_src/community.html +++ b/_src/community.html @@ -21,13 +21,13 @@ quotes: set3