You can use Google Tag Manager (GTM) to add the Attentive tag to your website without editing code. As a reminder, in order to collect behavioral events (such as product views, cart adds, and purchases), you must add the Attentive tag to your website.
Contact our White Glove team (email@example.com) or your Client Strategy Manager at Attentive for your organization's unique Attentive tag.
Add the Attentive tag using GTM
- Log in to your Google Tag Manager account at tagmanager.google.com.
- Click Add a New Tag.
- Click the Untitled Tag field and edit the name of your tag (for example, Attentive tag).
- Click Tag Configuration to choose a tag.
- Scroll to the Custom section and select Custom HTML.
- Paste the Attentive tag (collected in the Prerequisite section) into the HTML field. For example, it should resemble
<script src="https://cdn.attn.tv/EXAMPLE/dtag.js"></script>where EXAMPLE is replaced with your Attentive domain.
- Click Triggering to choose a trigger.
- Select All Pages.
- 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.
- Enter a version name (for example, Added Attentive tag) and then click Publish and Create Version.
- Click Publish in the top-right corner.
For more information about Google Tag Manager, see Tag Manager Help.
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
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 trigger Page View - Dom Ready (rather than on Window Load). The Attentive tag relies on the
window.loadevent to properly execute, so it’s important to ensure this load event hasn't dispatched before our tag executes.
- Navigate to your cart or checkout pages to make sure the behavior in the previous step appears on all pages of the customer journey.
We’re here to help! Contact our White Glove team (firstname.lastname@example.org) to ask about the Attentive + Google Tag Manager (direct in container) integration.