1
votes

I need to put on the same page both Google Remarketing tag and Conversion tracking:

I have something like below for the Remarketing tag, this is required to track the pages the customer goes to:

// Remarketing
<script type="text/javascript">
  var priceTxt = $("#myValue");
  var cat = $("#mainCategory"); 
  var catLvl1 = $("#subCategoryLev1"); 
  var catLvl2 = $("#subCategoryLev2");  

  var google_tag_params = {
    basketAmount: priceTxt,
    mainCat: cat,
    catLvl1: catLvl1,
    catLvl2: catLvl2
  };  
</script>

<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = XXXXXXXXXX;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>

<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>


<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/XXXXXXXXX/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

Then, I have the following for the Conversion Tracking (this is used to track the customer basket on going):

// Conversion

<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = XXXXXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "YYYYYYYYYYYYY";
var google_conversion_value = 0;
var google_remarketing_only = false;
/* ]]> */
</script>

<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>

<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/XXXXXXXXX/?value=0&amp;label=YYYYYYYYYYYYY&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

But when I check on the Google Tag Assistant it shows me that he found 2 Tags but both are Remarketing Tag and the second one shows me the error "Error: No HTTP response detected".

It seems to me that there's a conflict preventing them to work in the proper way.

Does anyone know how to setup both these tracking script on the same page?

Thanks in advance.

1
Why are you loading conversion.js twice? - Mike Samuel
Even if I don't put twice the conversion.js, I still get the wrong behaviour. - filippo.derosa84

1 Answers

0
votes

This set up of two tags should be fine. This sort of error commonly happens if there is a javascript error elsewhere on your page - the tag assistant can see that there is a tag on the page, but something stopped the tag firing. 9 times out of 10 this is due to the browser encountering a javascript error and basically giving up.

Without seeing the actual page its hard to be sure though - check for anything in your browser's developer tools console and fix any javascript errors there and try again.