From 5c7545f32a0b88700c976388ca5a944b9b7b75c2 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Wed, 10 Sep 2025 17:38:52 +0200 Subject: [PATCH] cleanup --- .../client/src/components/group-plans/taskInformation.vue | 2 +- website/client/src/components/payments/successModal.vue | 2 +- website/client/src/libs/analytics.js | 5 +---- website/client/src/mixins/payments.js | 2 +- website/client/src/mixins/scoreTask.js | 2 +- website/client/src/router/index.js | 2 +- website/client/src/store/actions/tasks.js | 2 +- 7 files changed, 7 insertions(+), 10 deletions(-) diff --git a/website/client/src/components/group-plans/taskInformation.vue b/website/client/src/components/group-plans/taskInformation.vue index 1e49b5c5c3..56e936f67b 100644 --- a/website/client/src/components/group-plans/taskInformation.vue +++ b/website/client/src/components/group-plans/taskInformation.vue @@ -445,7 +445,7 @@ export default { hitType: 'event', mirror: newVal, group: this.group._id, - }, { trackOnClient: true }); + }); const groupsToMirror = this.user.preferences.tasks.mirrorGroupTasks || []; if (newVal) { // we're turning copy ON for this group groupsToMirror.push(this.group._id); diff --git a/website/client/src/components/payments/successModal.vue b/website/client/src/components/payments/successModal.vue index 9504b4dc29..077f1d75b9 100644 --- a/website/client/src/components/payments/successModal.vue +++ b/website/client/src/components/payments/successModal.vue @@ -546,7 +546,7 @@ export default { eventCategory: 'behavior', demographics: this.upgradedGroup.demographics, type: this.paymentData.group.type, - }, { trackOnClient: true }); + }); } this.paymentData = {}; this.$root.$emit('bv::hide::modal', 'payments-success-modal'); diff --git a/website/client/src/libs/analytics.js b/website/client/src/libs/analytics.js index b60d40a3d7..2ba51a5de8 100644 --- a/website/client/src/libs/analytics.js +++ b/website/client/src/libs/analytics.js @@ -4,9 +4,6 @@ import pick from 'lodash/pick'; import Vue from 'vue'; import getStore from '@/store'; -const DEBUG_ENABLED = import.meta.env.DEBUG_ENABLED === 'true'; -const IS_PRODUCTION = import.meta.env.NODE_ENV === 'production'; - const REQUIRED_FIELDS = ['eventCategory', 'eventAction']; function _getConsentedUser () { @@ -59,7 +56,7 @@ function _gatherUserStats (properties) { if (user.purchased.plan.planId) properties.subscription = user.purchased.plan.planId; } -export function track (properties, options = {}) { +export function track (properties) { const user = _getConsentedUser(); if (!user) return; // Use nextTick to avoid blocking the UI diff --git a/website/client/src/mixins/payments.js b/website/client/src/mixins/payments.js index ccdb4a9599..1abac64026 100644 --- a/website/client/src/mixins/payments.js +++ b/website/client/src/mixins/payments.js @@ -215,7 +215,7 @@ export default { eventCategory: 'behavior', demographics: appState.newGroup.demographics, type: appState.newGroup.type, - }, { trackOnClient: true }); + }); } } catch (err) { console.error('Error while redirecting to Stripe', err); // eslint-disable-line diff --git a/website/client/src/mixins/scoreTask.js b/website/client/src/mixins/scoreTask.js index d6580b8161..7137098e08 100644 --- a/website/client/src/mixins/scoreTask.js +++ b/website/client/src/mixins/scoreTask.js @@ -66,7 +66,7 @@ export default { uuid: user._id, taskType: task.type, direction, - }, { trackOnClient: true }); + }); if (!tasksScoredCount) { setLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT, 1); } else { diff --git a/website/client/src/router/index.js b/website/client/src/router/index.js index 0f23f2afe0..4dae2b1b7d 100644 --- a/website/client/src/router/index.js +++ b/website/client/src/router/index.js @@ -296,7 +296,7 @@ router.beforeEach(async (to, from, next) => { eventName: 'View Find Members', eventAction: 'View Find Members', eventCategory: 'behavior', - }, { trackOnClient: true }); + }); } // Redirect old guild urls diff --git a/website/client/src/store/actions/tasks.js b/website/client/src/store/actions/tasks.js index e6fe10e488..9219926982 100644 --- a/website/client/src/store/actions/tasks.js +++ b/website/client/src/store/actions/tasks.js @@ -120,7 +120,7 @@ export async function create (store, createdTask) { hitType: 'event', uuid, taskType: taskRes.type, - }, { trackOnClient: true }); + }); if (!tasksCreatedCount) { setLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT, 1); } else {