Configuration
Use Google Tag Manager
The Umami tracker can be installed using Google Tag Manager.
Normally, you would install the Umami tracker by using the following code:
However, Google Tag Manager strips custom data-* attributes from script tags. To work around this, create the script element dynamically using a Custom HTML tag in GTM:
GTM setup steps#
- In Google Tag Manager, go to Tags and click New.
- Choose Custom HTML as the tag type.
- Paste the code above, replacing the
srcanddata-website-idvalues with your own. You can find these values in your Umami website settings under Tracking code. - Set the trigger to All Pages.
- Save and publish your changes.