Store referrers from android apps
Changes
Overall task is figuring out if we can separate the Google Discover referral source from Google (the search engine). Some sources say that the referrer android-app://com.google.android.googlequicksearchbox is Google Discover but other sources say different things. I want to check our actual data to see which bloggers are most correct.
We currently only store referral sources with http and https protocol in the URI. With this change we'll also be storing referrers with android-app:// protocol. This will allow me to correlate this referrer data with proprietary numbers from Google Search Console to see if the number of visitors is similar.
Tests
- [x] Automated tests have been added
- [ ] This PR does not require tests
Changelog
- [x] This PR does not make a user-facing change
Documentation
- [x] This change does not need a documentation update
Dark mode
- [x] This PR does not change the UI
Some sources say that the referrer android-app://com.google.android.googlequicksearchbox is Google Discover but other sources say different things. I want to check our actual data to see which bloggers are most correct.
Could you link to these sources for future reference?
This one says it's definitely android-app://com.google.android.googlequicksearchbox: https://www.cueblocks.com/blog/how-to-optimize-track-google-discover-in-google-analytics/
This one says it's more complicated: https://valentin.app/discover-tracking.html
It seems we should we start storing the referrer_protocol as well - otherwise impossible to distinguish them from web traffic.
I was on the fence about maybe storing these with the protocol. I've added it now, although it's in the same referrer field instead of a separate field for the protocol
Didn't have a quick way of testing this locally - so take my approval with a grain of salt. The tests speak for themselves though :+1:
Just to double-check, I'm assuming imports are out of scope of this change, for now at least, right?
Correct. This change is irrelevant for imports.
More context for future reference: https://github.com/plausible/analytics/discussions/1337