I know it’s not Kotlin related, but does someone u...
# android
d
I know it’s not Kotlin related, but does someone use a proxy like Charles, for testing Google Analytics 4 events? I have a problem that I can see the requests being sent to the
<http://ssl-google-analytics.com|ssl-google-analytics.com>
, but I cannot see the request body? Does GA4 intentionally hide this information for privacy reasons, or is there some extra option I have to enable? I also know that using proxy is not recommended way of validating GA4 events, but this requirement from the marketing team. 🤷‍♂️
g
It's a strange requirement, because you cannot really know when GA will send events, it creates batches If you want 100% check end to end, it's better to use Firebase analytics Debug View which shows all events received from particular client
Anyway, you can do this, you should configure ssl proxy with own certificate, google "Charles ssl proxy"
d
Yes, they are aware that events are sent in batches, but they still want to be able to inspect them using Charles. 🤷‍♂️
you should configure ssl proxy with own certificate, google “Charles ssl proxy”
I did that, that’s the reason I’m able to see the requests in the first place. The problem is that I don’t see the request body (event name, parameters, etc.). It’s the same on the iOS side. That’s why I’m assuming that GA4 intentionally hides this information for privacy reasons, but I didn’t find anything in the GA4 documentation that confirms that. They just say that it’s not recommended to use proxy, not that you cannot use proxy.
g
So what is content? Maybe it's just gzipped content?
But why do they want to do this in Charles? Really strange requirement
d
This is what I see in Charles:
And the error message that I see when I click on
<unknown>
says:
Copy code
SSL handshake with client failed: An unknown issue occurred processing the certificate (certificate_unknown)
However, I didn’t even see the requests before I added the certificate, so I wouldn’t say that the problem is in the certificate itself.
d
Yup, I added that. Never mind, I’ll keeping investigating this. Thanks for your help.
g
Maybe the domain is wrong in config?
d
I double checked everything. One thing I haven’t mentioned is that we don’t use GA directly, we use 3rd party library which reports events to google analytics. Maybe that could be the problem. 🤔
g
It doesn’t look like that, just as some Charles proxy
Do you have access to raw body response?
d
No. Actually, I think I don’t see requests at all. I should be able to see them in the Network Inspector in Android Studio as well, right? I guess the requests I saw in Charles sent to google analytics were from some other app.
g
I should be able to see them in the Network Inspector in Android Studio as well, right
No, I don’t think so
Network Inspector works not on level of network, it works on level of your application and only with HttpUrlConnection and OkHttp
What kind library do you use? Because I have feling that Firebase Analytics doesn’t even work through google-analytics.com and there is no google analytics outside of Firebase for Android
d
We use an internal library that simply serves as a wrapper around different analytics services.
g
But it uses Firebase/GA under the hood anyway
178 Views