Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling activity tracking actions (close #1161) #1224

Merged

Conversation

igneel64
Copy link
Contributor

@igneel64 igneel64 commented Aug 8, 2023

Add disableActivityTracking and disableActivityTrackingCallback to disable the respective activity tracking and activity tracking callbacks from the tracker.

@igneel64 igneel64 force-pushed the feature/1161-allow-disabling-activity-tracking branch from 3d53351 to 05bd678 Compare August 8, 2023 09:27
@bundlemon
Copy link

bundlemon bot commented Aug 8, 2023

BundleMon

Files added (6)
Status Path Size Limits
libraries/browser-tracker-core/dist/index.mod
ule.js
+25.18KB 26KB / +10%
trackers/javascript-tracker/dist/sp.js
+24.12KB 25KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+14.8KB 15KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+14.64KB 15KB / +10%
libraries/tracker-core/dist/index.module.js
+13.35KB 15KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.51KB 5KB / +10%

Total files change +95.6KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

Copy link
Contributor

@matus-tomlein matus-tomlein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, this has been requested a lot!

window.clearInterval(callbackConfiguration?.activityInterval);
}

activityTrackingConfig.configurations[actionKey] = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering, should we also set activityTrackingConfig.enabled to false in case there are no more configurations left? From what I can tell it'd be more like a cosmetic change and not have much effect on anything (in which case do we really need the flag?), but wondering if you can see some reason to or considered it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enabled flag seems to be mostly used for the activity tracking at the start and between pageviews. It does not have control over the interval/timeouts of the actual pinging.

It was the first thing I tried 😄

Copy link
Contributor

@jethron jethron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igneel64 igneel64 changed the base branch from master to release/3.14.0 August 9, 2023 09:57
@igneel64 igneel64 merged commit 8c0261c into release/3.14.0 Aug 9, 2023
2 checks passed
@igneel64 igneel64 deleted the feature/1161-allow-disabling-activity-tracking branch August 9, 2023 12:07
@igneel64 igneel64 mentioned this pull request Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants