Implement DataFast with Google Tag Manager
Use Google Tag Manager (GTM) to easily deploy and manage DataFast analytics across your website without modifying code directly.
Get started with Google Tag Manager
- Log in to your Google Tag Manager account
- Select your container
- Click on Tags > New
- Name your tag (e.g., "DataFast Analytics")
- Click Tag Configuration and select Custom HTML
- Paste the following JavaScript code (not the regular script tag):
<script>
(function() {
var script = document.createElement('script');
script.defer = true;
script.setAttribute('data-website-id', 'yourwebsiteid');
script.setAttribute('data-domain', 'yourdomain.com');
script.src = 'https://datafa.st/js/script.js';
document.head.appendChild(script);
})();
</script>
Replace yourwebsiteid
and yourdomain.com
with your actual values from the DataFast dashboard.
- Click Triggering, select All Pages and click Add
- Click Save
- Click Submit at the top right, then Publish
Troubleshooting
- If data doesn't appear, check that your tag is firing in GTM's preview mode
- Verify that your website ID and domain values are correct
- Ensure the tag isn't being blocked by content security policies (CSP)
- Make sure your tag is executing early in the page load sequence by setting it to fire at the earliest appropriate event
For advanced GTM configurations or custom event tracking, contact us at marc@datafa.st.