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#

  1. In Google Tag Manager, go to Tags and click New.
  2. Choose Custom HTML as the tag type.
  3. Paste the code above, replacing the src and data-website-id values with your own. You can find these values in your Umami website settings under Tracking code.
  4. Set the trigger to All Pages.
  5. Save and publish your changes.