Technical guide: How to insert the tracking script into your store
To use OnSite Marketing, On-Site Behavior Automations and Push Notifications, you need to install the tracking script on your website. There are three ways to do it. The easiest is through an integration, because in most cases the script is installed automatically. You can also use Google Tag Manager or install it manually. We walk you through each option step by step.
Option 1: Through integrations
If your Doppler account is integrated with Shopify, Adobe Commerce, Easycommerce, PrestaShop or WooCommerce, the script is installed automatically when you integrate your store. You don’t need to do anything else.
If you use Tiendanube: first integrate your store with Doppler, then follow the steps in Option 2 to install the script with Google Tag Manager.
Haven’t integrated your store yet? Here’s how:
- How to integrate Doppler with Tiendanube
- How to integrate Doppler with your Shopify store
- How to integrate your Adobe Commerce store
- Easycommerce: how to integrate it with Doppler
- How to integrate Doppler with PrestaShop
- How to integrate Doppler with your WooCommerce store
Option 2: With Google Tag Manager
If you don’t know HTML, Google Tag Manager lets you insert the script without editing your website’s code. If your store runs on Tiendanube, this is the option you need. We show you how, step by step.
Important: these instructions assume you’ve already set up Google Tag Manager on your website. Learn how to do it if you haven’t yet.
1. Go to Google Tag Manager and sign in to your account.
2. Create a trigger to use later in your tag. In Workspace, select Triggers and click New.

3. A pop-up opens to set up the trigger. Add a title and click the gray circle to choose the trigger type.

4. In the new pop-up, choose the DOM Ready trigger type.

5. Click Save to create the trigger.

This is how it looks in the Triggers section:

6. Now create a tag. Select Tags in the left menu and click New.

7. Another pop-up opens. Add a title to your tag and click the gray circle to set it up.

8. In the menu on the right, select Custom HTML.

9. Insert the Doppler tracking script:

This is how it looks once you add it:

10. On the same screen, set up triggering at the bottom. Click the gray circle, choose the trigger you created earlier and click Save.

11. When you’re done, you see your tag created and set up.

12. To publish your changes, click Submit.

13. In Publish and Create Version, enter a name for the version and click Publish.

If you use Tiendanube, complete these steps
1. Copy your container’s GTM-ID. You’ll find it at the top of your workspace, in the format GTM-XXXXXXX.

2. In your Tiendanube admin, go to Configuración and open Códigos externos.

3. Paste your GTM-ID and click Guardar.

4. In Doppler, go to Integrations > Tiendanube.
5. Turn on the Tracking script set up switch and click Save.

That’s it, tracking with Google Tag Manager is now active.
Option 3: Insert the script in your website’s HTML code
We recommend this option if you have programming knowledge, because it requires editing your website’s HTML code.
1. Add this code in the <head> section:

2. Add this code before the closing </body> tag:

You can also include the code in a JS file (for example, footer.js) like this:
![]()
Important: make sure the DOM is ready before the code loads. Include it on every page where you want to track your visitors’ activity. To avoid conflicts, make sure the script doesn’t include third-party libraries (for example, jQuery).
Now that your script is installed, learn how to create an On-Site Behavior Automation.
Any questions? Write to us at [email protected] and we’re happy to help. 💛
Doppler informs you that the personal data that you provide to us when completing this form will be treated by Doppler LLC as responsible for this web.
Purpose: To allow you to make comments in our help center.
Legitimation: Consent of the applicant.
Recipients: Your data will be saved by Doppler and Digital Ocean as hosting company.
Additional information: In the Doppler Privacy Policy you’ll find additional information about the collection and use of your personal information by Doppler, including information on access, conservation, rectification, deletion, security, cross-border data transfers and other issues.