Track What Matters: Custom Pixel Events with PixelYourSite MCP

PixelYourSite lets you track any visitor action and send it to every ad platform at once. With an AI assistant connected via MCP, you describe what you want and it builds the event configuration, shows a preview, and waits for your confirmation. These seven examples show what you can build in a two-minute conversation. There is also a section at the end on using your AI assistant alongside Meta Ads MCP to analyse your ad account and propose what you should be tracking.

Get expert tracking tips in your inbox

Join 65,000+ marketers and site owners who already get our best guides on Meta Pixels, CAPI, GA4, Google Ads, TikTok & Pinterest tracking, GDPR, and more.

* We don’t spam, and all our emails have an “Unsubscribe” link that works. 

PixelYourSite is the most flexible pixel tracking plugin for WordPress. Custom events let you track any visitor action, scope it to specific pages and audiences, and send the signal to every ad platform at the same time: Facebook, Google Ads, TikTok, Pinterest, Bing, Reddit, and GA4 in one event definition.

You can configure all of this manually in the WordPress admin. This guide is about doing it faster, using an AI assistant. Connect Claude, ChatGPT, Gemini, or any MCP-compatible client to your site via PixelYourSite MCP, describe what you want, and the assistant builds the event, shows you a preview, and waits for your confirmation. A 20-minute configuration job becomes a two-minute conversation. Or skip the examples entirely and ask your assistant to analyse your ad account and propose what you should be tracking — more on that at the end of this guide.

The seven examples below showcase what is possible with PixelYourSite’s triggers, conditions, and AND logic. They are not a definitive list. Every site is different, and the best events for yours depend on your funnel, your traffic sources, and what you are trying to optimise for. Describe your situation to your AI assistant and work through the options together before building anything. These examples are a starting point.

Each example includes the exact thing to say, how the event works, what it gives you, and how to verify it.

To follow this guide you need PixelYourSite MCP connected to your site. See Getting Started with PixelYourSite MCPfor setup instructions.


High-value paid visitor still researching

What to say: “Create a custom event called HighValuePaidVisitor. Fire it on Facebook and Google Ads when a visitor has been to my site at least 3 times total, is currently on my pricing page, and originally arrived from paid search with utm_medium=cpc. Once per visitor.”

How it works:

The assistant builds three checks that all must pass at the same time.

Trigger: number_page_visit with contains yoursite.com, set to equal_or_larger 3. PYS tracks every page load on your site per visitor across all sessions, stored permanently by IP address. The trigger becomes active when the count reaches 3 or more, whether those visits happened today or over the past month.

Condition 1: url_filters contains /pricing. The event only fires when the visitor is currently on the pricing page.

Condition 2: landing_page param_contains utm_medium=cpc. PYS stores the original landing URL when the visitor first arrives and keeps it for the entire session. This condition checks whether they came from paid search, even if they have since navigated through several other pages.

Conditions logic: AND. Fire frequency: once per visitor.

What you get:

A visitor who clicked your paid ad, returned to your site at least twice more on their own, and is now on your pricing page. Facebook does not know how many times this person has visited your site. Google does not know they are on your pricing page. You know both. Retarget this audience with a direct offer or a demo invitation. They already know your brand.

How to verify:

Open PixelYourSite → Events and check that the trigger shows your domain with equal_or_larger 3 and that both conditions are listed with AND logic. To test: visit your site at least 3 times in the same browser, then arrive from a URL with ?utm_medium=cpc and go to the pricing page. Check your pixel helper.


Contact form submission with a custom event name

What to say: “Create a custom event for my contact form. It is a Contact Form 7 form on my /contact page. Send it to Facebook as ContactFormSubmitted and to Google Ads and GA4 as generate_lead. Fire every time.”

How it works:

Most WordPress contact forms use AJAX. The form submits without redirecting to a thank-you page, so a standard page_visit trigger never fires. PYS form plugin triggers fire on the actual form submission at the PHP level, regardless of redirect or AJAX.

The assistant reads the available CF7 form IDs on your site, asks which one to use, adds a URL condition scoped to /contact so other forms on the site do not fire this event, and assigns different event names per platform: ContactFormSubmitted on Facebook to keep it separate from other lead sources, and generate_lead on Google Ads and GA4 for native optimisation.

Supported plugins: Contact Form 7, WPForms, Gravity Forms, Ninja Forms, Fluent Forms, Forminator, and others.

