How to get stats about how many times and when a 3rd party tag is triggered?

Gold Contributor
Gold Contributor

Hi all, 

I'm in the need of tracking how many times the Commission Junction conversion tag is triggered on my website: I've set a very specific dedupliaction rule on it and I need to see if it matches the Adobe Analytics attribution. 

I also need to know which was the _corder associated with the tag triggering.

The solution I have in mind is the following: if tags triggering conditions are true I want to set a variable to true or 1 and map it to Adobe so I can track it as an event/evar and get direct association with the purchase id.

My idea is to create a Javascript extensions with this code :

if(utag.cond[456] && utag.cond[847] && utag.cond[354] && (utag.cond[724] || utag.cond[846] || utag.cond[695])) {
 b.CJ_Triggered = "1";

and map the variable in Adobe tag.

 Besides I'm pretty sure my code won't work:

  • what would be the correct extension Scope I have to choose?
  • how to manage the objects utag and b in the code to make it work?

Obviously if you have better ideas or know ways to do get to the same result let me know :)