Search code examples
google-analyticsmeasurement-protocol

Measurement protocol Usage


I am completely new to the Google Analytics Measurement protocol.

Trying to fetch the results and load it in iframe of an registered tid domain.

My query string looks something like this:

http://www.google-analytics.com/collect?v=1&tid=UA-XXX-1&cid=555&t=pageview&dp=%2Fauth"

But i get the response as : GIF89aÿÿÿÿ,D;

What am I doing anything wrong? I also tried passing domain name with it and its title. Still no success.

And also do I need to call this get or post from the origin domain or can I do it from Postman-Rest client?


Solution

  • I think your having an issue with understanding what the Measurement Protocol is.

    You said:

    Trying to fetch the results and load it in iframe of an registered tid domain.

    What the measurement protocol is for:

    Measurement Protocol Overview The Google Analytics Measurement Protocol allows developers to make HTTP requests to send raw user interaction data directly to Google Analytics servers.

    The measurement protocol is for sending hits to Google Analytics, If you want to get your Google Analytics data out you use the Reporting API

    Response

    The response you are getting back from the measurement protocol is good it means it recorded your message. GIF89aÿÿÿÿ,D;