Understanding and Fixing Event Deduplication Issues with PixelYourSite
Content
If you're using the 'PixelYourSite – Your smart PIXEL (TAG) & API Manager' plugin, you might have encountered a common yet confusing problem: events from your browser and server not being deduplicated correctly in Facebook's Event Manager. This can lead to inflated event counts and inaccurate campaign data. Let's break down why this happens and the most effective ways to resolve it.
What is Event Deduplication and Why Does It Matter?
Deduplication is a crucial process where Facebook pairs a browser-side event with its corresponding server-side (CAPI) event using a unique Event ID. When working correctly, Facebook processes these as a single event, preventing double-counting and ensuring your analytics are accurate. When it fails, you see duplicate entries, skewing your data.
Why Isn't Deduplication Working?
Based on common community reports, here are the primary culprits:
- Caching Conflicts: This is the most frequent cause. Caching plugins (like LiteSpeed, WP Rocket, NitroPack, or FlyingPress) can cache the Event ID generated by PixelYourSite. If the same Event ID is served to multiple users, Facebook cannot use it for proper deduplication, as each event pair requires a unique ID.
- Plugin Conflicts: Page builders like Thrive Architect or Elementor can sometimes cause the plugin's configuration object (
pysOptions) to output multiple times on a single page, each with a different Event ID, creating confusion. - Testing Anomalies: Some users report that during initial testing with a fresh browser (cookies cleared), deduplication might not occur on the very first page load but works correctly on subsequent refreshes. This can be part of Facebook's system initialization.
- Mixed Pixel Implementations: Running PixelYourSite alongside a manually installed Facebook pixel code will always result in duplicates, as the manual code does not generate the Event IDs necessary for the plugin's CAPI events to deduplicate against.
How to Troubleshoot and Fix Deduplication Problems
1. Verify the Event ID is Unique
The first step is to check if the Event ID is changing. Open your website in an incognito or private browser window. Right-click, select "View Page Source," and search for eventID. Refresh the page several times. The long string of numbers and letters after eventID should be different every time. If it stays the same, your caching is too aggressive.
2. Configure Your Caching Plugin
You must exclude PixelYourSite's scripts from being cached. The specific settings vary by plugin, but generally, you need to add exclusions for scripts containing these strings:
pys.jspys.min.jspysEvent.jspysOptions(this JavaScript variable)fbevents.js(Facebook's script)
3. Use the Plugin's Built-in Admin-Ajax Option
PixelYourSite includes a setting specifically designed to bypass caching. Enabling the admin-ajax option forces the plugin to send CAPI events through WordPress's admin-ajax.php endpoint, which is typically not cached. You can find this setting on the plugin's main settings page. Be aware that this can increase server load, so monitor performance.
4. Check for Conflicts with Page Builders
If you use a page builder and see duplicate pysOptions variables in your page source, try disabling the builder's specific asset optimization or script handling features to see if the issue resolves. A conflict may require reaching out to the page builder's support for assistance.
5. Ensure a Single Pixel Source
For deduplication to work, you must let PixelYourSite manage the entire pixel implementation. Remove any manually inserted Facebook pixel code from your theme or other plugins. Using both will guarantee duplicate events.
6. Test Properly
Use Facebook's Test Events tool. Perform tests across multiple page loads, not just the first visit. Remember that it can take 24-48 hours for data to fully populate in Facebook's Event Manager for analysis.
When All Else Fails
If you've tried all the steps above and deduplication still fails, the issue could be related to a very specific server configuration or a temporary bug with Facebook's systems. Consistently unique Event IDs are the foundation of the process; if they are unique and deduplication still isn't happening, the matching logic is handled solely by Facebook.
By methodically working through these common issues, you can usually identify and resolve the obstacle preventing proper event deduplication, leading to cleaner, more reliable data for your advertising campaigns.
Related Support Threads Support
-
Events with same eventID are not being deduplicatedhttps://wordpress.org/support/topic/events-with-same-eventid-are-not-being-deduplicated/
-
Duplicated pysOptions in Thrive Architect pageshttps://wordpress.org/support/topic/duplicated-pysoptions-in-thrive-architect-pages/
-
Advanced programmatic event triggers?https://wordpress.org/support/topic/advanced-programmatic-event-triggers/
-
Grab events id variables for CAPIhttps://wordpress.org/support/topic/grab-events-id-variables-for-capi/
-
Facebook Lead has Low Event Match Qualityhttps://wordpress.org/support/topic/facebook-lead-has-low-event-match-quality/
-
Event manager warningshttps://wordpress.org/support/topic/event-manager-warnings/
-
False event duplicateshttps://wordpress.org/support/topic/false-event-duplicates/
-
Improve data update ratehttps://wordpress.org/support/topic/improve-data-update-rate/
-
Send user data keys from elementor form in landing pagehttps://wordpress.org/support/topic/send-user-data-keys-from-elementor-form-in-landing-page/
-
Deduplication Issuehttps://wordpress.org/support/topic/deduplication-issue/
-
event id with pixel codehttps://wordpress.org/support/topic/event-id-with-pixel-code/
-
Duplicate Form Eventshttps://wordpress.org/support/topic/duplicate-form-events/
-
Some events aren’t tracked server, but only browserhttps://wordpress.org/support/topic/some-events-arent-tracked-server-but-only-browser/
-
Difference between Signal and Leadhttps://wordpress.org/support/topic/difference-between-signal-and-lead/
-
Click Event Trackinghttps://wordpress.org/support/topic/click-event-tracking/
-
Event ID Deduplication issuehttps://wordpress.org/support/topic/event-id-deduplication-issue/
-
Why events count is morehttps://wordpress.org/support/topic/why-events-count-is-more/
-
Pixelyoursite is duplicating events.https://wordpress.org/support/topic/pixelyoursite-is-duplicating-events/
-
About events triggered by FBhttps://wordpress.org/support/topic/about-events-triggered-by-fb/
-
A little confused over variation trackinghttps://wordpress.org/support/topic/a-little-confused-over-variation-tracking/
-
TIKTOK Event ID dosen’t change after Page Refreshhttps://wordpress.org/support/topic/tiktok-event-id-dosent-change-after-page-refresh/
-
External_ID not loading on some pageshttps://wordpress.org/support/topic/external_id-not-loading-on-some-pages/
-
Events duplicated and value without commahttps://wordpress.org/support/topic/events-duplicated-and-value-without-comma/
-
Deduplication not happening in first loadhttps://wordpress.org/support/topic/deduplication-not-happening-in-first-load/
-
Missing Facebook Server Eventshttps://wordpress.org/support/topic/missing-facebook-server-events/
-
CAPI sending hundreds of fake ATC events dailyhttps://wordpress.org/support/topic/capi-sending-hundreds-of-fake-atc-events-daily/
-
Download and Video Trackinghttps://wordpress.org/support/topic/download-and-video-tracking/
-
Can’t add more than 1 url triggers forhttps://wordpress.org/support/topic/cant-add-more-than-1-url-triggers-for/
-
Two Page View Eventshttps://wordpress.org/support/topic/two-page-view-events/
-
No deduplicationhttps://wordpress.org/support/topic/no-deduplication/
-
Performance Issues due to admin-ajax.phphttps://wordpress.org/support/topic/performance-issues-due-to-admin-ajax-php/
-
getEventId() cant be called in functions.phphttps://wordpress.org/support/topic/geteventid-cant-be-called-in-functions-php/
-
Woo Events as “Custom event”https://wordpress.org/support/topic/woo-events-as-custom-event/
-
Problem with multiple eventshttps://wordpress.org/support/topic/problem-with-multiple-events/
-
Unable to delete Pixelyoursite events from Events managerhttps://wordpress.org/support/topic/unable-to-delete-pixelyoursite-events-from-events-manager/
-
Duplicate event trackinghttps://wordpress.org/support/topic/duplicate-event-tracking/
-
Event Match Quality score missinghttps://wordpress.org/support/topic/event-match-quality-score-missing/
-
saveExternalIDInOrder error loghttps://wordpress.org/support/topic/saveexternalidinorder-error-log/
-
Geolocation support?https://wordpress.org/support/topic/geolocation-support-4/
-
About Event Activityhttps://wordpress.org/support/topic/about-event-activity/
-
Event URLhttps://wordpress.org/support/topic/event-url-3/