You can use Google Tag Manager (GTM) to add the Attentive tag to your website without editing code. The Attentive tag allows you to collect behavioral events, such as product views, cart adds, and purchases.
Prerequisite
Contact our White Glove team (whiteglove@attentivemobile.com) or your Customer Success Manager at Attentive for your organization's unique Attentive tag.
Add the Attentive tag using GTM
- Log in to your Google Tag Manager account.
- Click Add a New Tag.
- Click the Untitled Tag field and enter the name of your tag (for example,
Attentive tag
). - Click Tag Configuration to choose a tag.
- Go to the Custom section and choose Custom HTML.
- Paste your Attentive tag into the HTML field. Your Attentive tag will look like the following example:
<script src="https://cdn.attn.tv/EXAMPLE/dtag.js"></script>
In your brand’s unique tag, your Attentive domain appears in place ofYOUR_DOMAIN
. - Click Triggering to choose a trigger.
- Select All Pages.
- Click Add.
- Click Save.
The new tag appears in the Workspace Changes section. - Click Submit in the top-right corner to apply the tag.
The Submit Changes page appears, with options to publish the container and save a version of your container. - Choose Publish and create version.
- Enter a Version Name (for example,
Added Attentive tag
)
- Click Publish in the top-right corner.
See Tag Manager Help for more information about Google Tag Manager.
Verify implementation of the tag
- Visit the URL where you’ve implemented the tag. If the tag is implemented correctly, you'll see several network requests including
https://cdn.attn.tv/attn.js
Note: If you don't see these network requests, it’s possible that the Attentive tag isn't being loaded prior to the Window Load event. In that case, set the GTM tags to insert on the triggerPage View - Dom Ready
(rather than on Window Load). The Attentive tag relies on thewindow.load
event to properly execute, so it’s important to ensure this load event hasn't dispatched before our tag executes. - Go to your cart and checkout pages to make sure the behavior in the previous step appears on all pages of the customer journey.
Questions?
We’re here to help! Contact our White Glove team (whiteglove@attentivemobile.com) to ask about the Attentive + Google Tag Manager (direct in container) integration.