The consulting and engineering teams at E-Nor continue to take advantage of Measurement Protocol to meet a range of tracking needs that our clients bring to us. We also continue to discuss critical Measurement Protocol concepts on our blog so you can get closer to a universal understanding of user engagement, even when the tracking context presents specific challenges, such as limited connectivity for mobile app users (think cruise ship…).
You may have already had the chance to reference our Measurement Protocol Parameter Reference for required and optional parameters in a Measurement Protocol hit, but how can you actually verify that your Measurement Protocol hits are well-formed as you’re writing them into your coding logic?
Use the Google OAuth 2.0 Playground to validate any HTTP request, including the measurement protocol hits. Google OAuth Playground will validate if the hit is valid or not. A hit is valid if:
Very easy to use, the Google OAuth Playground confirms and reports all the needed information about the hit, including extra details that could be helpful for developers, including request headers and get or post request method.
To validate a Measurement Protocol hit using Google OAuth Playground:
We forgot to specify a valid tid parameter, that is, a Google Analytics property ID. Let’s try again with a valid tid parameter:
Verifying and Filtering Measurement Protocol Data in the Google Analytics View
You may still want to verify directly in Google Analytics that your Measurement Protocol data has been recorded. In a Google Analytics property that is recording data through Measurement Protocol and other mechanisms (such as gtag.js), you’ll need to use filters and segments to isolate your Measurement Protocol data.
If you populate the ds parameter in your Measurement Protocol hit, you can segment or filter based on the Data Source dimension:
If you don’t send the ds parameter with your Measurement Protocol hit, you can filter and segment based on any unique parameter or custom dimension that you do send.
Another of our previous blog posts considered Integrating the User Journey with Google Analytics: Three Offline Business Cases. What about a tracking scenario that is offline in the sense that the user is interacting with a mobile app on a device that may be suffering from spotty internet access?
Queue Time (qt) is an optional parameter, but it can be really useful for the purposes of:
Queue Time: Record a Measurement Protocol Hit with the Time of Interaction Rather than the Time of Hit Send
Queue Time can be critical for reliable tracking in that mobile app scenario (if you’re using Measurement Protocol to track a non-iOS or non-Android mobile app, for example). As a few specific considerations for queue time:
Also, using the Google Analytics batch (https://www.google-analytics.com/batch) endpoint, instead of the collect (https://www.google-analytics.com/collect) endpoint, in addition to the Queue Time parameter, will give more control over the sending order because you can send up to 20 hits at a time per batch request with 16k bytes as maximum payload.
One challenge that the E-Nor engineering team faced was tracking user interaction with an app that was likely to be used aboard ships.
Measurement Protocol with Apps for Android, iOS, and Operating Systems
The tracking steps included:
For instance, the Measurement Protocol hit below would record a user interaction as having occurred 88 minutes – or 5,280,000 milliseconds – before the time of good connectivity at which the hit is sent:
What if the user is offline for more than four hours?
Have questions about measurement strategy? Contact us today.
Analytics Consultant - Implementation An enthusiastic advocate for “Work harder but smarter”, Morsi believes that there is always a solution for any dilemma, “Whatever it takes” is his go-to response in any challenge. Java certified, holding a CIW Master degree in Web Design and 10+ years of extensive experience in web development, UI and usability. In addition to Google Analytics and Google Analytics APIs, Morsi delivers unique exquisite solutions to our client’s needs.
Google announced on April 23 that it will again delay third-party cookie deprecation (3PCD) in…
Funnel reports have long been one of the most actionable reports in a marketing analyst’s…
GA4’s Monetization reports provide organizations with simple but actionable views into the revenue-generating aspects of…
This website uses cookies.