-
Notifications
You must be signed in to change notification settings - Fork 169
Separate Purchase event tracking for Pixel and CAPI #3616
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
Open
iodic
wants to merge
10
commits into
main
Choose a base branch
from
feature/separate-purchase-event-tracking
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… don't get blocked
…roper deduplication
📦 Latest Plugin BuildBuilt at: 2025-09-26T09:46:18.126Z Download: Click here to download the plugin To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact |
9dd9e3e
to
66f1466
Compare
8588663
to
ada781c
Compare
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This changeset updates Purchase event tracking so we can fire the Pixel and CAPI events independently while retaining deduplication with the Event ID. Tracking is now separated by using meta data to determine if the Purchase event is tracked by browser or server side (
META_PURCHASE_TRACKED_BROWSER
andMETA_PURCHASE_TRACKED_SERVER
). Because of possible race conditions with the meta data (conflicts with other plugins and payment gateways) after checking the meta data of the order a transient is also used for additional checks. The transient key is scoped by order ID and event source (browser or server), acting as a short-lived session flag that prevents the same Purchase event from being tracked multiple times across concurrent processes.We also clean up unused metadata and transients related to tracking Purchase events.
Type of change
Checklist
Changelog entry
Separate Purchase event tracking for Pixel and CAPI
Test Plan
After installing the plugin, connect to MBE and go through the website to make a purchase: the expected outcome is to see 1 Pixel and 1 CAPI
Purchase
event per order made on the website.