Skip to content
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

[firebase-analytics] Fix events on Android Expo Client #7679

Merged
merged 2 commits into from Apr 6, 2020

Conversation

IjzerenHein
Copy link
Contributor

Why

This PR fixes the recording of analytics events on certain Android devices.

How

Investigated which part of the http request was causing the problem and mitigated the problem by setting an explicit user-agent (to Expo/${version}). It was found that user-agent strings such as okhttp/3.12.1 get ignored by the Google /gccollect end-point.

Test Plan

  • Tested the new user-agent on physical iOS device (iPhone XR) and confirmed analytics events are recorded.
  • Tested the new user-agent on physical Android device (LG Q7) and confirmed analytics events are recorded.

image

@IjzerenHein
Copy link
Contributor Author

The fact that the particular user-agent was ignored/blocked could be a bad omen. Let's keep an eye on this.

@brentvatne brentvatne merged commit fa6f908 into master Apr 6, 2020
@brentvatne brentvatne deleted the @hein/expo-firebase/analytics-useragent-fix branch April 6, 2020 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants