Deploy via Google Tag Manager (GTM)

  • Updated

Context

If you plan to use or already use multiple types of tags on your website, you're likely using a tag manager to save time and avoid having to manually manage all of those different code snippets. This article walks through how to use Google Tag Manager (GTM) to deploy the Demandbase Tag to your website.

Prerequisites/Preparation

You must have Admin privileges or be assigned to a permission set with the required Demandbase settings access.

You must have have Google Tag Manager account and have Admin privileges. 

Steps

1. Copy the tag snippet.

a. From the left navigation bar, go to Settings_N.png Settings > Demandbase-Wide Settings > Tag Configurations > Demandbase Tag tab.

b. Scroll down to Your Demandbase Tag and Copy the tag snippet code.

tag.png

2. Create a new tag in GTM.

a. Log in to GTM and click Add a new tag from the Workspace Overview page.
1.png

b. Enter a name for the tag, such as My Demandbase Tag.

2.png

c. Click the Tag Configuration card and select Custom HTML.

3.png

d. Paste the Demandbase Tag code snippet into the body of the new tag, then click Save.

4.png

e. When prompted, click Save Tag.

5.png

3. Create a new trigger.

Next, you'll create a trigger to ensure the tag runs on pages only after the document object model (DOM) loads.

a. Click Triggers and then New. Give the new trigger a name, such as All Pages After GTM.

6.png

b. Click the Trigger Configuration card and select DOM Ready.

7.png

c. On the Trigger Configuration card, select Some DOM Ready Events and adjust the condition setting as follows. 

    • Select Page URL
    • Select matches RegEx
    • Enter .*
      Important: Make sure to include the period before the *

8.png

Tip: In most cases, there's no need to add more event conditions.

d. Click Save.

4. Add the trigger to the tag.

a. From the Workspace page, click Tags and select the new tag you created.

9.png

b. Scroll down to click the Triggering card, select the new trigger you created.

10.png

c. Click Save.

d. From the Workspace Overview page, click Submit to publish your changes.

Was this article helpful?

8 out of 10 found this helpful