Open
Description
Creating an issue here for tracking purposes and in case someone else has found a solution to this problem.
[REQUIRED] Describe your environment
- Operating System version: NA
- Browser version: Chrome, Edge
- Firebase SDK version: 7.21.0
- Firebase Product: Analytics (auth, database, storage, etc)
Steps to reproduce:
Events --> screen_view --> Filter by Stream = Web --> User engagement table --> Select screen nameWhat happens is, Firebase is always only registering in the Dashboard the screen_name as the page title in browser, instead of using the screen_name set in the code:
In DebugView:
In Dashboard:
-->
Relevant Code:
Our JS implementation to import:
<script>
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "XXXXXX",
authDomain: "XXXXXX",
databaseURL: "XXXXXX",
projectId: "XXXXXX",
storageBucket: "XXXXXX",
messagingSenderId: "XXXXXX",
appId: "XXXXXX",
measurementId: "XXXXXX",
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
window.firebaseAnalytics = firebase.analytics();
</script>
Our JS implementation to track each screen:
function firebaseTrack(data, event = "screen_view") {
if (window.firebaseAnalytics) {
firebaseAnalytics.logEvent(event, data);
}
}
firebaseTrack({ screen_name: "My bookings" });