ckanext-googleanalytics icon indicating copy to clipboard operation
ckanext-googleanalytics copied to clipboard

Switching to Google Analytics 4?

Open mmdolbow opened this issue 2 years ago • 5 comments

Google Analytics 4 was introduced within the last few years, and I'm curious if any work has been done on this extension to enable a migration to a GA4 property. It appears that it's only set up for the old "Universal Analytics" but I'm a bit out of my depth so hoping this is a quick answer.

mmdolbow avatar Oct 13 '22 19:10 mmdolbow

We started working on it but not much was done. If the only thing you need is sending request details to GA, switch to tag v2.1.1(or pip install ckanext-googleanalytics[requirements]==2.1.1 and use the G-* tracking code from GA4 instead of UA-*. It will automatically switch to a different JS for tracking, and that's it. You should see page visits in the GA console from this moment.

smotornyuk avatar Oct 14 '22 07:10 smotornyuk

Thank you for the advice; sending the details to GA is likely going to be good enough for me - we don't have / need a ton of customization. I will give this a shot, much appreciated!

mmdolbow avatar Oct 14 '22 12:10 mmdolbow

Hi @smotornyuk,

Is there any update on upgrading to Google Analytics 4 (GA4)? Currently, the Statistics Retrieval from Google Analytics feature will not work for GA4 because it needs to be upgraded to use the new Google Analytics Data API (GA4) with the python package Python Client for Analytics Data API This is quite urgent with the pending deadline of Universal Analytics (UA) standard stopping processing data on the 1 July 2023 Universal Analytics is going away

MarkCalvert avatar May 02 '23 03:05 MarkCalvert

Hi, @MarkCalvert

No, I haven't done anything for statistics retrieval yet and I won't have a chance to work on it during the next couple of months.

smotornyuk avatar May 02 '23 13:05 smotornyuk

@smotornyuk Okay, we will work on updating the one functionality we need right now for one of our projects which is getting the raw data from GA4 data API in the CLI load command.

MarkCalvert avatar May 03 '23 22:05 MarkCalvert