Developers can now send data from MoEngage to Google Analytics tool using our Connectors via GA Measurement Protocol.
Google Analytics Measurement Protocol allows developers to make HTTP requests to send raw user interaction data directly to Google Analytics servers. This in turn enables developers to measure how users interact with their business from almost any environment. Developers can then use the Measurement Protocol to:
- Measure user activity in new environments.
- Tie online to offline behavior.
- Send data from both the client and server.
The base url to make the API Request is http://www.google-analytics.com/collect with Request Type as POST.
You can read more details here about the parameters that can be used with Google Measurement Protocol.
Say you want to track an event on Google Analytics, the sample URL params are:
The used keys represent:
ec - Event Category Name
ea - Event action name
el - Event Label
ev - Event Value
The resulting URL will be: http://www.google-analytics.com/collect?v=1&tid=UA-12345678-9&cid=545432&t=event&ec=samplecategory&ea=sampleaction&el=samplelabel&ev=1234 .
You can copy this directly and paste in Webhook URL field of MoEngage Connector campaign and change and test as per your use case.