An event snippet is a small JavaScript call you place on a page β AnyTrack('trigger', '<EventName>', { attributes }) β that fires a standard or custom event with its event attributes. It runs on top of the automatic events the Tracking Tag already collects (PageView, OutboundClick, FormSubmit), letting you track actions the Tag canβt infer on its own, such as a button click, a video play, or a quiz completion.
What an event snippet is made of
Section titled βWhat an event snippet is made ofβEvery AnyTrack event snippet has three parts: the trigger (the AnyTrack('trigger', β¦) command that generates the event), the event name (a standard event like Purchase or a custom name like Optin), and the event attributes (the customer, product, and transaction data passed in the object). Standard event names are mapped to each ad platform automatically; custom names must be mapped manually before a platform can optimize against them.
Event snippet vs Tracking Tag vs Event Attributes
Section titled βEvent snippet vs Tracking Tag vs Event Attributesβ- Tracking Tag β the single base script installed once in the page
<head>; an event snippet is an extra trigger that needs the Tag loaded first. - Event Attributes β the data the snippet sends; the snippet itself is the code that sends it.
How AnyTrack uses the event snippet
Section titled βHow AnyTrack uses the event snippetβAdd an event snippet only to the page where the specific action happens β the Tracking Tag handles page-wide automatic tracking everywhere else. When the snippet fires, AnyTrack records the event in the Conversion Report and forwards it server-side to every connected ad platform via the Conversion API. Validate a new snippet with the Tracking Tag Helper Chrome extension before relying on it. A server-side equivalent β sending the same event as a conversion payload to a webhook β covers actions that happen off the page.
Frequently asked questions
FAQ was last reviewed on 2026-06-25