Installation Guides
Shopify
How to add @dub/analytics to your Shopify store
With @dub/analytics
, you can track lead and sale conversions on your Shopify store, enabling you to measure the effectiveness of your marketing campaigns.
You can add the @dub/analytics
script to your Shopify store simply by installing the Dub Shopify App from the App Store.
Then, make sure to activate the @dub/analytics
script by following these steps:
- Navigate to your Shopify admin panel.
- Go to Online Store > Themes.
- Click on Customize for your current theme.
- In the theme editor, select the App embeds tab.
- Locate the Analytics Script for the Dub Conversions app and toggle it to activate.
You can verify the installation with the following tests:
- Open the browser console and type in
_dubAnalytics
– if the script is installed correctly, you should see the_dubAnalytics
object in the console. - Add the
?dub_id=test
query parameter to your website URL and make sure that thedub_id
cookie is being set in your browser.
If both of these checks pass, the script is installed correctly. Otherwise, please make sure:
- The analytics script was added to the
<head>
section of the page - If you’re using a content delivery network (CDN), make sure to purge any cached content
Installation video
Here’s a video showing how to install and activate the @dub/analytics
script in your Shopify store: