Integrating with the ZetaHub Javascript Library pushes information from your website directly into ZetaHub. This way, once you set up the Javascript library, the content you create on your website is consistently pushed our way and it also makes user identification, user tracking, and event tracking possible.
The first step of integration is putting the ZetaHub JavaScript library in your code—we recommend the <head>
section. (Our CDN supports the HTTPS protocol.)
HTML
<script src="https://cdn.boomtrain.com/analyticstrain/<site_id>/analyticstrain.min.js"></script>
Here’s the full listing for a page that has user data:
HTML
<script src="https://cdn.boomtrain.com/analyticstrain/<site_id>/analyticstrain.min.js"></script>
<script> _bt.person.set( {'email': '[email protected]'} ); </script>
Here’s the full listing for a page that doesn’t have user data:
HTML
<script src="https://cdn.boomtrain.com/analyticstrain/<SITE_ID>/analyticstrain.min.js"></script>
Finally, here’s the full listing for a page after user data has been updated:
HTML
<script> _bt.person.set({ "email": "[email protected]", "first_name": "John", "last_name": "Smith", "source":"facebook", "membershipType":"monthly" }); </script>