Back to Community

Troubleshooting Duplicate and Incorrect Purchase Events in PixelYourSite

Content

Why Are My Facebook Ads Showing Double Purchases?

If you're using the 'PixelYourSite – Your smart PIXEL (TAG) & API Manager' plugin and seeing duplicate purchase events, incorrect values, or events firing on the wrong pages, you're not alone. This is a common issue reported by users that can severely skew your advertising data and Return on Ad Spend (ROAS). Based on community reports, this article explains why it happens and outlines the most effective troubleshooting steps.

Common Symptoms of the Problem

Users typically report one or more of the following issues:

  • Duplicate Purchase Events: A single order is recorded two or more times in Facebook Events Manager or Google Analytics.
  • Incorrect Event Values: A purchase of 37.50 EUR is recorded as 3750 EUR, often due to a decimal point formatting error.
  • Events Firing on Wrong Pages: The purchase event triggers on pages like order-pay instead of only on the order-received (thank you) page.
  • Random Retriggering: Old purchases reappear in event data days or weeks later with incorrect quantities or values.
  • Server vs. Browser Mismatch: A huge discrepancy between the number of server-side and browser-side events for actions like 'Add to Cart'.

Why Does This Happen?

Duplicate and incorrect events are rarely caused by a single factor. Instead, they are often the result of a combination of plugin configuration, theme/plugin conflicts, and caching. The most common root causes identified by the community are:

  • Caching Conflicts: Aggressive page caching, especially on critical pages like the checkout and order confirmation, can cause the browser to re-fire the pixel code when the page is served from cache.
  • Payment Gateway & Checkout Flow: Certain payment plugins or custom checkout flows can generate intermediate pages (e.g., order-pay) that inadvertently trigger the purchase event before the final confirmation.
  • Meta's Automated Matching: In some cases, Meta's own systems (like "automated events without code") might be creating a second, unwanted event, as mentioned in one thread.
  • Currency and Formatting: Multi-currency sites or formatting issues can lead to the value parameter being sent without the correct decimal place.
  • Plugin Conflicts: Other plugins, particularly those that modify WooCommerce data or JavaScript behavior, can interfere with how PixelYourSite fires events.

Step-by-Step Troubleshooting Guide

Step 1: Conduct a Basic Test and Inspection

Before making changes, confirm the issue.

  1. Use the Google Tag Assistant and Meta Pixel Helper browser extensions to see what events are firing on your pages during a test transaction.
  2. Check your Facebook Events Manager to compare the number of browser and server events for discrepancies.

Step 2: Configure Caching Properly (Critical Step)

This is the most common solution. You must exclude key pages and scripts from being cached.

  • Exclude Pages: In your caching plugin (e.g., WP Rocket, Litespeed), ensure the checkout, cart, and order-received pages are completely excluded from all types of caching (page, browser, JS).
  • Exclude Scripts: Also exclude any scripts containing the terms pys or PixelYourSite from delay and minification. One user also reported success by excluding window.pysWooProductData.
  • Clear All Caches: After making these changes, clear your website, server, and CDN caches completely.

Step 3: Verify PixelYourSite Settings

Ensure your plugin is configured to fire events precisely.

  • Navigate to the plugin's settings for WooCommerce.
  • Confirm that the "Fire the event on transaction only" option is enabled. This is designed to prevent the purchase event from firing more than once.
  • For value formatting issues, check if your theme or a currency switcher plugin is outputting a formatted price that the plugin misreads.

Step 4: Check for Meta's Automated System

As referenced in one thread, a video from the PixelYourSite team suggests checking Meta's Business Settings for an option called "automated events without code" or similar, which might be generating duplicate events independently of the plugin. If found, this feature should be disabled.

Step 5: Identify Plugin and Theme Conflicts

  1. Temporarily switch to a default WordPress theme (like Twenty Twenty-Four) and see if the problem persists.
  2. Deactivate all plugins except for WooCommerce and PixelYourSite. If the issue is resolved, reactivate your other plugins one-by-one to identify the culprit. Pay special attention to payment gateway, funnel builder, and optimization plugins.

When to Seek Further Help

If the problem continues after following these steps, the issue may be more complex. The 'PixelYourSite – Your smart PIXEL (TAG) & API Manager' team often requests that users perform a test transaction and provide the exact URL of the order confirmation page for deeper investigation. You can contact them through their official website for specific guidance.

Remember, accurate tracking is essential for managing ad spend. Taking the time to resolve these issues will provide cleaner data and better campaign performance.

Related Support Threads Support