Comparing version 1.5.0 to 1.6.0
{ | ||
"name": "zmp-ga4", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Nguyễn Hồng Phát", |
@@ -79,3 +79,3 @@ "use strict"; | ||
}) | ||
}); | ||
})["catch"](); | ||
_this.eventQueue = []; | ||
@@ -92,7 +92,10 @@ } | ||
var handleLocationChange = function () { | ||
_this.trackEvent("page_view", { | ||
page_path: location.pathname, | ||
page_params: location.search, | ||
page_title: document.title | ||
}); | ||
var paths = location.pathname.split("/"); | ||
setTimeout(function () { | ||
_this.trackEvent("page_view", { | ||
page_path: paths.length > 1 ? paths[paths.length - 1] : paths[0], | ||
page_params: location.search, | ||
page_title: document.title | ||
}); | ||
}, 0); | ||
}; | ||
@@ -99,0 +102,0 @@ handleLocationChange(); |
@@ -26,7 +26,10 @@ export class AdaptiveAnalytics { | ||
const handleLocationChange = () => { | ||
this.trackEvent("page_view", { | ||
page_path: location.pathname, | ||
page_params: location.search, | ||
page_title: document.title, | ||
}); | ||
const paths = location.pathname.split("/"); | ||
setTimeout(() => { | ||
this.trackEvent("page_view", { | ||
page_path: paths.length > 1 ? paths[paths.length - 1] : paths[0], | ||
page_params: location.search, | ||
page_title: document.title, | ||
}); | ||
}, 0); | ||
}; | ||
@@ -134,3 +137,3 @@ handleLocationChange(); | ||
} | ||
); | ||
).catch(); | ||
this.eventQueue = []; | ||
@@ -137,0 +140,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17276
361