In GA3, we use the Measurement Protocol to track email openings.
In GA4, the Measurement Protocol API has become complicated and needs to be converted before it can be sent to GA4, this is a bit difficult for most people.
In fact, in GA4, we can still use the method of GA3 to track the opening of emails.
Use “v=2” to filter in the browser developer tools and find the request starting with “collect”, this is the data sent to GA4.
This request seems very long, but in fact many fields can be omitted. We mainly focus on three fields:
- cid: This is the Client ID and needs to be replaced with the user’s actual Client ID.
- en: event name, this is the event name, change it to aaa here
- ep: event parameter, this is the event parameter, no modification is required here.
The modified request is inserted into the email in the form of img, and some hidden styles are added:
The final effect is that the img cannot be seen in the email:
Send the email, and when a user opens it, you can see the event aaa in the real-time report of GA4: