Why a Custom HTML tag is required
Normally, the Betterumami tracker is added to a page with a standard script tag:data-* attributes from script tags it manages. Because the tracker requires data-website-id to identify which website is sending data, the standard script tag does not work inside GTM. The solution is to create the script element dynamically using JavaScript inside a Custom HTML tag — this bypasses GTM’s attribute stripping entirely.
Add the tracking script in GTM
1
Create a new tag
In your Google Tag Manager container, click Tags in the left navigation, then click New.
2
Choose Custom HTML as the tag type
Click Tag Configuration, then select Custom HTML from the list of tag types.
3
Paste the tracking code
Copy the code below into the HTML field. Replace the You can find both values in Settings → Websites → [your website] → Tracking code.
src value with the script URL from your Betterumami website settings, and replace the data-website-id value with your actual website ID.4
Set the trigger to All Pages
Click Triggering, then select the All Pages trigger (or a custom page trigger if you only want to track specific pages).
5
Save and publish
Click Save to save the tag, then click Submit in the GTM toolbar and publish your container. The Betterumami tracker will begin loading on your website immediately after the container is published.
If you have multiple websites in Betterumami, create a separate Custom HTML tag for each one, each with its own
data-website-id. You can use GTM triggers to control which tag fires on which pages or domains.