Google Tag Manager integration
Add STATEWIZE to your website using Google Tag Manager
While we're building a GTM native addon, here's a quick guide into installing the STATEWIZE SDK and collecting events automatically, using Google Tag Manager:
- 1.Navigate to your GTM console, and create a new tag of type "Custom HTML":
- 2.Paste the following HTML code:
<script type='text/javascript' src='https://unpkg.com/statewize-client-sdk-web/umd/index.js'>
</script>
<script type="text/javascript">
window._statewize.init("YOUR-STATEWIZE-TOKEN-HERE",
{
historyListener: true,
interactionsListener: true
});
</script>
Replace the
YOUR-STATEWIZE-TOKEN-HERE
with your actual STATEWIZE token, which you can fetch from your account settings3. Set the tag to fire when is right for your website - you know best when that is. Basically whenever the tag will fire, it will launch the STATEWIZE integration, and start reporting events to your account
That's it! 😊
Last modified 1yr ago