android-browser-helper icon indicating copy to clipboard operation
android-browser-helper copied to clipboard

In chrome os the referrer is empty

Open alex2844 opened this issue 6 years ago • 13 comments

chrome os: 80.0.3987.76 beta androidbrowserhelper: 1.1.0

alex2844 avatar Feb 01 '20 17:02 alex2844

@dominickng FYI

andreban avatar Feb 02 '20 08:02 andreban

Thanks, we're aware of this issue and are looking to implement a fix.

Andre, do you know if TWAs have a specific referrer on Android?

dominickng avatar Feb 10 '20 09:02 dominickng

I believe the referer should be something like android-app://com.mytwa.app or something similar.

PEConn avatar Feb 10 '20 09:02 PEConn

What @PEConn said, wherecom.mytwa.app is the package-name for the TWA.

andreban avatar Feb 10 '20 10:02 andreban

@PEConn / @andreban - We rely on this to separate our mWeb vs TWA analytics. Since when this is broken? This was working on custom tabs client?

rockeynebhwani avatar Feb 10 '20 11:02 rockeynebhwani

@rockeynebhwani this seems to be the case on Chrome OS only. On Android, the referrer is working as intended.

andreban avatar Feb 10 '20 11:02 andreban

@andreban yes, it is the case on Chrome OS only. Everything is ok with Android.

alex2844 avatar Feb 10 '20 17:02 alex2844

@andreban - Did anything change in Chrome 81? Referrer post Chrome 81 is "android-app://com.app.george/" for our app. Before Chrome 80, it used to be "android-app://com.app.george"

A '/' has appeared at the end.

rockeynebhwani avatar Jul 08 '20 22:07 rockeynebhwani

@rockeynebhwani is this on Chrome OS only or on Android as well?

andreban avatar Jul 09 '20 08:07 andreban

@andreban - This is for Android. I just checked for our site, we have neither "android-app://com.app.george/" OR "android-app://com.app.george" as referrer for 'Chrome OS' visits

rockeynebhwani avatar Jul 09 '20 10:07 rockeynebhwani

@andreban - We are seeing theses referrers in Adobe Analytics but these are not appearing in Google Analytics at all. Are you aware of anything which will stop flowing these referrers in Google Analytics?

rockeynebhwani avatar Jul 09 '20 10:07 rockeynebhwani

@rockeynebhwani Sorry, I got confused as this issue is about the Chrome OS referrer. I was not aware of the change. @PEConn may know more.

Having said that, I do think the change is for the better - It allows developers to check for the referrer using referrer.startsWith('android-app://com.app.george/') instead of referrer === 'android-app://com.app.george', allowing extra information to be added to referrer without breaking the check (without the ending /, the startsWith check is broken, as an app called 'android-app://com.app.georges' would be included.

I'd recommend creating a separate issue for this if you have further questions / discussion, as this is off-topic from the original issue.

andreban avatar Jul 09 '20 11:07 andreban

@andreban - It's not a problem as we managed to change our segment in Adobe but we didn't see any announcement about this in Chrome 81 and it took some time for us to figure this out... Regarding Google Analytics issue, we are still investigating and if we need help, I will create a new issue.

rockeynebhwani avatar Jul 09 '20 11:07 rockeynebhwani