Skip to content

Instantly share code, notes, and snippets.

@bani
Created July 20, 2014 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bani/ea7a4c77d57b25d6f8e4 to your computer and use it in GitHub Desktop.
Save bani/ea7a4c77d57b25d6f8e4 to your computer and use it in GitHub Desktop.
Add inside {% for product in collection.products %} in collection.liquid
<script type="text/javascript">
ga('ec:addImpression', {
'id': '{{ product.id }}',
'name': '{{product.title}}',
'category': '{{product.type}}',
'brand': '{{product.vendor}}',
'list': '{{collection.title}}'
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment