Skip to content

Commit

Permalink
Add index exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashishkebab committed Mar 4, 2024
1 parent 7f0c3a9 commit 8e5a946
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@ const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

var pageName = window.location.pathname.split("/").pop();
if(pageName == ""){
pageName = "index";
}

alert(`${pageName}_visited`);
logEvent(analytics, `${pageName}_visited`);

0 comments on commit 8e5a946

Please sign in to comment.