- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
02-06-2017 09:29 AM - edited 02-06-2017 09:33 AM
We are seeing below error on our qa site from utag.js.
Does anyone one know what might be causing error?
Error trying to convert data layer: RangeError: Maximum call stack size exceeded
Error coming from below code in utag.js
for (var n = 0; n < obj.length; n++) { if ((typeof obj[n]).match(/boolean|string|number/)) { if (typeof b[new_key_name] === "undefined") { b[new_key_name] = []; } b[new_key_name].push("" + obj[n]); } else if (typeOf(obj[n]) === 'object') { Object.keys(obj[n]).forEach(function(array_key) { var new_obj = obj[n]; array_key_name = new_key_name + array_key; if (typeof new_obj[array_key] !== 'undefined' && new_obj[array_key] != null) { if ((typeof new_obj[array_key]).match(/boolean|string|number/) && !ignoreKey(array_key)) { if (typeof b[array_key_name] === "undefined") { b[array_key_name] = []; } b[array_key_name].push("" + new_obj[array_key]); } else if (typeOf(new_obj[array_key]) === 'array') { processDataArray(new_obj[array_key], array_key_name); } } }); } } } function typeOf(e) { return ({}).toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); } processDataObject(b); } catch (e) { try { console.log('Error trying to convert data layer: ' + e); } catch (e) {} } } , function(a, b) {
02-06-2017 09:45 AM - last edited on 02-06-2017 10:00 AM by kathleen_jo
@sailakumari_pay, I think that is some kind of datalayer conversion extension code, by the looks of it.
It may be that the data layer that is trying to be converted is too big, has an error in it, or is too many layers deep for the code to sensibly handle and is running out of memory.
If it's just on one page, my suggestion would be to check that the data layer itself doesn't have a syntax error or similar that can be easily resolved.
Otherwise, it's would be worth raising a support ticket and get a support engineer to take a look for you
Many thanks
Steve Lake
02-06-2017 10:04 AM
Copyright All Rights Reserved © 2008-2023