nystudio107 / craft-instantanalytics

DEPRECATED: Instant Analytics brings full Google Analytics support to your Twig templates and automatic Craft Commerce integration with Google Enhanced Ecommerce.
https://nystudio107.com/
Other
20 stars 9 forks source link

Users/sessions inflated #40

Closed over81 closed 4 years ago

over81 commented 4 years ago

Hi, we have an issue with Google Analytics session integrity. I ran a parallel test property for GA through Google Tag Manager for a week and Instant Analytics reported more than twice as many users/sessions, the amount of direct/none traffic was almost 40% (vs 5% in GTM) and bounce rate was a lot higher through IA. Is there something that would address this in settings etc?

Also, is it possible to rename the cookie from _ia to _ga, so Google Tag Manager -based tags could access the client ID? Otherwise they create their own users/sessions.

Thanks!

bencresty commented 4 years ago

Looks like we're facing the same issue. Opened an issue a few minutes ago: https://github.com/nystudio107/craft-instantanalytics/issues/42

Would be appreciated if the author, asking a pretty amount of money for this plugin that's based on a free open source lib, would actually respond on the issues we mention here and fix them. So we can actually start using the plugin in a project. Took us and still is taking us hours to debug things and work around issues that we might expect to work out of the box.

over81 commented 4 years ago

We'll move to GTM-based GA implementation if we get our IT people to generate the dataLayer with enhanced ecommerce data. Should be pretty straightforward with SeoMatic plugin. In its current state, the data is completely useless and the implementation undebuggable for marketers. I get the idea behind using measurement protocol, but should've been debugged by an experienced ga user.

khalwat commented 4 years ago

@over81 the problem is that the _ga cookie is proprietary, which is why I didn't attempt to recreate it, and name it _ga instead of _ia

@bencresty you're right, I'll either figure out a way to fix this issue, or I'll make the plugin free and deprecate it.

khalwat commented 4 years ago

This issue is really the same as: https://github.com/nystudio107/craft-instantanalytics/issues/42

Let's continue the discussion over there.

khalwat commented 4 years ago

Addressed in: https://github.com/nystudio107/craft-instantanalytics/commit/5370b41f56f53ef588de0d9df6c44c879eff65b6

Released as: https://github.com/nystudio107/craft-instantanalytics/releases/tag/1.1.8

lmk how you go @bencresty @over81

over81 commented 4 years ago

Thanks for addressing this, @khalwat. The main problem was sessions breaking and no way for us marketers to see why or when, since measurement protocol stuff happens behind the curtain :).

I did see that at least in some cases _ia would store and keep the client id, until an event tag was fired from Google Tag Manager. That event was probably expecting a _ga cookie, did not find one, created its own and on the next page load IA apparently rewrote the value in _ia to correspond to the one in _ga. Thus, the original "user" got left behind and a new user was continuing the journey.

This could be resolved apparently, by letting GA tags read _ia instead of _ga. I'm still not sure if that would've been a 100% waterproof solution to our problem, since it's one more thing to keep track of when implementing.

However, the easiest way out was for us to move away from measurement protocol and handle everything from within Google Tag Manager, since we can debug it ourselves and since consent management will be handled there as well.

Cheers!

khalwat commented 4 years ago

@over81 Yeah for sure GTM is the right answer in many cases, especially if a digital marketing agency is involved.

The only downside is that it can't directly respond to some of the Commerce events, so you will likely need work-arounds to have interstitial pages to allow the correct events to fire.