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

Add Suffix to User-Agent or Referrer with the version of the TWA #823

Open
ghnp5 opened this issue Aug 27, 2023 · 1 comment
Open

Add Suffix to User-Agent or Referrer with the version of the TWA #823

ghnp5 opened this issue Aug 27, 2023 · 1 comment

Comments

@ghnp5
Copy link

ghnp5 commented Aug 27, 2023

At the moment, the only way I am aware of that we can pass the version of the TWA app I have, is through the Start URL, adding something like /?twa=123

However, if a user accesses the app through opening a Push Notificaiton, or a link from another app/browser, that opens a specific page or so, then the version will not be passed anywhere.

URL: /specific-page
Referrer: android-app://com.mytwa
User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36

It would be nice if we could add a suffix to the current User-Agent, so we could add the version, e.g.:

User-Agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36 TWA/123

Or to the Referrer:

Referrer: android-app://com.mytwa+v123

So we could have a reliable way of knowing what version the user is on.

Thank you!

@ghnp5 ghnp5 changed the title Add Suffix to User-Agent or Referrer Add Suffix to User-Agent or Referrer with the version of the TWA Aug 27, 2023
@jalalaghazadeh
Copy link

same as above I need to add query-params to launcherUrl (like google-ad-id and referrer id) but the is an redundent '/' (https://app.example.com/?gps_adid=null&referrer=null).

Any update on this one?

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

No branches or pull requests

2 participants