I’m trying to implement Chartbeat on my EE site, metsgrrl.com. I am cutting and pasting the embed code into two templates on the site, but somehow when viewing source, EE is stripping out the variable that contains the site ID.
When I cut and paste the code from the EE control panel, this is the code:
[removed]
var _sf_async_config={uid:20167,domain:"metsgrrl.com"};
(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',
(("https:" == document.location.protocol) ? "https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/" : "http://static.chartbeat.com/") +
"js/chartbeat.js");
document.body.appendChild(e);
}
var oldonload = window.onload;
window.onload = (typeof window.onload != 'function') ?
loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
[removed]But if you do a view Source on the web site, this is what you see:
[removed]
var _sf_async_config=;
(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',
(("https:" == document.location.protocol) ? "https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/" : "http://static.chartbeat.com/") +
"js/chartbeat.js");
document.body.appendChild(e);
}
var oldonload = window.onload;
window.onload = (typeof window.onload != 'function') ?
loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
[removed]The key line is var _sf_async_config=;
Why is this happening? I did a search on Chartbeat and did not see any previous discussions regarding implementing this code. My apologies if this is something obvious but I’ve never had this happen before, I have multiple different trackers on the site and have never had EE just plain take it out.
Thank you in advance for help.