javascript - 'Cannot stringify dataLayer' when using Google Tag Managers 'click-listener' in angular-js app -
we trying implement tracking via google tag manager angularjs app. when using click-listener defined in tag-manager, next script gets injected app on every click (or seems):
(function (a) { var b = {}, c; (c in || {})if (a.hasownproperty(c) && "undefined" != typeof a[c])try { b[c] = json.stringify(a[c]) } grab (d) { console.log("cannot stringify " + c) } = document.createevent("customevent"); a.initcustomevent("retrievedvariablesevent", !0, !0, {variables: b}); window.dispatchevent(a) })({'studiov2': window['studiov2'], 'richmediaiframebreakoutcreatives': window['richmediaiframebreakoutcreatives'], 'datalayer': window['datalayer']})
when click tracked "cannot stringify datalayer"
error occurs. reason is, click, element send has circular reference itself, because of kid , parent references attached object (by jquery possibly??).
any ideas how implement click-listener google tag manager, without running recursion?
it turned out reason chrome extension tag assistant. after uninstalling it, notification, bug went away.
javascript jquery angularjs google-tag-manager jqlite
No comments:
Post a Comment