Dynamic Remarketing Tag Help

ExactArt
New Member
2 0 0

Hi Everyone,

Google supplied me with a dynamic remarketing tag for my store but it isn't working and they aren't being helpful in sorting out for me so I was hoping someone on the forum might be able to help as this is beyond my expertise.

My Google Ads tag audience source notifies me that 80% of my "ecomm_prodid" and "Id" parameters are not matching.

When I check the Tag Assistant it looks like it is sending the ID of all of the variants rather than just one e.g. :

eventview_item
ecomm_prodidshopify_GB_4393307144237_40442714620071,shopify_GB_4393307144237_40442714652839,shopify_GB_4393307144237_40442714685607,shopify_GB_4393307144237_40442714718375,shopify_GB_4393307144237_40442714751143,shopify_GB_4393307144237_40442714783911,shopify_GB_4393307144237_40442714816679,shopify_GB_4393307144237_40442714849447,shopify_GB_4393307144237_40442714882215,shopify_GB_4393307144237_40442714914983,shopify_GB_4393307144237_40442714947751,shopify_GB_4393307144237_40442714980519,shopify_GB_4393307144237_40442715046055,shopify_GB_4393307144237_40442715111591,shopify_GB_4393307144237_40442715144359,shopify_GB_4393307144237_40442715177127,shopify_GB_4393307144237_40442715209895,shopify_GB_4393307144237_40442715242663,shopify_GB_4393307144237_40442715275431,shopify_GB_4393307144237_40442715308199,shopify_GB_4393307144237_40442715373735,shopify_GB_4393307144237_40442715406503,shopify_GB_4393307144237_40442715439271,shopify_GB_4393307144237_40442715472039,shopify_GB_4393307144237_40442715504807,shopify_GB_4393307144237_40442715537575,shopify_GB_4393307144237_40442715570343,shopify_GB_4393307144237_40442715603111,shopify_GB_4393307144237_40442715635879,shopify_GB_4393307144237_40442715668647,shopify_GB_4393307144237_37317727813799,shopify_GB_4393307144237_37317727846567,shopify_GB_4393307144237_37317727879335,shopify_GB_4393307144237_37317727912103,shopify_GB_4393307144237_37317727944871,shopify_GB_4393307144237_37317727977639,shopify_GB_4393307144237_37317728010407,shopify_GB_4393307144237_37317728043175,shopify_GB_4393307144237_37317728075943,shopify_GB_4393307144237_37317728108711

 

When I take a look at the page source I think the ID is pushed as "ecomm_prodid.push('shopify_GB_4393307144237_'+json_product.variants[i].id);"

Here is the code they supplied me:

<!-- google dynamic remarketing tag for theme.liquid -->
{% if template contains 'product' %}
<script type="text/javascript">
  var json_product = {{ product | json }};
</script>
<script>
var event_name="view_item"
  var ecomm_prodid=[];
  for(var i=0;i<json_product.variants.length;i++)
    ecomm_prodid.push('shopify_GB_{{product.id}}_'+json_product.variants[i].id);
</script>
<script type="text/javascript">
  var google_tag_params = {
    ecomm_prodid: ecomm_prodid,
    ecomm_pagetype: 'product',
    ecomm_totalvalue: parseFloat('{{ product.price | money_without_currency | remove: ","}}')
  };
</script>
{% elsif template contains 'collection' %}
<script type="text/javascript">
var event_name="view_item_list"
  var google_tag_params = {
    ecomm_pagetype: 'category'
  };
</script>
{% elsif template contains 'cart' %}
<script type="text/javascript">
var event_name="add_to_cart"
  var id = new Array();
  {% for item in cart.items %}
  id.push('shopify_GB_{{item.product.id}}_{{item.variant.id}}');
   {% endfor %}

   var google_tag_params = {
     ecomm_prodid: id,
     ecomm_pagetype: 'cart',
     ecomm_totalvalue: parseFloat('{{ cart.total_price | money_without_currency | remove: ","}}')
   };
</script>
{% elsif template contains 'search' %}
<script type="text/javascript">
  var event_name="view_search_results"
  var google_tag_params = {
    ecomm_pagetype: 'searchresults'
  };
</script>
{% elsif template contains 'index' %}
<script type="text/javascript">
  var event_name="home"
  var google_tag_params = {
    ecomm_pagetype: 'home'
  };
</script>
{% else %}
<script type="text/javascript">
  var event_name="other"
  var google_tag_params = {
    ecomm_pagetype: 'other'
  };
</script>
{% endif %}
<script>
   gtag('event',event_name, {
    'ecomm_prodid':window.google_tag_params.ecomm_prodid,
    'ecomm_pagetype':window.google_tag_params.ecomm_pagetype,
    'ecomm_totalvalue':window.google_tag_params.ecomm_totalvalue,
    'id': google_tag_params.ecomm_prodid, 
    'google_business_vertical': 'retail',
    'value': window.google_tag_params.ecomm_totalvalue
  });
</script>

 

I would really appreciate any help on this as I've had to stop my ads as they are not profitable without the remarketing!

Kind regards,

Mike

 

Replies 0 (0)