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?
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.
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!
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With