What you get:

Reliable contact form tracking that works on AJAX forms, sent to all platforms with the right event name for each. Google Ads and GA4 get a standard event they can optimise for. Facebook gets a custom name you can use to build specific audiences and conversions.

How to verify:

Submit a test contact form. The event fires immediately without any page reload. Check Facebook Test Events for ContactFormSubmitted and GA4 DebugView for generate_lead.


CTA button click on the pricing page

What to say: “Create a custom event called PricingCTAClick on Facebook and Google Ads. Fire when someone clicks the main CTA button on my pricing page. The button has the CSS class .cta-button.”

How it works:

The assistant combines a static trigger with a dynamic one, using AND logic.

Trigger 1: page_visit /pricing. PYS confirms the visitor is on the pricing page when the page loads.

Trigger 2: css_click .cta-button. The JS layer then waits for a click on that CSS selector.

The event fires only when both are true on the same page. A click on that button anywhere else on the site does not trigger it. A visit to the pricing page without a click does not trigger it.

What you get:

A stronger intent signal than a pricing page view alone. These visitors read the page and decided to act. Building campaigns or lookalike audiences from this event gives the platform a more meaningful signal than page visits.

How to verify:

Visit your pricing page and click the CTA button. Your pixel helper shows PricingCTAClick. Click the same button on a different page and confirm nothing fires.


Returning visitor on a key page

What to say: “Create a custom event called ReturningResearcher on Facebook and TikTok. Fire when a visitor has been to my site at least 3 times total and is currently on my pricing page. Once per visitor.”

How it works:

Trigger: number_page_visit with contains yoursite.comequal_or_larger 3. The counter is permanent and cross-session, tracked by IP address for guests and by user ID for logged-in users. Every page load on the site increments it.

Condition: url_filters contains /pricing. The event fires only when the returning visitor is currently on the pricing page.

Fire frequency: once per visitor.

What you get:

Visitors who returned to your site voluntarily at least twice. They are researching. Serving them different ads from first-time visitors, with a more direct message, is a straightforward segmentation improvement.

How to verify:

Visit your site 3 or more times in the same browser, then go to the pricing page. Your pixel helper shows ReturningResearcher. On a first visit to the pricing page, nothing fires.


Paid traffic reaching a key page

What to say: “Create a custom event called PaidPricingView for Facebook and Google Ads. Fire when a visitor who arrived from paid search with utm_medium=cpc lands on my pricing page.”

How it works:

Trigger: page_visit /pricing.

Condition: landing_page param_contains utm_medium=cpc. PYS stores the visitor’s original landing URL for the entire session. Even if they navigated from the home page to the pricing page, this condition still holds. Adapt the UTM value to match your actual campaign setup: paidpaid_social, or whatever you use.

What you get:

A segment of paid visitors who reached your pricing page. Build a retargeting audience from this group, separate from organic and direct visitors. Compare their conversion rate to all pricing page visitors to understand your paid traffic quality.

How to verify:

Visit your pricing page from a URL that includes ?utm_medium=cpc. Your pixel helper shows PaidPricingView. Visit the pricing page without the UTM parameter and confirm nothing fires.


Engaged content reader

What to say: “Create a custom event called ContentReader on Facebook and TikTok. Fire when someone scrolls to 75% of a blog post. Once per visitor.”

How it works:

Trigger 1: post_type post. PYS confirms the visitor is on a blog post type.

Trigger 2: scroll_pos 75%. The JS layer fires when they reach 75% scroll depth.

AND logic: PYS confirms the post type on page load, then waits for the scroll event. Does not fire on pages, products, or any other post type.

What you get:

A retargeting audience of visitors who actually read your content, not just landed on it. Readers respond better to retargeting than general blog visitors, at lower cost.

How to verify:

Open a blog post and scroll to the bottom. ContentReader fires after 75%. Open a page or product and scroll fully: nothing fires.


Lead magnet download as Lead

What to say: “Create a custom event for my free guide download. The file is at /downloads/free-guide.pdf on my /resources page. Send it to Facebook as a Lead event and to Google Ads and GA4 as generate_lead. Once per visitor.”

How it works:

Trigger: url_click contains /downloads/free-guide.pdf. Fires when the visitor clicks the specific file link.

Condition: url_filters contains /resources. Scoped to the page where the download lives.

