Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Measurement protocol not working for mobile app

I am trying to send data about screenview in my account Google Analytics, using measurement protocol. But i don't see data in the Real Time reports. string request:

http://www.google-analytics.com/collect?v=1&tid=UA-55175445-4&cid=666&t=screenview&an=HelloWorld

where is a problem?

like image 900
Nikolay Avatar asked Sep 30 '14 18:09

Nikolay


People also ask

How does measurement protocol work?

The Google Analytics Measurement Protocol allows developers to make HTTP requests to send raw user interaction data directly to Google Analytics servers. This allows developers to measure how users interact with their business from almost any environment.

Should I use Google Analytics 4?

While it might be intimidating and hard to use, it's clear that GA4 is the future of Analytics, and you should be prepared for that. That said, there's no reason you can't run a Universal Analytics property at the same time to get all the benefits of both. In fact, we recommend running both!

What is an example of a hit Google Analytics?

Each time the tracking code is triggered by a user's behavior (for example, user loads a page on a website or a screen in a mobile app), Analytics records that activity. Each interaction is packaged into a hit and sent to Google's servers. Examples of hit types include: page tracking hits.


2 Answers

I had same problem and apparently if you're using mobile app version of analytics you have to send application name (an) and application id (aid), otherwise the hit is ignored.

like image 102
Ficik Avatar answered Nov 11 '22 06:11

Ficik


Here are some bullets you might want to consider.

1) Make sure that you are using google universal. (How?)

2) For new google analytics accounts it will take up to 48 hours until you can start using the measurement protocol.

3) Make sure you are setting the User-Agent with the request

4) Make sure cid is a random UUID (version 4) as described in http://www.ietf.org/rfc/rfc4122.txt

like image 21
Tobias Nyholm Avatar answered Nov 11 '22 07:11

Tobias Nyholm