Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hello,
I've successfully added the following tracking tag to my theme.liquid and it works perfectly. However, I'd really like to begin targeting specific collections within my store. How do I add this sort of tag to one specific collection?
<script type="text/javascript" src="//tag.mydomain.com/autoscript/anotherdomain_aksdfkhasfdhakdjfvfzst/anotherdomain.js"></script>
Thanks, Jason
Solved! Go to the solution
This is an accepted solution.
Two options using a property of the collection or alternate templates
#1 Use the collection handle or ID
{% if collection.handle == "handle" %} {% endif %}
#2 Otherwise copy your collection template into an alternate template then in you admin manually assign it to the specific collection
The second way can help lower how often you have to edit code
This is an accepted solution.
Two options using a property of the collection or alternate templates
#1 Use the collection handle or ID
{% if collection.handle == "handle" %} {% endif %}
#2 Otherwise copy your collection template into an alternate template then in you admin manually assign it to the specific collection
The second way can help lower how often you have to edit code
Thank you! I'll try that.
User | RANK |
---|---|
8 | |
4 | |
4 | |
3 | |
3 |