Attentive’s tag is automatically installed on your Shopify website as part of the Shopify integration setup process. We recommend following our Shopify integration guide rather than installing the tag manually, as described in this article.
If you're currently using Shopify, you can add the Attentive tag to your Shopify-hosted website to collect behavioral events (such as product views, cart adds, and purchases). If you prefer to manually set up the Shopify tag, rather than automatically install the tag, you can complete the following procedures outlined in this article.
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 Shopify
- Log into your myshopify.com account.
- Click Settings in the bottom-left corner.
- Click Checkout on the Settings page.
- Scroll to the Additional scripts field and paste the Attentive tag (collected in the Prerequisite section).
- (Optional) Add the
first_time_accessedproperty to the Additional scripts field to prevent your analytics from counting customers more than once. This prevents the same purchase from being tracked multiple times if the user revisits the status page to check on the order. See Run scripts only on first visit for more information.
- Click Save. This enables our tag to execute on the Thank You page and track purchase activity.
- Return to the homepage and click Online Store from the left sidebar.
- Click Actions on your theme, and then select Edit code from the drop-down.
- Click theme.liquid in the Layout section.
- Scroll to the bottom of the page, and then paste in the Attentive tag (collected in the Prerequisite section) above the closing </body> tag.
- Click Save.
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
- Navigate to your cart or checkout pages to make sure the behavior in the previous step appears on all pages of the customer journey.