utag.js:77 Uncaught TypeError: ele.root is not a function

ShruthiJ
Rookie Contributor
ShruthiJ

Utag_data and utag.ja was implemented on the website. Whenever we click on a link, the following error appears in the console: 

utag.js:77 Uncaught TypeError: ele.root is not a function

2 REPLIES 2
Highlighted

utag.js:77 Uncaught TypeError: ele.root is not a function

vinayreddy
Silver Contributor
Silver Contributor vinayreddy

Hi @ShruthiJ ,

Did you add any custom extension to track click events? 

Thanks

VR

utag.js:77 Uncaught TypeError: ele.root is not a function

Tealium Employee

Hi @ShruthiJ ,

It looks like you have some event handlers that have the following line lines:

var ele = jQuery(this);
var region = ele.attr('data-region') ? ele.attr('data-region') : ele.root().attr('id');

Where ele is equal to the current element the event was triggered on but .root() is not a valid method in jQuery. 

If you are trying to reach the parent of that element I would look at changing the line to:

var region = ele.attr('data-region') ? ele.attr('data-region') : ele.parent().attr('id');

Otherwise, I would recommend you raise a support ticket so that an engineer can help understand what you are trying to achieve here and help with providing a solution.