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-website-id="atid_YOUR_WEBSITE_ID"
data-domain="yourdomain.com"
src="https://adtarget.io/track.js"
></script>Click Save.
Don’t see Custom Code? Go to Themes → Edit Code → open theme.liquid → paste the code in the <head> section
Check It’s Working
Visit your store, then open your AdTarget dashboard — you should see tracking activity appear within a few seconds.
Tip: If you don’t see activity right away, try clearing your browser cache and visiting your store again.
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-website-id="atid_xyz789" data-domain="yourdomain.com" src="https://adtarget.io/track.js"></script>
{% else %}
<!-- Main Store -->
<script defer data-website-id="atid_abc123" data-domain="yourdomain.com" src="https://adtarget.io/track.js"></script>
{% endif %}Add this in the <head> section.
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.