Skip to content

Commit

Permalink
Added google analytics for user checking of the project
Browse files Browse the repository at this point in the history
  • Loading branch information
Kumungchi committed May 19, 2024
1 parent ef8e6e9 commit 28f8447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<link rel="icon" href="favicon.ico" type="image/x-icon">
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-analytics.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.12.0/firebase-firestore.js"></script>
<script type="module" src="script.js" defer></script> <!-- Adding defer to ensure it loads after HTML -->
</head>
<body>
Expand Down
2 changes: 2 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Import Firebase modules from CDN
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.12.0/firebase-app.js";
import { getAnalytics, logEvent } from "https://www.gstatic.com/firebasejs/10.12.0/firebase-analytics.js";
import { getFirestore, collection, getDocs, updateDoc, increment, arrayUnion, doc, getDoc } from "https://www.gstatic.com/firebasejs/10.12.0/firebase-firestore.js";

// Firebase configuration
Expand All @@ -15,6 +16,7 @@ const firebaseConfig = {

// Initialize Firebase and Firestore
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
const db = getFirestore(app);

let currentWordIndex = 0;
Expand Down

0 comments on commit 28f8447

Please sign in to comment.