Google Tag Manager Code Generator for StatJolt
This Google Tag Manager (GTM) code generator turns your StatJolt code into JS that works in GTM too.
Here's how to make your code:
- Paste your StatJolt code into the field below.
- Choose where your badge goes. Pick the one you've already chosen in your StatJolt account. (On the Badge tab of your site settings.)
- Floating, bottom right or Floating, bottom left: choose Floating.
- Next to icon row or New row, centered: choose End of the sidebar or Bottom of the footer.
- If you've subscribed and ticked the invisible mode, it doesn't matter which one you click.
- Copy the code.
This code has no data-user number. Copy your code again from your StatJolt account.
Add it to Google Tag Manager
- In Google Tag Manager, click Tags, then New.
- Click Tag Configuration and select Custom HTML. Paste your code into the HTML field.
- Click Triggering. Click + to make a new trigger. Click Trigger Configuration and select DOM Ready. Choose All DOM Ready Events and save the trigger.
- Save the tag. Click Submit, then Publish.
- Open your site in a private window. Refresh your StatJolt dashboard and see your first visitor.
FAQ for Google Tag Manager
Why can't I paste my StatJolt code into GTM as it is?
Google Tag Manager removes data-… attributes from Custom HTML. So it removes data-user too. We need it, because it tells us which site the visit belongs to. The generated code adds it with JavaScript, so it stays.
Where does my badge go?
A floating badge stays in its corner of the screen. With End of the sidebar the badge goes at the end of your page's <aside> element. With Bottom of the footer it goes at the end of your page's last <footer> element.
Replace GA4 in 2 minutes
Just paste the code and see how much clearer it gets. No cookies, no consent tool. 0 EUR until 2027, at any traffic level. Later, for small sites it still costs 0 EUR.
Get my free account