PYS’s automatic download event fires on any file matching your configured extensions across the whole site and uses a generic Download event name. This custom event targets a specific file, uses the standard Lead/generate_lead event name that platforms optimise for natively, and fires once per visitor.

What you get:

A lead signal for your specific lead magnet, separate from all other file downloads. Facebook and Google Ads can optimise for it and build audiences from it directly.

How to verify:

Visit the resources page and click the download link. Your pixel helper shows Lead on Facebook and generate_lead on Google Ads and GA4. The automatic Download event fires too: both are expected and do not conflict since they have different names.


AI traffic to a key page

What to say: “Create a custom event called AITrafficLead on Facebook and GA4. Fire when a visitor who came from ChatGPT, Perplexity, Claude, or Gemini reaches my contact page.”

How it works:

Trigger: page_visit contains /contact.

Conditions with OR logic: source contains chatgpt.comsource contains perplexity.aisource contains claude.aisource contains gemini.google.com.

PYS stores the referring domain in a cookie when the visitor first arrives. A visitor who came from ChatGPT and then navigated to the contact page still has chatgpt.com as their recorded source. The OR logic means any of the four sources qualifies.

What you get:

AI-referred traffic is growing. This event builds an audience of visitors sent by AI assistants who reach your contact page. You can retarget them, build lookalikes, and compare their conversion rate to other sources.

How to verify:

After arriving at your site from a known AI referral, check the pysTrafficSource cookie in your browser developer tools. Navigate to the contact page and confirm AITrafficLead fires in your pixel helper.


Let your AI assistant propose the events

The examples above assume you already know what you want to track. There is another approach: connect your AI assistant to both PixelYourSite MCP and Meta Ads MCP at the same time, and ask it to analyse your current tracking and suggest what is missing.

With both connected, the assistant can read your Meta pixel event match quality, check which custom audiences lack enough signal, look at which conversion events are underperforming, and cross-reference that against your current PixelYourSite configuration. From there it can propose specific custom events tailored to your actual gaps, not generic examples.

The conversation might start with: “Look at my Meta ad account and my PixelYourSite setup. What custom events should I be tracking that I am not tracking yet?”

The assistant reviews both sides and comes back with a prioritised list based on your real data. You discuss, refine, and then build the agreed events directly in the same session.

This is a different way of working. Instead of knowing the answer and asking the assistant to implement it, you use the assistant to find the answer. The examples in this guide are a starting point for understanding what is possible. A session like this produces a strategy built around your specific site, your specific traffic, and your specific ad account.

Meta Ads MCP is available at https://mcp.facebook.com/ads. Add it as a custom connector in Claude or ChatGPT, sign in with your Meta Business account when prompted, and it is ready to use alongside PixelYourSite MCP in the same conversation.

Don’t stop here!

Subscribe to get more tips on tracking, analytics, and GDPR.

We’ll send you practical guides on Meta Pixel, CAPI, GA4, Google Ads, TikTok, Pinterest, GDPR compliance, and more, right to your inbox.

* We don’t spam, and all our emails have an “Unsubscribe” link that works. 

EDD Tracking Audit with Claude, ChatGPT via PixelYourSite MCP

Before launching a campaign for your EDD store, one conversation with Claude, ChatGPT, or Gemini is enough to verify your tracking is solid. Pixel ID, CAPI, advanced matching, funnel events, content IDs, EDD feed. Fix what needs fixing, then launch with confidence.

WooCommerce Tracking Audit with Claude, ChatGPT via PixelYourSite MCP

Before launching a campaign, one conversation with Claude, ChatGPT, Gemini, or any MCP-compatible AI assistant is enough to verify your WooCommerce tracking is solid. Pixel ID, CAPI, advanced matching, funnel events, content IDs, catalog feed. Fix what needs fixing, then launch with confidence.

Track What Matters: Custom Pixel Events with PixelYourSite MCP

PixelYourSite lets you track any visitor action and send it to every ad platform at once. With an AI assistant connected via MCP, you describe what you want and it builds the event configuration, shows a preview, and waits for your confirmation. These seven examples show what you can build in a two-minute conversation. There is also a section at the end on using your AI assistant alongside Meta Ads MCP to analyse your ad account and propose what you should be tracking.

Find out when we have the next BIG OFFER!

Over 70 000 business-owners have access to our BIG DISCOUNTS. Don't miss the next one: