refactor(index.html): update production tracking ID logic
- Simplified the logic for determining the production tracking ID by removing the check for the 'worklenz.com' hostname. - Ensured that the tracking ID is now solely based on the 'app.worklenz.com' hostname, streamlining the analytics loading process.
This commit is contained in:
@@ -43,9 +43,7 @@
|
|||||||
// Use requestIdleCallback to defer analytics loading
|
// Use requestIdleCallback to defer analytics loading
|
||||||
const loadAnalytics = () => {
|
const loadAnalytics = () => {
|
||||||
// Determine which tracking ID to use based on the environment
|
// Determine which tracking ID to use based on the environment
|
||||||
const isProduction =
|
const isProduction = window.location.hostname === 'app.worklenz.com';
|
||||||
window.location.hostname === 'worklenz.com' ||
|
|
||||||
window.location.hostname === 'app.worklenz.com';
|
|
||||||
|
|
||||||
const trackingId = isProduction ? 'G-XXXXXXXXXX' : 'G-3LM2HGWEXG'; // Open source tracking ID
|
const trackingId = isProduction ? 'G-XXXXXXXXXX' : 'G-3LM2HGWEXG'; // Open source tracking ID
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user