Skip to content

Commit

Permalink
fix: peer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aswathy-deriv committed Oct 30, 2024
1 parent 82b07f5 commit 22d4c6d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions public/scripts/analytics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,18 @@ const cacheTrackEvents = {
let pageViewInterval = null;

pageViewInterval = setInterval(() => {
const clientInfo = cacheTrackEvents.parseCookies("client_information");
const signupDevice =
cacheTrackEvents.parseCookies("signup_device")?.signup_device;

if (
typeof window.Analytics !== "undefined" &&
typeof window.Analytics.Analytics?.pageView === "function" &&
cacheTrackEvents.isReady()
) {
window.Analytics.Analytics.pageView(window.location.href, {
loggedIn: !!window.parseCookies(
document.cookie,
"client_information"
),
device_type: signupdevice,
loggedIn: !!clientInfo,
device_type: signupDevice,
});
}

Expand Down

0 comments on commit 22d4c6d

Please sign in to comment.