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 (@jitsu/js): Add support for tracking additional cookies via cookieCapture config #1153

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

dmeremyanin
Copy link
Contributor

This PR introduces a new optional cookieCapture property to allow tracking of additional cookies beyond the default ones.

The following cookies were already being tracked by default before this change:

  • Facebook: _fbc, _fbp
  • Google Analytics 4: GA4 client ID.

The cookieCapture property allows to specify a custom list of cookies to track. It accepts a Record<string, string>, where the keys are cookie names and the values are their corresponding values.

Example usage:

window.jitsuConfig = {
  cookieCapture: {
    ttp: "_ttp", // Custom cookie to capture
  }
};

Related discussion: #1109 (comment)

@dmeremyanin
Copy link
Contributor Author

Hey @vklimontovich, just wanted to make sure you saw this PR (and the others). We’d really love to see this change in upstream. Please let me know if you have any questions or need any changes. Thanks

@dmeremyanin dmeremyanin force-pushed the jitsu-js-cookie-capture branch from 6c24949 to be33fae Compare December 14, 2024 09:55
@absorbb absorbb self-requested a review December 17, 2024 07:18
@absorbb absorbb merged commit dd2a5e6 into jitsucom:newjitsu Dec 17, 2024
0 of 3 checks passed
@dmeremyanin
Copy link
Contributor Author

@absorbb thanks for the merge! I've seen errors from Prettier in the main branch and will investigate them now.

@dmeremyanin
Copy link
Contributor Author

Fixed formatting errors in #1159.

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