I was working with an application using jQueryMobile and using the googleTagManager instead of the simple code for GA Was there. While reviewing the tracking of the website, I get more visits for each page. I mean, every time I look at a simple page, tracking is done for 2 or 4 trips. Here is the code:
var datellar = Datailer || []; DataLayer.push ({'b_gaCode': 'UA-32085XX-3'}); DataLayer.push ({'gaCode': 'UA-32085XX-3'}); Var googleTagManager = Function (W, D, S, L, I) {W [L] = Y [L] || []; W [l] Push ({'gtm.start': New Date (.) GetTime (), Event: 'gtm.js'}); Var f = d.getElementsByTagName (s) [0], j = d. Siquette element (S), DL = L! = 'DataLayer'? '& L =' + l: ''; J.async = true j.src = '// www.googletagmanager.com/gtm.js?id='+i+dl; F.parentNode.insertBefore (j, f); } $ (Document) .on ("pageinit", function (event, UI) {googleTagManager (window, document, 'script', 'data loader', 'GTM-MX6TXX');});
Thank you!
Do you have multiple "pageviews" tags set in Google Tag Manager, for each page Firing?
You can add your Tag Manager container to debug mode , and then navigate to your web application, and check
No comments:
Post a Comment