-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to make v 2.0.0 working #62
Comments
Hi. To debug this, i logged all request parameters. GoogleAnalyticsResponse response = ga.event().---.send();
Map<String, String> parameters = response.getRequestParams(); Then, i replayed the request with exact same parameters and values on GA debug endpoint Work done on PR #61 will introduce new features to validate and debug hits. |
That is exactly an issue. Request with the same parameters goes ok if send from the Debug endpoint also returns no issues |
|
Is there any documentation about the expected Adding the header solved the issue to me too, but I can't find documentation about it, not even the |
My observations so far:
The following is the cURL command I used for testing: curl -X POST \
https://www.google-analytics.com/collect \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'User-Agent: PostmanRuntime/7.20.1' \
-d 'de=UTF-8&t=event&v=1&ea=VERIFY_EMAIL&ec=Tests&tid=UA-XXXXXXXXX-1&cid=97b964f2-4a72-47cd-ad19-4ce7d8f24784' |
It seems like GA filters events which it thinks is coming from bots. And for some reason, calls coming from this library is assumed to be from a bot.
I did option 2 to get this to work for me. Something like this fixed it for me - ga.event().userAgent("custom").send(). Based on this SO question. |
I can`t get events to appear in google analytics. Everything works fine when I send requests from Postman.
Here is my configuration
No error logs nor exceptions
Maven dependency
The text was updated successfully, but these errors were encountered: