Allow Linker not working
-
Good day folks,
Im having some issues on my tracking, I set the allow linker to true but it doesn’t load when i check my code.
We want something like this to appear
<script type="text/javascript" data-cfasync="false"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','__gaTracker'); var tbb_ga = 'UA-1234567-1'; var tbb_cid = 'bluemansiondirect'; var tbb_domain = 'app-apac.thebookingbutton.com'; __gaTracker('create', tbb_ga, {'allowLinker': true}); __gaTracker('require', 'linker'); __gaTracker('linker:autoLink', [tbb_domain], false, true); __gaTracker(function(tracker) { window.linker = window.linker || new window.gaplugins.Linker(tracker); if(document.referrer.indexOf(document.domain)!=7) { var e = document.createElement('iframe'); e.src = window.linker.decorate('//'+tbb_domain+'/'+tbb_cid+'/ga_proxy'); e.setAttribute('style', 'display:none'); var b = document.getElementsByTagName('body')[0]; b.appendChild(e); } }); __gaTracker('create', 'UA-1234567-1', 'auto', {'allowLinker':true}); __gaTracker('set', 'forceSSL', true); __gaTracker('require', 'displayfeatures'); __gaTracker('require', 'linkid', 'linkid.js'); __gaTracker('send','pageview'); </script>
But we get something like this
<script type='text/javascript'> var tbb_ga = 'UA-1234567-1'; var tbb_cid = 'bluemansiondirect'; var tbb_domain = 'app-apac.thebookingbutton.com'; </script> <!-- This site uses the Google Analytics by MonsterInsights plugin v7.0.4 - Using Analytics tracking - https://www.monsterinsights.com/ --> <script type="text/javascript" data-cfasync="false"> var mi_track_user = true; var disableStr = 'ga-disable-UA-1234567-1'; /* Function to detect opted out users */ function __gaTrackerIsOptedOut() { return document.cookie.indexOf(disableStr + '=true') > -1; } /* Disable tracking if the opt-out cookie exists. */ if ( __gaTrackerIsOptedOut() ) { window[disableStr] = true; } /* Opt-out function */ function __gaTrackerOptout() { document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/'; window[disableStr] = true; } if ( mi_track_user ) { (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','__gaTracker'); __gaTracker('require', 'displayfeatures'); __gaTracker('require', 'linkid', 'linkid.js'); __gaTracker('send','pageview'); } else { console.log( "" ); (function() { /* https://developers.google.com/analytics/devguides/collection/analyticsjs/ */ var noopfn = function() { return null; }; var noopnullfn = function() { return null; }; var Tracker = function() { return null; }; var p = Tracker.prototype; p.get = noopfn; p.set = noopfn; p.send = noopfn; var __gaTracker = function() { var len = arguments.length; if ( len === 0 ) { return; } var f = arguments[len-1]; if ( typeof f !== 'object' || f === null || typeof f.hitCallback !== 'function' ) { console.log( 'Not running function __gaTracker(' + arguments[0] + " ....) because you\'re not being tracked. "); return; } try { f.hitCallback(); } catch (ex) { } }; __gaTracker.create = function() { return new Tracker(); }; __gaTracker.getByName = noopnullfn; __gaTracker.getAll = function() { return []; }; __gaTracker.remove = noopfn; window['__gaTracker'] = __gaTracker; })(); } </script> <!-- / Google Analytics by MonsterInsights --> <script type='text/javascript'> window.linker = window.linker || new window.gaplugins.Linker(tracker); if(document.referrer.indexOf(document.domain)!=7) { var e = document.createElement('iframe'); e.src = window.linker.decorate('//'+tbb_domain+'/'+tbb_cid+'/ga_proxy'); e.setAttribute('style', 'display:none'); var b = document.getElementsByTagName('body')[0]; b.appendChild(e); } </script>
- This topic was modified 6 years, 8 months ago by .
- This topic was modified 6 years, 8 months ago by .
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Allow Linker not working’ is closed to new replies.