Add Attribu to your Shopify store

It takes 3 minutes and no coding required. Once connected, Attribu automatically tracks:

  • Visitor analytics - Pageviews, visitors, referrers, devices, countries, etc. You don't need to install the <script> tag manually!
  • Custom events - add_to_cart and initiate_checkout are automatically tracked to help you create conversion funnels.
  • Revenue from orders - All completed orders from your Shopify store.
  • Revenue attribution - Links revenue to traffic sources (referrers, UTMs, ad click IDs, countries, devices).
If you've previously installed the Attribu tracking script manually on your Shopify store, you must remove it before connecting. The Shopify integration automatically installs the tracking script, and having both will cause duplicate tracking.

Step 1: Create a Shopify app (1 minute)

To connect Attribu to Shopify, you need to create a Shopify app and get API credentials:

  1. Go to the Shopify Dev Dashboard and create an account if you don't have one yet.
  2. Click Create app at the top right corner.
  3. Name your app (e.g. "Attribu Integration") and click Create.
Ensure Webhooks API Version is set to 2025-10.
  1. Scroll down to the Access > Scopes section and enable the following scopes:
    ScopePurpose
    read_ordersTo track revenue from orders
    read_productsTo track product views
    read_customersTo attribute revenue to customers
    write_script_tagsTo install the Attribu tracking script
  2. Scroll down to the bottom and click Release.
  3. In the modal, leave all fields empty and click Release.

Step 2: Install the app to your store (1 minute)

  1. Still on the Shopify Dev Dashboard, click Home on the left sidebar.
  2. Click Install app at the top right corner.
  3. Pick the Shopify store you want to connect to Attribu.
  4. You'll be redirected to Shopify admin, click Install.

Step 3: Connect to Attribu (1 minute)

  1. On the Shopify Dev Dashboard, select your app and go to Settings on the left sidebar.
  2. In the Credentials section, copy your Client ID and Secret.
  3. Go back to your Attribu dashboard, select your website and enter your Shopify store details:
    • Shopify store domain - Your store's Shopify domain (the domain containing ****.myshopify.com, not your custom domain)
    • Client ID - The Client ID from your Shopify app
    • Client secret - The Secret from your Shopify app
You will find the form to connect Shopify in the General settings of your website (Settings > Tracking script > Shopify tab).
  1. Click Connect Shopify.

Your Shopify store is now connected to Attribu!

Verify installation

  1. Visit your Shopify store.
  2. Check your Attribu dashboard - you should see pageviews appearing within a few minutes.
  3. Make a test purchase (or check existing orders) - revenue should appear in your analytics.
If you see duplicate pageviews, it's because you have the Attribu tracking script installed manually on your Shopify store. You need to remove the Attribu <script> tag before connecting.

Alternative: Manual script installation

If you prefer not to create a Shopify app, you can add the tracking script to your theme manually:

  1. In your Shopify admin, go to Online Store → Themes → Actions → Edit code.
  2. Open theme.liquid.
  3. Paste the tracking script before the closing </head> tag:
<script
  defer
  data-website-id="YOUR_SITE_ID"
  data-domain="your-store.myshopify.com"
  src="https://attribu.tech/js/script.js"
></script>
Replace YOUR_SITE_ID with the UUID from your Attribu dashboard (Settings > General). Set data-domain to your .myshopify.com domain.
For Shopify Plus stores, also add the snippet to checkout.liquid for post-purchase attribution.
Copied