Skip to content

Commit

Permalink
fix: push page view
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 31, 2025
1 parent 7c905a0 commit 13cdec2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/js/utils/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export const acceptGa4 = () => {
personalization_storage: 'granted',
});
gtag('config', 'G-3SYTZ509HY');

// Google Analytics 4
gtag('event', 'page_view', {
page_location: window.location.href,
page_path: window.location.pathname,
page_title: document.title,
});
};

export const rejectGa4 = () => {
Expand Down

0 comments on commit 13cdec2

Please sign in to comment.