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

Feature: Enhance Tracking by Storing gclid, fbclid, and UTM Parameters in Cookies and Preventing Non-Search Key Capture #1109

Open
robert1112 opened this issue Jun 20, 2024 · 1 comment
Assignees

Comments

@robert1112
Copy link

Current Behavior

  1. Cookie Capture: Currently, Jitsu captures the __fbc, __fbp, and __ga cookies and places them under “clientIds” in the JSON event data. However, gclid and fbclid are not captured.
  2. UTM Data: UTM data is captured from URL parameters but does not persist after navigating to another page.

Suggested Improvement

1.Storing gclid and fbclid: Store gclid and fbclid in cookies, allowing them to be overwritten if new values are present. Currently, they are only URL parameters and are not stored as cookies in the browser. Jitsu should capture gclid and fbclid from cookies and save them under “clientIds” in the JSON event data.
2.Persisting UTM Data: Capture UTM data from the URL and store it in cookies. Jitsu should read UTM data from these cookies.
3.Preventing Non-Search Key Capture: For WordPress sites, ensure that non-search keys are not captured as search keys. Specifically, the ?s parameter key should be handled correctly.

Reasons for Improvements

  1. Enhanced Audience Matching and Performance Tracking: Storing gclid and fbclid in cookies will improve Google and Facebook audience matching and performance tracking.
  2. Ad Blocker Circumvention: When ad blockers are enabled, the __fbc, __fbp, and __ga cookies are not generated because Google and Facebook tracking scripts are blocked. However, gclid and fbclid can still be captured from URL parameters, ensuring data is still collected.

Shot 2024-06-18 at 21 49 17 (1)

@vklimontovich
Copy link
Contributor

We probably won't store utm_* parameters in cookie. We generally consider polluting cookies as a bad idea, especially considering the fact that cookies are becoming less reliable.

You could always persist utm's by anonymousId key in the store


Speaking of gclid / fbclid. Here's a design we think makes sense here:

  • Introduce clickIds node and populate it with most popular click ids: gclid and fbclid
  • Introduce two parameters for JS client: clickIdsCapture and cookieCapture to let user control what additional cookies / parameters to capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants