How do I track javascript errors and report them to google analytics?

Bronze Contributor
Bronze Contributor

I am migrating some tags from GTM to IQ. One of those tags is a javascript error tag that tracks the error message, error line, and error URL as event action and labels. How do I do the same thing in IQ?

8 REPLIES 8

How do I track javascript errors and report them to google analytics?

Employee Emeritus

After further testing the option I purposed earlier does not give the desired results. I am pulling the post down.  See Adrian's comments below.

How do I track javascript errors and report them to google analytics?

Bronze Contributor
Bronze Contributor

Thank you for this solution. I was hoping for a more drag-and-drop solution as I am very new to IQ and I'm not a developer. Is there any possibility that Tealium could make a tag for this functionality?

How do I track javascript errors and report them to google analytics?

Employee Emeritus

@tglaittli As someone that is new to Tealium, I would encourage you to leverage your Tealium Deployment team.  You can point them at this post and they will be able to add this as part of your initial deployment.  The mappings are pretty much drag and drop and the code sample provided can hopefully be copy/pasted into a DOM Ready Extension. 

How do I track javascript errors and report them to google analytics?

Employee Emeritus

Hello @tglaittli. Let me see if I can find your account manager. Stay tuned...

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

How do I track javascript errors and report them to google analytics?

Employee Emeritus

Okay, found them! @Anonymous and @steve_thurner should be reaching out to your shortly @tglaittli. Let us know if you have any other questions. 

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.

How do I track javascript errors and report them to google analytics?

Tealium Employee

@brian_kranson

@tglaittli

 

Just a heads up on error tracking. Most likely you will just see the generic:
"Script Error", "line 0"

 

As the utag files do not contain the cross origin header that would allow us to capture more details.

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.

How do I track javascript errors and report them to google analytics?

Bronze Contributor
Bronze Contributor
@adrian_browning

What the better solution to have a custom track error? Plan to Allow the cross origin header?

Gustavo Decarlo

How do I track javascript errors and report them to google analytics?

Tealium Employee

@gustavodecarlo

 

At present I do not believe we have any plans to add this header to the CDN files.

I would recommend raising this request through your account manager.

 

If you really wanted this information, at present, you would have to host the files on your own network, at which point the cross origin issue is removed. But also so is the benifits of the mCDN.

 

Adrian

Ask me anything Tealium related or TypeScript/JavaScript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Public