-
How can the application version be included in Google Analytics 4 Measurement Protocol?
Hey there, I’m currently working on transitioning from Google Analytics 3 to 4 for my Electron application. I’ve run into a bit of a snag since the ‘gtag’ method doesn’t work when the application is built, probably an issue with the app:// URL. So, I’ve decided to use the same work-around we did for Google Analytics 3, the measurement protocol.
I can send events successfully which is great, but unfortunately I can’t seem to get the application name and version attached to these events. I’ve been fiddling around with various naming variants for the user properties such as ‘application_version’ or ‘applicationVersion’, but I haven’t found the magic combination that seems to work.
I’ve included a snippet of my code for reference.
Notice how I’m trying to attach the app version and name to the ‘user_properties’?
Here:
user_properties: { app_version: { value: "1.0.8-test" }, app_name: { value: "Test" }, },
I’ve started to question whether it’s even feasible to send an app version through the Measurement Protocol API. It mostly seems to be designed to enrich events sent through gtag or the Firebase lib. If anyone’s dealt with this before or knows what I might be doing wrong, I’d appreciate the help!
Log in to reply.