Skip to main content

Migrating from PixelYourSite: Recreate the Advanced Marketing Events in the Pixel Manager

· 5 min read
Aleksandar Vucenovic
Chief Growth Officer

A shop owner recently wrote to our support while switching from PixelYourSite to the Pixel Manager for WooCommerce:

"We had the Advanced Marketing Events active and made audiences based on them, and after that, lookalikes. These audiences were dynamically populated based on the advanced event. Now our ads environment remains without these audiences and events. Can we somehow replicate or migrate them over?"

Short answer: yes, all of them, with one small code snippet. And you don't even have to write it yourself, because our chatbot will write it for you.

What the Advanced Marketing Events are

PixelYourSite ships a feature called Advanced Marketing Events: a set of custom events that fire on the purchase confirmation page when a customer crosses a certain threshold, so you can segment buyers by quality rather than just by action:

  • FirstTimeBuyer: the customer's first purchase
  • ReturningCustomer: the customer has bought before
  • FrequentShopper: at least X transactions (e.g. 2)
  • VIPClient: at least X transactions and an average order value of at least Y (e.g. 200)
  • BigWhale: a lifetime value of at least X (e.g. 5,000)

These events are popular for a good reason: they make excellent seeds for Meta custom audiences and lookalikes. A lookalike built from VIPClient buyers usually outperforms one built from all purchasers, and excluding ReturningCustomer from new-customer campaigns saves wasted spend.

The Pixel Manager intentionally doesn't ship these as toggles. Every shop defines "VIP" differently, so instead of a fixed list of switches, the Pixel Manager exposes a small API that can express any segment, including all five PixelYourSite events with the exact thresholds you had configured.

How it works in the Pixel Manager

Two building blocks are all you need:

  1. The Pixel Manager emits a pmw:purchase browser event on the purchase confirmation page (once per order, duplicate prevention included).
  2. The function pmw.trackCustomFacebookEvent("EventName", custom_data) sends any custom event to Meta. If Meta CAPI is enabled in the pro version, it automatically goes out server-side too.

The full snippet calculates the customer's transaction count, average order value and lifetime value from their WooCommerce order history, then fires every segment event the customer qualifies for. The pattern looks like this:

window._pmwq = window._pmwq || [];
window._pmwq.push(function () {
jQuery(document).on("pmw:purchase", function () {

// Values calculated in PHP from the customer's order history
var custom_data = {
transaction_count: 3,
aov : 240.50,
ltv : 721.50,
};

pmw.trackCustomFacebookEvent("ReturningCustomer", custom_data);
pmw.trackCustomFacebookEvent("FrequentShopper", custom_data);
pmw.trackCustomFacebookEvent("VIPClient", custom_data);
});
});

The complete, copy-paste-ready snippet for functions.php, including the PHP that computes the thresholds, lives in our documentation:

👉 Replicate PixelYourSite's Advanced Marketing Events

A nice bonus over the original: each event carries transaction_count, aov and ltv as custom data, so you can build Meta audience rules on the values themselves (e.g. ltv > 10000) instead of being locked to the thresholds you picked at install time.

In Meta, your audiences then populate dynamically going forward, exactly like before. (Past purchases can't be backfilled through pixel events. That limitation applied to PixelYourSite as well.)

We didn't write that code. Our chatbot did.

Here's the part that makes this migration genuinely easy: the snippet in our docs is, almost character for character, what our chatbot produced when we gave it this prompt:

please create me custom events for functions.php that are sent to facebook using the following information

…followed by the content of PixelYourSite's Advanced Marketing Events documentation page, pasted as context.

That's the whole trick. The chatbot knows the Pixel Manager's API, so it translated "FrequentShopper fires when the client has at least 2 transactions" into working code on the first try.

This generalizes well beyond PixelYourSite. If you're migrating from any tracking plugin and there's a custom event you miss, paste that plugin's documentation into the chatbot and describe what you want. It will tailor the thresholds, add segments the original plugin never offered (LapsedCustomer? SecondPurchase?), or send the same events to GA4 and other platforms.

Wrapping up

Switching tracking plugins shouldn't mean losing the audiences that drive your best campaigns. With the Pixel Manager's custom event API, the PixelYourSite Advanced Marketing Events take a few minutes to recreate, and our chatbot writes the code for you.

If you're still weighing the switch, our in-depth comparison of the Pixel Manager and PixelYourSite covers the rest of the picture. And if you hit anything during your migration, our support is happy to help.

Interested to get updates?

Sign up to our monthly newsletter today.