capacitor-community / capacitor-community/firebase-analytics

[QUESTION] setScreenName to URL / Path?

Open
#122 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
178
Forks
70
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.