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

[QUESTION] setScreenName to URL / Path? #122

Open
Schwankenson opened this issue Jul 27, 2022 · 1 comment
Open

[QUESTION] setScreenName to URL / Path? #122

Schwankenson opened this issue Jul 27, 2022 · 1 comment

Comments

@Schwankenson
Copy link

Hi,

I`m using firebase analytics in my Web / Native iOs / Native Android App. Now I would like to set the same screen name for all platforms, to have it in the same row in Analytics reports.

How would you do this? Does this code make sense to you? It`s only the path. The host and protocol could differ on the native apps.

let screenName = window.location.href.replace(window.location.origin, "")
FirebaseAnalytics.setScreenName({
    screenName: screenName;
})

Should I add a prefix, to make sure that it is the path based screen name, and not the page location?

let screenName = "Path: " + window.location.href.replace(window.location.origin, "")

What do you think?

@Schwankenson
Copy link
Author

Schwankenson commented Aug 23, 2022

This stackoverflow seems to log screen view for web apps also: How to track page view with Firebase Analytics in a web, single page app?

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

1 participant