Skip to content

Instantly share code, notes, and snippets.

@brandonsheppard
Created February 6, 2014 08:14
Show Gist options
  • Save brandonsheppard/8840144 to your computer and use it in GitHub Desktop.
Save brandonsheppard/8840144 to your computer and use it in GitHub Desktop.
Alkemi/Dynamic Re-marketing with B@se
<script type="text/javascript">
var google_tag_params = {
[%if [@sku@]%]
ecomm_prodid: '[@sku@]',
[%else%]
[%cart_items%][%PARAM header%]ecomm_prodid:[[%end PARAM%][%PARAM *body%]"[@SKU@]",[%end PARAM%][%PARAM *footer%]],[%end PARAM%][%end cart_items%]
[%/ if%]
ecomm_pagetype: '[@config:current_page_type@]',
[%if [@sku@]%]
ecomm_totalvalue: '[@store_price@]',
[%else%]
[%cart_items%][%PARAM header%]ecomm_totalvalue:[[%end PARAM%][%PARAM *body%]"[@subtotal@]",[%end PARAM%][%PARAM *footer%]],[%end PARAM%][%end cart_items%]
[%/ if%]
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment