Reply
Highlighted
Visitor
Posts: 1
Registered: ‎08-20-2018

Wich extension was triggered?

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.

Reply
0 Kudos
Visitor
Posts: 7
Registered: ‎03-05-2018

Re: Wich extension was triggered?

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
Reply
0 Kudos