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_cartandinitiate_checkoutare 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:
- Go to the Shopify Dev Dashboard and create an account if you don't have one yet.
- Click Create app at the top right corner.
- Name your app (e.g. "Attribu Integration") and click Create.
Ensure Webhooks API Version is set to 2025-10.
- Scroll down to the Access > Scopes section and enable the following scopes:
Scope Purpose 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 - Scroll down to the bottom and click Release.
- In the modal, leave all fields empty and click Release.
Step 2: Install the app to your store (1 minute)
- Still on the Shopify Dev Dashboard, click Home on the left sidebar.
- Click Install app at the top right corner.
- Pick the Shopify store you want to connect to Attribu.
- You'll be redirected to Shopify admin, click Install.
Step 3: Connect to Attribu (1 minute)
- On the Shopify Dev Dashboard, select your app and go to Settings on the left sidebar.
- In the Credentials section, copy your Client ID and Secret.
- 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
- Shopify store domain - Your store's Shopify domain (the domain containing
You will find the form to connect Shopify in the General settings of your website (Settings > Tracking script > Shopify tab).
- Click Connect Shopify.
Your Shopify store is now connected to Attribu!
Verify installation
- Visit your Shopify store.
- Check your Attribu dashboard - you should see pageviews appearing within a few minutes.
- 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:
- In your Shopify admin, go to Online Store → Themes → Actions → Edit code.
- Open
theme.liquid. - 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.