Shopify tag integration

Important! Attentive’s tag is 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. Also, if you use Shopify’s Checkout Extensibility feature set, the steps described below don't apply. Please leverage the latest version of our Shopify integration, which supports Checkout Extensibility.

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, you can complete the following procedures.

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 Shopify

  1. Log into your myshopify.com account.
  2. Click Settings in the bottom-left corner.
  3. Click Checkout on the Settings page.
    shopifytag1.png
  4. Scroll to the Additional scripts field and paste the Attentive tag (collected in the Prerequisite section). 
    For example:
    <script src="https://cdn.attn.tv/EXAMPLE/dtag.js"></script>
    shopifytag2.png
  5. (Optional) Add the first_time_accessed property 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.
  6. Click Save. This enables our tag to execute on the Thank You page and track purchase activity.
  7. Return to the homepage and click Online Store from the left sidebar.
    shopifytag3.png
  8. Click Actions on your theme, and then select Edit code from the drop-down.
    shopifytag4.png
  9. Click theme.liquid in the Layout section.
    shopifytag5.png
  10. Scroll to the bottom of the page, and then paste in the Attentive tag (collected in the Prerequisite section) above the closing </body> tag.
    For example:
    <script src="https://cdn.attn.tv/EXAMPLE/dtag.js"></script>
    shopifytag6.png
  11. Click Save.

Verify implementation of the tag

  1. 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
  2. Navigate to your cart or checkout pages to make sure the behavior in the previous step appears on all pages of the customer journey.

Articles in this section

Was this article helpful?
0 out of 4 found this helpful