Skip to content

fix(analytics): meta ids not forwarded through checkout#2471

Merged
dev-rb merged 3 commits intomainfrom
rahul/fix-analytics-forward-meta-ids-to-stripe
Apr 9, 2026
Merged

fix(analytics): meta ids not forwarded through checkout#2471
dev-rb merged 3 commits intomainfrom
rahul/fix-analytics-forward-meta-ids-to-stripe

Conversation

@dev-rb
Copy link
Copy Markdown
Contributor

@dev-rb dev-rb commented Apr 9, 2026

No description provided.

@dev-rb dev-rb requested review from a team as code owners April 9, 2026 18:39
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3cdd8f4e-8208-474a-a688-84377c117027

📥 Commits

Reviewing files that changed from the base of the PR and between acf6a1a and e6081b6.

⛔ Files ignored due to path filters (6)
  • js/app/packages/service-clients/service-auth/generated/schemas/checkoutSessionMetadata.ts is excluded by !**/generated/**
  • js/app/packages/service-clients/service-auth/generated/schemas/checkoutSessionMetadataFbc.ts is excluded by !**/generated/**
  • js/app/packages/service-clients/service-auth/generated/schemas/checkoutSessionMetadataFbp.ts is excluded by !**/generated/**
  • js/app/packages/service-clients/service-auth/generated/schemas/checkoutSessionMetadataGaClientId.ts is excluded by !**/generated/**
  • js/app/packages/service-clients/service-auth/generated/schemas/createCheckoutSessionRequest.ts is excluded by !**/generated/**
  • js/app/packages/service-clients/service-auth/generated/schemas/index.ts is excluded by !**/generated/**
📒 Files selected for processing (1)
  • js/app/packages/service-clients/service-auth/openapi.json

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Enhanced conversion attribution tracking during checkout. The system now captures additional Meta Pixel identifiers (fbp, fbc) alongside existing tracking data and sends them as consolidated metadata with checkout requests to improve analytics and attribution.

Walkthrough

Moves checkout conversion identifiers into a nested metadata object (containing gaClientId, fbp, fbc) across JS clients, the Rust authentication API request types, and Stripe webhook subscription tracking; updates payload construction, cookie parsing, and propagation of these fields into tracking tasks.

Changes

Cohort / File(s) Summary
JS: auth & stripe clients
js/app/packages/service-clients/service-auth/client.ts, js/app/packages/service-clients/service-stripe/client.ts
createCheckoutSession signature in service-auth now accepts metadata (with gaClientId, fbp, fbc) instead of top-level gaClientId. service-stripe adds getMetaIds() to read _fbp/_fbc cookies and passes { gaClientId, fbp, fbc } as metadata to auth client.
OpenAPI schema
js/app/packages/service-clients/service-auth/openapi.json
Added CheckoutSessionMetadata schema (gaClientId, fbp, fbc as `string
Rust: API request types
rust/cloud-storage/authentication_service/src/api/user/stripe.rs
Introduced CheckoutSessionMetadata struct (ga_client_id, fbp, fbc optional) and replaced ga_client_id in CreateCheckoutSessionRequest with a metadata field (#[serde(default)]). Server now builds metadata map from req.metadata.
Rust: Stripe webhook handling
rust/cloud-storage/authentication_service/src/api/webhooks/user/stripe_webhook.rs
Extracts fbp and fbc from Stripe subscription metadata, includes them in SubscriptionTrackingData, updates logging, and constructs MetaUserData with email, fbp, and fbc before spawning track_stripe_subscription.

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author. The PR objective indicates this is about fixing analytics by forwarding Meta IDs through checkout, which aligns with the changes shown in the raw summary (adding metadata with fbp, fbc, and gaClientId fields across multiple files). Add a description explaining the purpose of forwarding Meta IDs through the checkout process and how these changes enable better conversion attribution tracking.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format with 'fix:' prefix and clearly summarizes the main change: forwarding Meta IDs through checkout. It is under 72 characters (55 chars).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

@dev-rb dev-rb merged commit e02ef43 into main Apr 9, 2026
40 checks passed
@dev-rb dev-rb deleted the rahul/fix-analytics-forward-meta-ids-to-stripe branch April 9, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant