clarity
clarity copied to clipboard
How to stop clarity tracking conditionally?
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.
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.