Wich extension was triggered?

javi1
Bronze Contributor
Bronze Contributor javi1

Hello,

We want to know, which extension, of our tag manager, is being triggered when I do a specific action.

We have been able to know the tags that are being triggered by that action but not the extension/s, which is the element that we think that is the origin of the incorrect data(we have a lot of extensions and tags).

We have tried multiples extensions and debugging methods with the console, but there is not enough.

 

Could you give us some tips to debug this scenario?

 

Thank you in advance.

Regards.

4 REPLIES 4

Wich extension was triggered?

powem
Silver Contributor
Silver Contributor powem

Hello,

If the issue is only with a single tag, then it would appear that extensions scoped to that tag are the ones at issue. 

I would find the code for each of those extensions in the JavaScript debugger in Chrome, put one or more breakpoints in their execution flow, and click through every step. This can be quite tedious, and might take a long time. If you know the variables that are having incorrect data, then you can put them in the debugger's watch list, and see the values assigned as they come up. This can shorten the experience quite a bit.

Probably first, before doing that, I would use the Tealium debugger cookie, and look at the output of utag.js code execution. If you're not familiar with the cookie:

  • Open the console.
  • Enter 
    document.cookie="utagdb=true"
  • Reload the page. 

 The gobs of printed information about the tag execution process will contain any errors that occurred. This can help pinpoint the location of an extension going awry. For example:

utag.js:formatted:1599 TypeError: Cannot read property 'toString' of undefined
    at Array.u.extend (utag.js:formatted:13388)
    at Object.u.send (utag.js:formatted:13565)
    at sendTag (utag.js:formatted:1771)
    at Object.trigger (utag.js:formatted:1803)
    at Object.track (utag.js:formatted:1644)
    at Object.link (utag.js:formatted:1624)
    at utag.js:formatted:12581

Here's an extension that did not check for the existence of a property value before trying to use it. Because utag captures the output with its exception handler, no message will appear in the console. You may see one of these errors right at the point of a tag being processed like this:

utag.js:formatted:1599 SENDING: 398

In that case, you've found an extension that is misbehaving at tag scope, and possibly directly damaging your data collection.

If there's no joy with the cookie, then walking line by line through the code in the debugger is likely the only course. Sorry. Nothing like stepping through a for loop with 25 or 50 steps to ruin an afternoon. But hey, that's why they pay us the big money. ;-)

 

"If it sounds good, it is good." - Duke Ellington

Wich extension was triggered?

javi1
Bronze Contributor
Bronze Contributor javi1

Thanks @powem for the answer (it has been a long time ago, sorry).

I'm pretty sure that the "utag" object has a method to know which extensions have been triggered (and that is what Tealium's extension use) but I didn't find it.

As you have proposed, I have put some breakpoints on the "utag.js" code, specifically on the extension condition, to verify the data there.

P.S: I have had the same issue again (2 years later) and there is not any advance on this topic...


Wich extension was triggered?

Tealium Expert
Tealium Expert
@javi1 - the Web Companion can sometimes provide info about which extensions fired. In the debugger, try adding a Watch on the variable you are tracking . And step through the code line by line if possible and you may find the spot where things are going wrong. Good luck.
Highlighted

Wich extension was triggered?

javi1
Bronze Contributor
Bronze Contributor javi1

Thanks for your answer @mitchellt 

The main problem with the "Web companion" is that it's not be able to show all the extensions triggered.

I miss an attribute or a method like "utag.send", where we can see which rules have been triggered.

 

We will always have "utag.DB()", hahaha.