-
Notifications
You must be signed in to change notification settings - Fork 42
investigate supporting GA4 #185
Comments
For future readers: looks like Google has shifted its focus to a https://github.com/dart-lang/tools/tree/main/pkgs/unified_analytics, which:
Does this mean that |
Hi @bartekpacia - yes, we have switched over to using a new package, speaking the GA4 protocol, but that's very purpose built to support the Given that, it's highly unlikely that we'll update this package to GA4 (this package was originally written to support the I think it's worth keeping this issue open however - I think it could be useful for people to coordinate on any replacement solutions. It's worth noting that there's not necessarily a lot of complexity in speaking to google analytics. I haven't looked at GA4 myself, but suspect (like the previous protocol) that it's not much more than just sending some well-formed http posts to a url end-point. In a web app, you might want to use js interop to wrap the existing JS library ( |
Thanks for answering!
Good idea :)
That's right, it's not that complex and the package isn't really necessary. In case anyone's interested, here's how we implemented basic analytics with GA4 in our CLI tool. |
Hey @bartekpacia, I am considering to develop my own GA4 client as you did, but it seems that the measurement protocol v4 has the required parameter |
Hi @mr-mmmmore, I don't use |
OK, thanks, I'm going to try it. |
@bartekpacia It's working only for "web" streams, where there is a |
The measurement id is just the GA4 key, so it's the same as the new flutter tools. If you are using dart.io you should just http post using the GA4 key and ideally an api secret. If you are using dart.html you should proxy through the official library. |
I have mixed things a little bit, but the problem remains… For an ios or android stream, any request to the measurement protocol v4 must pass All this is from the measurement protocol v4 official reference, here. So what do you mean exactly @rvowles by "The measurement id is just the GA4 key" and "the same as the new flutter tools"? Have you succesfully configured a GA4 mobile stream and sent data to it using a custom HTTP client? |
From the google analytics docs:
We don't yet know whether we'll support GA4 in this package or leave that to another package. If we do support it here, it's enough of a protocol change that we likely wouldn't try for backwards compatibility in the APIs; i.e. v4 of this package and v5 would have different APIs (one that matched the needs of the older measurement protocol and one that matched the needs of GA4).
This issue tracks discussing whether this package will be upgraded to support GA4 or not.
--
Notes:
The text was updated successfully, but these errors were encountered: