Do you know how many people click the phone number on your website? Or how many open the WhatsApp chat, download your price list, land on the thank-you page after sending a request? With the custom events of My Agile Pixel® you can count these actions and tell Meta (Facebook and Instagram), Google Analytics 4 and TikTok about them: your campaigns learn from what visitors actually do, not just from the pages they see.
A custom event is exactly that: one action of the visitor that you choose. You decide when it fires, on which pages and how many times, and what to tell the platforms — My Agile Pixel translates it into the name each of them knows. And like everything else in the plugin, the event leaves from your server and only after the visitor has accepted the cookies in the banner (for example the one of My Agile Privacy®).
You start from the menu My Agile Pixel® → Custom events.

What you need before you start
- A license that includes the feature. Custom events are one of the paid features of My Agile Pixel: without the right license, instead of the page you see the presentation of the feature.
- The platforms configured. Events go to Meta, Google Analytics 4 and TikTok: if a channel is not configured yet, start from the Facebook pixel guide, from the one for Google Analytics 4 or from the TikTok pixel guide. You can also send one event only to some platforms: we get there at step 3.
- The cookie banner. Nothing leaves before consent: you need a banner the visitor accepts — for example My Agile Privacy® or your Consent Management Platform.
The quickest way: start from a template
In the “Your events” column you find the buttons “Create an event” and “Start from a template”. When you have no events yet, the list tells you and points you to the templates: “You have not created any events yet. The quickest way is to start from a template below: it opens already filled in, and you can change everything.”

Pick the case closest to yours: the event opens already filled in, and you can change everything before saving it.
- Click on the phone number — when someone taps your number to call you
- Click on the email address — when someone clicks your email address to write to you
- Click on WhatsApp — when someone opens the WhatsApp chat from your site
- Thank-you page — when someone lands on the “thank you” page after a request
- Click on a button — you pick the button by clicking it on your site
- Download of a PDF — when someone downloads a price list, a catalog, a document
- Reading to the end — when someone reads three quarters of a page
- Choice of a product variant — when someone picks the size or color of a product (WooCommerce; the template appears only when WooCommerce is active)
- Copy of the phone or email — when someone copies your number or address to use them later
- Click on “Copy code” — when someone presses the button that copies a discount code
- Start of a video — when someone starts a YouTube or Vimeo video, or one uploaded to your site
The three contact templates (phone, email, WhatsApp) all send the same event “Contact” and add one extra piece of information — contact_channel = phone, email or whatsapp — so you can tell them apart in the platforms.
On the right of the page you also find four help boxes: “What a custom event is”, “And the contact forms?”, “How do I check that it works?”, “Want to stop an event?”. They answer the most common questions in two lines each.

Creating an event, step by step
Open “Create an event”, or a template. Every event has a name and three steps: at step 1 you choose the action of the visitor that fires it, at step 2 the pages and how many times to count it, at step 3 what to tell the platforms. Step 4 sums it all up in one sentence, before saving. A site can have up to 50 events.

The name
“Give this event a name”, for example “WhatsApp at the bottom of the page”. The name is for you, to recognize the event in the list, but we also send it to the platforms, so you can tell two similar events apart: do not write people’s names or details in it (a name that looks like an email or a phone number is refused).

Step 1: when it should fire
“When should it fire?” asks you to choose what the visitor does: seven possible actions, one per event — we see them all in the next section. For the WhatsApp example: “Clicks a link” → “To a WhatsApp chat”. Under the choice, the page shows how such a link is written in the code of a page, with an example.

Step 2: on which pages, and how many times
First, the pages:
- “On every page of the site” — wherever the visitor does it.
- “Only on the pages whose address contains…” — a part of it is enough:
/blog/covers every blog post,/thank-youcoversyour-site.com/thank-you-quote/. You can add up to 10 lines: one match is enough. The parameters added by campaigns (utm_…,gclid,fbclid…) are ignored: a link with?utm_campaign=thank-youis not mistaken for the thank-you page. Be careful writing only/: with “contains” it would mean the whole site, and the page warns you. - “Only on one precise page” — write the address without the name of the site: for
your-site.com/contact/write/contact/; for the home page,/. The address is what you see at the top of the browser. An address of another website is refused.
On multilingual sites (WPML, Polylang) the language prefix and the translated addresses are part of the address: add one line per language.

Then, how many times to count it:
- “Every time” — ten clicks by the same visitor are ten events (a double click on the same element within one second counts once).
- “Once per page” — on the same page only the first time counts; if the visitor goes to another page and does it again, it counts again.
- “Once per visit” — only the first time, until the visitor closes the browser tab.
For “Opens a page” there is nothing to choose: every time the page opens counts once.

Step 3: what to tell the platforms
“What happened, in a word?”: pick the word closest to your action and we translate it into the name each platform knows. This way Meta, Google and TikTok understand which action it is and can use it to improve your campaigns.

- A contact (phone, email, chat) →
Contacton Meta,contacton Google Analytics 4,Contacton TikTok - A request for information or a quote →
Lead,generate_lead,Lead - A booking →
Schedule,schedule,Schedule - A sign-up to the site →
CompleteRegistration,sign_up,CompleteRegistration - A click on a button →
ClickButton,button_click,ClickButton - A file download →
Download,file_download,Download - A search for a location or directions →
FindLocation,find_location,FindLocation - A product customization (size, color…) →
CustomizeProduct,customize_product,CustomizeProduct - A text copied from the page →
CopyText,copy_text— TikTok does not receive it - A video started →
VideoPlay,video_play— TikTok does not receive it - A name I choose… → on Meta the name you write, on Google Analytics the same name in lowercase, on TikTok one of its events (or nothing)
Contact, request for information, booking and sign-up also count as a contact received (“lead”) in the Statistics and on the Dashboard of the plugin: the page tells you so when you choose them.
“A name I choose…” is the name you will see in Meta — in Events Manager, the panel where Meta shows the events it receives — and in Google Analytics. Use letters without accents, numbers and the underscore instead of spaces, at most 40 characters: for example catalog_request. Names already used by the store or by Google Analytics for their own counts (for example purchase, page_view, scroll) are refused, so the numbers do not mix.
“And for TikTok?”: TikTok accepts only its own events, with fixed names — an invented name would be thrown away. Choose the one closest to your action (Contact, ClickButton, Download, Lead, Schedule and the others), or do not send it there.

Below, “This is what each platform will receive” shows a preview with the exact names: no surprises.
“Who to send it to”: the checkboxes Meta, Google Analytics 4 and TikTok. Uncheck the platforms where you do not need this event. A platform switched off in the settings of My Agile Pixel shows “switched off in the settings”: it receives nothing even when checked; when you switch it back on, the checked events start reaching it.
“How much is it worth to you? (optional)”: if you know how much this action is worth on average, write it — a number between 0 and 1,000,000 and a three-letter currency (EUR, USD…). Example: if one request in five becomes a 100 € job, each request is worth about 20 €. Meta and Google use this number to understand which ads bring you more value. If you do not know, leave it empty.

“Extra information to send with the event (optional)”: up to 5 pieces of information, each with a name and a value. For example, with two WhatsApp buttons you can write department = sales on one and department = support on the other: in Meta you can then create a conversion just for sales. In Google Analytics, to see them in the reports, register them as custom dimensions (Admin → Custom definitions). TikTok does not receive them. And no personal data: names such as email, phone, name or address are refused, and so are values that look like an email or a phone number.
Step 4 and saving
“In plain words” sums the event up in a sentence that updates while you fill in the form: “When a visitor clicks a link to WhatsApp, on every page, once per page, My Agile Pixel® sends “Contact” to Meta (as Contact) and Google Analytics 4 (as contact), together with contact_channel = whatsapp”. If nothing would be sent, the sentence tells you so.

“Save the event”. If something is missing or wrong, the message appears under the buttons and the field to fix is highlighted. After saving you read: “Event saved. We also emptied the cache of the caching plugins we know, so the pages use the change at once. If your hosting or a service like Cloudflare keeps its own cache, empty that too.”
For the thank-you page event of the example, the sentence in plain words becomes this:

The seven things a visitor can do
The choices of step 1 are seven. Each event uses one: if you need two actions, create two events.

Opens a page
For example the thank-you page after a request. You can ask to count it only if the visitor stays a while: the seconds, from 0 to 600. With 0 it counts as soon as the page opens; with 30 you count only who stays at least half a minute. Only the time with the tab really visible counts. On which page to count it you choose at step 2.

Clicks an element
A button, an image, a box. You choose the element with “Choose on the page” — the visual picker, we see it shortly — or by writing its CSS selector by hand. “What do you call this element?” is a name only for you: you see it in the list and in the sentence in plain words.

And what is a CSS selector? It is the way web pages point at one precise element: a kind of address of the element inside the page. It reads like this: a dot followed by a name is a class (.quote-button = the elements with the class quote-button); a hash followed by a name is an id (#book = the element with id book). To find it: right-click the element on your site → “Inspect”, and look for class="…" or id="…".
One tip: in Elementor, Gutenberg or Divi give the element a CSS class of your own in its advanced settings (for example my-whatsapp) and write .my-whatsapp. The event keeps working even if you change theme. If the selector you wrote is not valid, the page tells you before saving.

Clicks a link
“Where does the link go?”. Under the menu, the page shows how a link of that type is written in the code, with an example ready to copy.
- To a phone number — only
tel:links count (<a href="tel:+390212345678">Call us</a>): aftertel:comes the number with the + and the country code, without spaces. - To an email address —
mailto:links: aftermailto:comes your email address. - To a WhatsApp chat —
wa.me/…,whatsapp:and links to whatsapp.com (for exampleapi.whatsapp.com/send?phone=…). They open a chat, not a call: a WhatsApp link does not count as “a phone number” even if it contains your number, and atel:link does not count as WhatsApp. If the WhatsApp button is a round box floating in a corner, added by a plugin, it may open the chat without a link: in that case choose “Clicks an element” and pick the button on your site. - To a file to download — the address ends with the extension of the file:
.pdf,.zip,.docx,.xlsx,.pptx,.mp3,.mp4and the like. Files uploaded to the Media library already have it. - To another website — any address of a site other than yours; links to your own site, with or without www, do not count.
- To an address that contains a text I choose — for example with
/book, the link toyour-site.com/book-a-visit/counts.
You do not need to write code: in the link field of your button or text (in Elementor, Gutenberg or Divi) write the part between the quotes after href=. And a click with the middle mouse button (open in a new tab) counts too.



Scrolls the page
“How far down the page must the visitor get?”: 25%, 50%, 75% or 90%. 75% means the visitor has seen three quarters of the page. Scrolling counts once per page: the “Every time” option is not offered here.

Changes a choice
The drop-down menu, the option or the checkbox (with the visual picker or the CSS selector). It works with WooCommerce product variants, including color and size swatches and the enhanced drop-downs (Select2). It counts only when a real visitor makes the choice.

Copies a text
“Any text on the page” or “Only the text inside a precise element” — for example the box with your phone number. The copied text is never read or sent: we only count that someone copied it. Copies made inside the fields of a form (the visitor copying their own email) do not count. A “Copy” button — for example “Copy code” — copies without the visitor selecting anything: for those use “Clicks an element” on the button. The “Click on ‘Copy code’” template does exactly this.

Starts a video
It works with YouTube, Vimeo and the videos uploaded to your site:
- a video counts when the visitor starts it, never when it starts by itself (for example a background video); pausing and starting it again does not count a second time;
- with “Every time” each video of the page counts once; with “Once per page” only the first video the visitor starts;
- a video blocked by the cookie banner counts when the visitor starts it, after accepting the cookies.
“Any video on the page” or “Only one video” with its code: youtube.com/watch?v=dQw4w9WgXcQ → write dQw4w9WgXcQ; vimeo.com/76979871 → 76979871; for a video uploaded to your site, the name of the file, for example presentation.mp4. A playlist or a channel is not a video.

To listen to YouTube videos, the plugin reloads them once when the page has loaded (only after the visitor has accepted the cookies): the visitor may see them flash for a moment, and a video already started before the reload is not counted. The YouTube videos of Elementor need no reload; with other page builders a YouTube video may not be counted — check it with the debug bar.
What travels with the event is the platform (YouTube, Vimeo or your site) and the title of the video, never its address.
One note if you send it to Google Analytics: with “Video engagement” on in the enhanced measurement of your property (Admin → Data streams → your web stream → Enhanced measurement), Google Analytics counts on its own the start of some YouTube videos with the name video_start — not with all of them: never on the page where the visitor accepts the cookies, often on the pages opened after. In those cases one start produces two events: video_play, sent by this event, and video_start, from Google Analytics. The plugin does not count twice; but if in Google Analytics you mark both as key events, every start counts twice: mark only one. If the count of Google Analytics is enough for you, uncheck Google Analytics here — the event keeps going to the other platforms you chose.

Choosing the element or the video directly on your site
Instead of writing the CSS selector by hand, you can click the element on your site. In step 1, “Choose on the page” asks you “On which page is the element? Paste its address, or leave the home page.” and opens it with “Open the page”. Your site opens in a new browser tab: if the browser blocks it, allow pop-ups for your site.

At the bottom of your site a bar appears, “My Agile Pixel®: choose the element to count”, with two modes:
- “Choose” — a click picks the element (links and buttons do not open while you are choosing);
- “Browse” — the page works normally, to close the cookie banner or open a menu, and then you go back to “Choose”.
“Cancel” or the Esc key closes everything.

After the click, the bar tells you what you chose (“You chose the button “Ask for a quote”.”) and whether it is the only one on the page (“There is only one on this page: perfect.”). If there are more (“There are 3 like it on this page…”), the event fires on any of them: to count only one, give it a CSS class of your own in your page builder.
The bar shows the CSS selector it found and the buttons “Use this”, “Take the block around it”, “Choose another element” and “Copy the selector”. “Use this” sends the element back to the event page — the tab of the event must still be open — fills in the field and the name, and closes the tab. If the event page does not answer, use “Copy the selector” and paste it into the “CSS selector of the element” field.


For “Starts a video” with “Only one video”, “Choose on the page” lists the videos found on that page (YouTube, Vimeo, uploaded to the site) with their code: you pick one and the code goes into “The code of the video”.


Only the administrators who can edit the settings of the plugin can use the visual picker: visitors never see it.
Managing your events
Every event in the list shows its name, a sentence saying what it does, and the platforms it is sent to (crossed out when they do not receive it).
The switch next to the event pauses it: it stays saved with all its settings and you switch it back on whenever you want. A paused event shows “· paused” and is not counted.
Then: Edit, Duplicate — it creates a paused copy: “We created a paused copy: edit it and switch it on when it is ready.” — and Delete, which asks for confirmation before deleting.
An event can also be stopped by the events blacklist of each channel (“GA4 events blacklist”, “Meta events blacklist”, “TikTok events blacklist”), in the advanced settings of the plugin. And custom events are included in Backup & Restore: you save them and put them back together with everything else.


Checking that it works
- In My Agile Pixel® → Settings → Advanced Settings set “Enable debug bar for administrators” to “Enable debug”.
- Open your site logged in as an administrator, accept the cookies and do the action: click the button, open the page.
- At the bottom the bar of My Agile Pixel appears (only administrators see it): one line tells you which event fired and with which name on each platform; the lines below tell you whether it reached its destination (“Facebook Pixel data successfully sent … OK!”). If the CSS selector of an element is not valid, a line warns you that the event is skipped.
- In My Agile Pixel® → Statistics, the log shows every event sent, with time, channel, name and page (with the detailed log enabled).
- In the platforms: Meta Events Manager (Test events / Overview), Google Analytics Realtime or DebugView, TikTok Events Manager.



To use the event in your campaigns, mark it as a conversion: in Meta as a custom conversion, in Google Analytics as a key event.
When you have finished testing, switch the debug bar off: it is for administrators only, but it is useless clutter.
Good to know
- Consent first. Nothing leaves before the visitor accepts the cookies. If they click a link that leaves the page before accepting, that event is lost.
- Who counts. Only the real actions of a visitor: clicks made by other scripts do not count.
- Contact forms live elsewhere. Contact Form 7, WPForms, Fluent Forms, Elementor forms… are not set up here: they are tracked in My Agile Pixel® → Integrations, which also reads the email and phone of whoever writes, so the platforms match the request to the right person. Here is the guide to form tracking.
- Caches. After a save the plugin empties the cache of the caching plugins it knows; the caches of your hosting or of services like Cloudflare must be emptied by hand.
- Downloads, scrolling, external links and Google Analytics. With “enhanced measurement” on, Google Analytics counts downloads on its own (and the visitors who reach 90% of a page, and the clicks on links to other sites). So that a download is not counted twice, download events start with Google Analytics unchecked: the page reminds you. The same goes for the thank-you page event: if the form leading to it is already tracked in Integrations, every request would be counted twice — and you do not need this event.
- Limits. 50 events per site; 10 address lines per event; 5 pieces of extra information; names up to 40 characters; value up to 1,000,000.
- Never personal data. In names and extra information the page refuses them.
- TikTok. It receives only its own event names, plus the value, the currency and the name of the event; copy and video events are not supported at the moment.
Frequently asked questions
Recover the conversions you are losing
Turn on server-side tracking on your WordPress: recover the events the browser blocks, after consent.
Buy now →
