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

builderVisitorId cookie cannot be disabled when using RenderContent #1606

Closed
n4bb12 opened this issue Jan 5, 2023 · 4 comments
Closed

builderVisitorId cookie cannot be disabled when using RenderContent #1606

n4bb12 opened this issue Jan 5, 2023 · 4 comments
Assignees

Comments

@n4bb12
Copy link

n4bb12 commented Jan 5, 2023

Describe the bug
It's not possible to disable tracking cookies using RenderContent.

To Reproduce
Steps to reproduce the behavior:

  1. Set up your SDK as per https://www.builder.io/c/docs/integrating-builder-pages (for me, it's sdk-svelte but the SDK doesn't seem to matter)
  2. Use RenderContent and disable tracking: <RenderContent ... canTrack={false} />

Expected behavior
No builder.io cookies should be set.

Additional context
I identified the problem to be this line:

The expression always evaluates to true regardless of the value of props.canTrack since false || true is true.

If the intention was to enable tracking by default, the code would have to be props.canTrack !== false for example, right?

Or if the intention was to convert it to a boolen, it would have to be Boolean(props.canTrack) or !!props.canTrack or similar.

@n4bb12 n4bb12 changed the title builderVisitorId cookie cannot be disabled when using sdk-svelte builderVisitorId cookie cannot be disabled Jan 5, 2023
@n4bb12 n4bb12 changed the title builderVisitorId cookie cannot be disabled builderVisitorId cookie cannot be disabled when using RenderContent Jan 5, 2023
@mrkoreye
Copy link
Collaborator

@samijaber can you please investigate?

@mrkoreye mrkoreye assigned samijaber and unassigned adamdbradley Jan 12, 2023
@samijaber
Copy link
Contributor

@n4bb12 Thank you for being so thorough, this is probably the most helpful bug report I've received in a while!

@samijaber
Copy link
Contributor

@n4bb12 This is now fixed on SDK version 0.1.1.

@n4bb12
Copy link
Author

n4bb12 commented Jan 13, 2023

Thanks!

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

No branches or pull requests

4 participants