Add AdTarget to Shopify
Let’s add tracking to your Shopify store. This takes about 3 minutes.
What You Need
- A Shopify store
- Your site ID from AdTarget
Find your Site ID in the AdTarget dashboard under your site settings.
Add the Code
Go to Theme Settings
In Shopify admin: Online Store → Themes → Customize
Open Theme Settings
Click Theme Settings (gear icon) → scroll to Custom Code or Footer Scripts
Paste the Code
<script
defer
data-site="YOUR_SITE_ID"
src="https://adtarget.io/tracker.min.js"
></script>Click Save.
Don’t see Custom Code? Go to Themes → Edit Code → open theme.liquid → paste the code just before the </body> tag
Check It’s Working
- Visit your store
- Press F12 to open DevTools
- Look for “AdTarget: initialized” in the Console
You’re all set!
Multiple Funnels on the Same Domain
Need different Telegram channels for different sections of your store? For example, separate funnels for /collections/vip and your main store.
How it works: Create a separate site in AdTarget for each funnel. Each site gets its own tracking code and Telegram channel.
Create Multiple Sites in AdTarget
In your AdTarget dashboard , create one site per funnel:
- Site 1:
yourstore.com→ connects to your main channel - Site 2:
yourstore.com/collections/vip→ connects to your VIP channel
Add Conditional Logic in theme.liquid
Go to Online Store → Themes → Edit Code → open theme.liquid
Replace a single tracking script with conditional logic:
{% if request.path contains '/collections/vip' %}
<!-- VIP Funnel -->
<script defer data-site="atid_xyz789" src="https://adtarget.io/tracker.min.js"></script>
{% else %}
<!-- Main Store -->
<script defer data-site="atid_abc123" src="https://adtarget.io/tracker.min.js"></script>
{% endif %}Add this just before </body>.
Important: Make sure each page only loads one tracking script. The conditional logic ensures only one script runs per page.
Need Help?
Email us with your store URL and theme name.