Skip to content

Commit

Permalink
update www/src/js/firebase.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianjnuwu committed Jan 13, 2025
1 parent 9976690 commit 0c3ef7c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions www/src/js/firebase.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.23.0/firebase-app.js";

import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.23.0/firebase-analytics.js";
import { getAnalytics, logEvent } from "https://www.gstatic.com/firebasejs/9.23.0/firebase-analytics.js";

const app = firebase.initializeApp({
apiKey: "AIzaSyBLkMv2N_cnG6q-9spUj01wvxRnfWSr6XY",
Expand All @@ -14,4 +14,9 @@ const app = firebase.initializeApp({

const analytics = getAnalytics(app);

console.log(analytics);
logEvent(analytics, 'device_info', {
device: navigator.userAgent,
platform: navigator.platform,
screen_resolution: `${window.screen.width}x${window.screen.height}`,
language: navigator.language
});

0 comments on commit 0c3ef7c

Please sign in to comment.