Adding subscriptions.js to Your Site
An introduction to our code snippet for tracking conversions on your site. Note that this is an add-on feature, not included in all Chartbeat service plans.
Implementation requirements
First requirement
<!-- Chartbeat Conversion -->
<script type="text/javascript">
(function(w,d,s,c,u){
var qf=function(e,a){(w[c].q=w[c].q||[]).push([e,a]);};w[c]=w[c]||qf;
var st=d.createElement(s);
var fs=d.getElementsByTagName(s)[0];
st.async=1;st.src=u;fs.parentNode.insertBefore(st,fs);
})(window,document,'script','chartbeat','https://static.chartbeat.com/js/subscriptions.js');
</script>
<!-- End Chartbeat Conversion -->Second requirement
Complete example
Limitations
Next Steps
Last updated
Was this helpful?