php-ga-measurement-protocol icon indicating copy to clipboard operation
php-ga-measurement-protocol copied to clipboard

Google Analytics 4

Open ZherebcovSergey opened this issue 4 years ago • 10 comments

At the moment I am using the library to work with Google Analytics. Will it work with version 4? And what you need to do? Would it be sufficient to specify the version?

$analytics = new Analytics(true);
$analytics->setProtocolVersion ('4');

ZherebcovSergey avatar Feb 16 '21 13:02 ZherebcovSergey

This functionality means https://ga-dev-tools.appspot.com/ga4-event-builder/

ZherebcovSergey avatar Feb 16 '21 14:02 ZherebcovSergey

@ZherebcovSergey have you tested out? is this library working with GA4?

dilab avatar Mar 24 '21 02:03 dilab

I have tested today and it's not working with GA4...

mindaugasva avatar Mar 26 '21 07:03 mindaugasva

Any update on this? Would be nice if we can make it work with the new version.

yellow1912 avatar Aug 26 '21 11:08 yellow1912

Any updates on this? I am also curious to know if this works with GA4

AronSEPAIT avatar Sep 15 '21 06:09 AronSEPAIT

Are there any plans to make this library compatible to the latest GA4 Measurement Protocol (Google Analytics 4) ?

Just a note on this comment:

This functionality means https://ga-dev-tools.appspot.com/ga4-event-builder/

The source of this page can be found here (https://github.com/googleanalytics/ga-dev-tools) and it is a frontend solution in TypeScript (JS).

chludwig avatar Sep 30 '21 15:09 chludwig

This would be good to know as Universal Analytics will no longer be supported as of July 2023. And if not, any suggestions of alternative approaches would be gratefully received. I've just implemented this on a site which uses "virtual pages" using AJAX and it works really well.

atticus7 avatar Mar 31 '22 06:03 atticus7

This would be good to know as Universal Analytics will no longer be supported as of July 2023. And if not, any suggestions of alternative approaches would be gratefully received. I've just implemented this on a site which uses "virtual pages" using AJAX and it works really well.

I think this library seems to supports GA4. You can check it too

https://github.com/br33f/php-GA4-Measurement-Protocol

san-kumar avatar May 18 '22 16:05 san-kumar

This would be good to know as Universal Analytics will no longer be supported as of July 2023. And if not, any suggestions of alternative approaches would be gratefully received. I've just implemented this on a site which uses "virtual pages" using AJAX and it works really well.

I think this library seems to supports GA4. You can check it too

https://github.com/br33f/php-GA4-Measurement-Protocol

Thank you. That looks promising!

atticus7 avatar May 23 '22 06:05 atticus7

There's also this package which looks promising https://github.com/aawnu/php-ga4

8ctopus avatar Feb 24 '23 05:02 8ctopus