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

How to stop clarity tracking conditionally? #535

Open
M7m00d opened this issue Feb 18, 2024 · 1 comment
Open

How to stop clarity tracking conditionally? #535

M7m00d opened this issue Feb 18, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@M7m00d
Copy link

M7m00d commented Feb 18, 2024

I am working on a React/Next.js project and I have some sensitive user-pages that I want to stop Clarity to track them.

I call this before redirecting the user to the sensitive page

window.clarity('stop')

And call this when the user leaves the page.

window.clarity("consent");
window.clarity("start", {
projectId: CLARITY_ID_HERE,
upload: "https://m.clarity.ms/collect",
track: true,
content: true,
cookies: [],
});

The stop call works well, but the start snippet doesn't resume or restart the interaction tracking.

Am I missing something here?
Also, what's the difference between pause, stop, resume, pause, and start? I couldn't find a reference for them in the documentation.

@M-Valentino
Copy link

M-Valentino commented Apr 3, 2024

I'm thinking stop just ends the recording. To me it makes the most sense to use pause and resume instead to avoid recording sensitive info.

It does sound like the documentation needs improving. Using the words stop, resume, pause, and start is kind of confusing to me I will say since I was thinking about how a DVD player worked. Maybe Microsoft should rename stop to endRecording if that is what stop is supposed to do, because the word 'stop' almost implies you can 'go' at a later point.

@AbdelrhmanMagdy AbdelrhmanMagdy added the documentation Improvements or additions to documentation label Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants