Event tracking not working with Monster Insights Google ...

文章推薦指數: 80 %
投票人數:10人

What is the difference between the __gaTracker and ga Analytics trackers? Basically, the difference is pretty obvious: Original Analytics tracking code. 1. 2. 3. EventtrackingnotworkingwithMonsterInsightsGoogleAnalyticsplugin? 27JanEventtrackingnotworkingwithMonsterInsightsGoogleAnalyticsplugin? Postedat12:20h inAnalytics,Wordpress by YuriLau 0Comments 0Likes Share Whatisthedifferencebetweenthe__gaTrackerandgaAnalyticstrackers? Basically,thedifferenceisprettyobvious: OriginalAnalyticstrackingcode Looksprettystandard.Nowlet’slookatthetrackingcodeusedbytheMonsterinsightsplugin: ModifiedAnalyticstrackingcode (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*newDate();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); __gaTracker('create','UA-XXXXXXXX-X','auto'); __gaTracker('require','displayfeatures'); __gaTracker('send','pageview'); Now,seethatlittledifferenceinfrontoftheAnalyticscode?Definitelysomethingdifferent,butitstillworks.Inabitwewillexplainwhythishasafundamentalimpactonyoureventtracking,butfirst,let’sdiveintowhat__gaTrackerisandwhytheMonsterinsightspluginusesthisformat. Whydoesthepluginuse__gaTracker? AsGooglestatesontheiradvancedAnalyticspageofrenamingthegaobject: Insomecasesyou’dliketoaddanalytics.jstoyourpage,butthegavariableisalreadybeingusedforsomethingelse.Todealwiththis,analytics.jsprovidesamechanismforrenamingtheglobalgaobject. So,thatmeansthattheMonsterinsightspluginisprobablyusinggaTrackerjusttobesafeandtoavoidconflictswithanyotherelementsusingthega. YuriLau [email protected] Categories Analytics Ecommerce News Wordpress LatestArticles EventtrackingnotworkingwithMonsterInsightsGoogleAnalyticsplugin? 27January,2020 HowtosetupWooCommerceforLatinAmericanpaymentgateways 27January,2020 Screensizeandsafetyarethemainobstaclesformobilecommerce 24May,2016



請為這篇文章評分?