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

feat(cdp): only load site_destinations conditionally #1619

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

MarconLP
Copy link
Member

@MarconLP MarconLP commented Dec 18, 2024

Changes

requires: PostHog/posthog#27027

  • only load site_destinations with consent
  • save campaign and referrer properties in memory before consent has been given (context)
  • site destinations will be loaded if .opt_in_capturing() is being called at a later point
  • updated the nextjs example to call opt_in_capturing & opt_out_capturing based on the cookie banner (link)
  • the opt_in_capturing() function will call posthog.set_config({})

TODO:

  • update tests

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Dec 19, 2024 9:40am

Copy link

github-actions bot commented Dec 18, 2024

Size Change: +6.26 kB (+0.19%)

Total Size: 3.23 MB

Filename Size Change
dist/array.full.es5.js 262 kB +653 B (+0.25%)
dist/array.full.js 366 kB +626 B (+0.17%)
dist/array.full.no-external.js 364 kB +626 B (+0.17%)
dist/array.js 179 kB +621 B (+0.35%)
dist/array.no-external.js 178 kB +621 B (+0.35%)
dist/main.js 180 kB +621 B (+0.35%)
dist/module.full.js 366 kB +626 B (+0.17%)
dist/module.full.no-external.js 364 kB +626 B (+0.17%)
dist/module.js 179 kB +621 B (+0.35%)
dist/module.no-external.js 178 kB +621 B (+0.35%)
ℹ️ View Unchanged
Filename Size
dist/all-external-dependencies.js 206 kB
dist/customizations.full.js 12.6 kB
dist/dead-clicks-autocapture.js 14.4 kB
dist/exception-autocapture.js 9.48 kB
dist/external-scripts-loader.js 2.48 kB
dist/recorder-v2.js 115 kB
dist/recorder.js 115 kB
dist/surveys-preview.js 57.6 kB
dist/surveys.js 63.3 kB
dist/tracing-headers.js 1.76 kB
dist/web-vitals.js 10.4 kB

compressed-size-action

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.

1 participant