analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Store referrers from android apps

Open ukutaht opened this issue 7 months ago • 4 comments

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

ukutaht avatar Jan 22 '24 16:01 ukutaht

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?

macobo avatar Jan 22 '24 18:01 macobo

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

ukutaht avatar Jan 23 '24 10:01 ukutaht

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:

macobo avatar Jan 23 '24 10:01 macobo

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.

ukutaht avatar Jan 25 '24 11:01 ukutaht

More context for future reference: https://github.com/plausible/analytics/discussions/1337

ukutaht avatar Mar 21 '24 20:03 ukutaht