Google Analytics is a powerful analytics platform that is optimized for tracking and reporting on website activity. Occasionally, there are instances where an organization wants to track information via Google Analytics cannot be easily tracked by either the standard Google Analytics tracking code or customized Google Tag Manager implementations (e.g. tracking behavior outside of a user’s browser, thereby not allowing Google Analytics or Google Tag Managers JavaScript to run client-side). In these cases, the Measurement Protocol may be appropriate.
The Measurement Protocol allows you to send arbitrary Google Analytics data to a specific Google Analytics property through Post messages. This provides a great degree of flexibility on how the Measurement Protocol can be implemented with everything from single or batched cURL commands through more complex scripting using a programming language of your choice (e.g. PHP, Python, etc.).
In the article, Danny Mawani Holmgaard outlines several potential use cases for adjusting Google Analytics data using the Measurement Protocol (and includes workflows and examples for each):
- Correct missing eCommerce transactions
- Adjust duplicate eCommerce purchases, if you are using Google Analytics to report revenue
- Send eCommerce refund data to Google Analytics
- Update user status from your CRM
The article also notes several important caveats and considerations for implementing the Measurement Protocol:
- As Measurement Protocol inputs do not have access to Google Analytics user cookie information, it is recommended to either set up a new property for this data or use custom events and filtering to get the data into the correct view
- Make sure you uncheck bot filtering, as this can block Measurement Protocol hits from being sent to a property
- Keep data privacy in mind with your Measurement Protocol implementation, both from a data security perspective and a reporting perspective to make sure you remain in compliance for GDPR and any other relevant regulations
Sustainable SEO success is more often about consistent execution than technical tricks.
Add new comment