We're trying to setup the conversion tracking for a customer who's using the Google Tag Manager. The cookie with the tracking variables is filled correctly but when the Google Tag Manager fires the Javascript on the success page to write the information back to ExactTarget, this does not arrive in ET.

Any experiences, hints, best practices?

  • I am having a similar experience with the new Web Analytics script. GTM shows it firing, but I'm not seeing any data in the analytics dashboard. Although in ET it does say the script is installed. I'm not sure if it has to do with ET's script being loaded synchronously or asynchronously. GTM does not support synchronous scripts.
    – user11998
    Commented Sep 29, 2014 at 18:35
  • we're having similar issues. we're using Google Tag Manager to apply the ET tracking beacon on all pages of our site. the only page that isn't getting tracked back into ET's web analytics is the home page, and we're not sure why. we're going to reach out to google to see if they know what might be happening.
    – user12828
    Commented Nov 3, 2014 at 19:49

1 Answer 1


Equally late on this answer, but I'm hoping this saves someone a headache. I'm relatively new at all of this, so bare with me if I'm a bit off on explaining my solution. I was running into a number of similar issues with GTM. I believe is stems from the way GTM converts the document.write command.

The first problem I had with gtm and ExactTarget was the final document.write command would cut off everything after <system> when I would pass it in through multiple document.write commands, as the ExactTarget's JavaScript conversion documentation tells you too. This problem was fixed by putting it into one string, but opened up another problem.

The second problem was GTM would insert data-ps-id=2 into my <system> tag so it would look like <system data-ps-id=2>. Since you are passing back a query to exact target, aspx?xml=, it would think that the equal sign in data-ps-id=2 is another data point you're trying to pass back to ExactTarget which would then screw up everything else you pass after it. My solution to this was to use encodeURI() on the final string. See the final solution below:

var h = 'https://click.exacttarget.com/conversion.aspx?xml=';
h += '<system><system_name>tracking</system_name><action>conversion</action>';
h += '<member_id>' + memberid + '</member_id><job_id>' + jobid + '</job_id>';
h += '<sub_id>' + SubscriberID + '</sub_id><email></email><list>' + listid + '</list>';
h += '<BatchID></BatchID><original_link_id>' + urlid + '</original_link_id>';
h += '<conversion_link_id>' + convid + '</conversion_link_id><link_alias>';
h += linkalias + '</link_alias><display_order>' + convid + '</display_order>';
h += '<data_set>' + sData + '</data_set></system>';
document.write('<img src="' + encodeURI(h) + '" height="1" width="1" />');

An additional note, I also ran into some issues with single quotes, double quotes in GTM, hence the reason I use the single then double. ExactTarget suggests this to set your dataset:

dataset=dataset+"<data amt=\"1\" unit=\"Dollars\" accumulate=\"true\">

My dataset, or sData variable looked like this when I set it:

dataSet+='<data amt="1" unit="Sales Unit" accumulate="true"/>';

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .