User Subscriber Status
This article details the steps to implement your site's user subscriber status data into Chartbeat by adding a few lines to our standard tracking tag.
Tracking users' subscriber status
var _cbq = window._cbq = (window._cbq || []);_cbq.push(['_acct', 'user_type']);<script type='text/javascript'>
(function() {
var _sf_async_config = window._sf_async_config = (window._sf_async_config || {});
/** CONFIGURATION START **/
_sf_async_config.uid = #####; //CHANGE THIS
_sf_async_config.domain = 'domain.com'; //CHANGE THIS
_sf_async_config.useCanonical = true;
_sf_async_config.useCanonicalDomain = true;
_sf_async_config.sections = ''; //CHANGE THIS TO YOUR SECTION NAME(s)
_sf_async_config.authors = ''; //CHANGE THIS TO YOUR AUTHOR NAME(s)
var _cbq = window._cbq = (window._cbq || []);
_cbq.push(['_acct', 'paid']);
/** CONFIGURATION END **/
function loadChartbeat() {
var e = document.createElement('script');
var n = document.getElementsByTagName('script')[0];
e.type = 'text/javascript';
e.async = true;
e.src = '//static.chartbeat.com/js/chartbeat.js';
n.parentNode.insertBefore(e, n);
}
loadChartbeat();
})();
</script>Next steps
Last updated
Was this helpful?