Need help with Google dynamic remarketing tag code for Shopify?

Hi @Josh_Uebergang ,

Could you please let me know if the following code and the way of inserting it, is ok for the dynamic remarketing?

I have added all three custom dimensions ecomm_prodid, ecomm_pagetype and ecomm
_total value in Universal GA, then I added also the dynamic atribute for retail.

Once added it requires inserting the following JS snippet:

var dimensionValue = ‘SOME_DIMENSION_VALUE’;
ga(‘set’, ‘dimension1’, dimensionValue);

So what I would like to do, is to add into Shopify/Preferences/Google Analytics/Additional Google Analytics JavaScript section the following code:

var ecomm_prodid = ‘shopify_RO_{{ product.id }}_{% if product.variants.first.id %}{{ product.variants.first.id }}’,{% else %}{{ product.variants.id }}‘,{% endif %}’;
ga(‘set’, ‘dimension1’, ecomm_prodid);
var ecomm_pagetype = ‘{{ template }}’;
ga(‘set’, ‘dimension2’, ecomm_pagetype);
var ecomm_totalvalue = ‘{{ total_price | money_without_currency | replace: “,”, “.” }}’;
ga(‘set’, ‘dimension3’, ecomm_totalvalue);

Thank you