Skip to content

Commit

Permalink
Removing Chartbeat.
Browse files Browse the repository at this point in the history
  • Loading branch information
bladey committed Dec 19, 2016
1 parent 418a58a commit 68b6662
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 56 deletions.
7 changes: 1 addition & 6 deletions keystone.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ keystone.init({
'ga property': process.env.GA_PROPERTY,
'ga domain': process.env.GA_DOMAIN,

'chartbeat property': process.env.CHARTBEAT_PROPERTY,
'chartbeat domain': process.env.CHARTBEAT_DOMAIN,

'basedir': __dirname

});
Expand All @@ -71,9 +68,7 @@ keystone.set('locals', {
editable: keystone.content.editable,
google_api_key: keystone.get('google api key'),
ga_property: keystone.get('ga property'),
ga_domain: keystone.get('ga domain'),
chartbeat_property: keystone.get('chartbeat property'),
chartbeat_domain: keystone.get('chartbeat domain')
ga_domain: keystone.get('ga domain')
});

keystone.set('email locals', {
Expand Down
18 changes: 0 additions & 18 deletions templates/includes/layout/analytics.jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,3 @@ if env == 'production' && ga_property && ga_domain

ga('create', '#{ga_property}', '#{ga_domain}');
ga('send', 'pageview');

//- CHARTBEAT
if env == 'production' && chartbeat_property && chartbeat_domain
script.
var _sf_async_config = { uid: #{chartbeat_property}, domain: '#{chartbeat_domain}', useCanonical: true };
(function() {
function loadChartbeat() {
window._sf_endpt = (new Date()).getTime();
var e = document.createElement('script');
e.setAttribute('language', 'javascript');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src','//static.chartbeat.com/js/chartbeat.js');
document.body.appendChild(e);
};
var oldonload = window.onload;
window.onload = (typeof window.onload != 'function') ?
loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
4 changes: 0 additions & 4 deletions templates/layouts/default.jade
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ html

//- HTML HEAD
head
if env == 'production' && chartbeat_property && chartbeat_domain
script.
var _sf_startpt=(new Date()).getTime()

meta(charset="utf-8")
meta(name="viewport", content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width")

Expand Down
21 changes: 0 additions & 21 deletions templates/layouts/session.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ include ../mixins/flash-messages
doctype html
html
head
if env == 'production' && chartbeat_property && chartbeat_domain
script.
var _sf_startpt=(new Date()).getTime()

meta(charset="utf-8")
meta(name="viewport", content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width")

Expand Down Expand Up @@ -43,20 +39,3 @@ html

ga('create', '#{ga_property}', '#{ga_domain}');
ga('send', 'pageview');

if env == 'production' && chartbeat_property && chartbeat_domain
script.
var _sf_async_config = { uid: #{chartbeat_property}, domain: '#{chartbeat_domain}', useCanonical: true };
(function() {
function loadChartbeat() {
window._sf_endpt = (new Date()).getTime();
var e = document.createElement('script');
e.setAttribute('language', 'javascript');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src','//static.chartbeat.com/js/chartbeat.js');
document.body.appendChild(e);
};
var oldonload = window.onload;
window.onload = (typeof window.onload != 'function') ?
loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
7 changes: 0 additions & 7 deletions templates/views/tools/notification-center.jade
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ mixin notification-form(args)
doctype html
html
head
if env == 'production' && chartbeat_property && chartbeat_domain
script.
var _sf_startpt=(new Date()).getTime()

meta(charset="utf-8")
meta(name="viewport", content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width")

Expand Down Expand Up @@ -72,6 +68,3 @@ html
$('.notification-form_body').hide();
$(this).closest('.notification-form').find('.notification-form_body')[$(this).prop('checked') ? 'show' : 'hide']();
});



0 comments on commit 68b6662

Please sign in to comment.