From 92d29a224bee2299ec639e4778626afe44cde6e1 Mon Sep 17 00:00:00 2001 From: kauffj Date: Sun, 29 Nov 2015 18:51:08 -0500 Subject: [PATCH] track follows and likes from homepage, add fb plugin and twitter plugin --- view/layout/basic.php | 25 +++++++++++++++++++++++++ view/page/home.php | 15 +++++++++++++-- web/js/global.js | 24 ++++++++++++++++++++++++ web/scss/_content.scss | 6 ++++++ 4 files changed, 68 insertions(+), 2 deletions(-) diff --git a/view/layout/basic.php b/view/layout/basic.php index 47c1bc37..09438f9c 100644 --- a/view/layout/basic.php +++ b/view/layout/basic.php @@ -43,6 +43,7 @@
+
@@ -55,6 +56,30 @@ ga('create', 'UA-60403362-1', 'auto'); ga('send', 'pageview'); + (function(d, s, id) { + var js, fjs = d.getElementsByTagName(s)[0]; + if (d.getElementById(id)) return; + js = d.createElement(s); js.id = id; + js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=1477813539180850"; + fjs.parentNode.insertBefore(js, fjs); + }(document, 'script', 'facebook-jssdk')); + + window.twttr = (function(d,s,id) { + var js, fjs = d.getElementsByTagName(s)[0], + t = window.twttr || {}; + if (d.getElementById(id)) return; + js = d.createElement(s); + js.id = id; + js.src = "//platform.twitter.com/widgets.js"; + fjs.parentNode.insertBefore(js, fjs); + + t._e = []; + t.ready = function(f) { + t._e.push(f); + }; + + return t; + }(document, "script", "twitter-wjs"));