Key takeaways
- Event tracking means sending a named record for each action that answers a business question; page views come free, every other action needs a name, parameters and an owner.
- Name events in lowercase snake_case, object then action, and reuse Google's recommended names such as generate_lead and purchase wherever they fit; Purchase and purchase are two different events in GA4 and AdPix.
- Put variety into parameters, not names: one form_submitted event with a form_id parameter beats five near-identical events, and only parameters whose values repeat belong in reports as dimensions.
- For lead-gen sites, track the lead stages that happen after the form (qualified, won) from your CRM; cost per qualified lead often ranks channels differently from cost per lead.
- Never rename a live event in code. Add the new name, map the old one with a rule, and log the change, so history and dashboards keep working.
Event tracking is how an analytics tool learns that something happened on your site beyond a page loading: a form was sent, a product went into the cart, a trial started. Each action is sent as a named event with a few parameters that describe it, and every conversion rate, funnel and revenue report is built from those events. The hard part is not the code, which is one line per event. It is choosing names and parameters that still make sense a year later, after three developers and two agencies have touched the site. This guide gives you a naming convention, a rule for parameters, ready event plans for an online shop and a lead-gen site, and a way to test and change events without breaking history.
Event tracking is the practice of sending a named record, with descriptive parameters, to your analytics tool each time a visitor takes an action that matters, so that actions can be counted, compared by source and tied to revenue.
What should be an event, and what should not?
An action should be an event when someone on your team will make a decision from its count. If nobody would change a budget, a page or a priority because the number went up or down, it does not need its own event. The same goes for experiments: the event you will judge an A/B test on has to be tracked before the test starts, because the A/B test sample size guide sizes every test from that event’s baseline rate.
Google sorts GA4 events into four kinds: automatically collected events, enhanced measurement events, recommended events with predefined names and parameters, and custom events you define yourself. Google’s own advice is to create custom events only “when no other events work for your use case”, because custom events do not show up in most standard reports (Google). That gives you a working order:
- Automatic first. Page views, and in most tools scrolls, outbound clicks, downloads and site search, arrive without code. The website tracking guide lists what each automatic listener catches and where it falls short.
- Recommended names second. If Google already has a name for the action, use it. The reference includes
sign_up,login,search,share,generate_lead,qualify_lead,close_convert_lead,add_to_cart,begin_checkout,purchaseandrefund(Google). Reusing them keeps your data portable between tools. - Custom last, for actions specific to your business, such as
quote_requestedordelivery_slot_chosen.
Two things should not be events. A detail of an action is a parameter, not a new event: the plan someone picked is plan on sign_up, not sign_up_pro. And a page view should not be re-sent as a custom event just to make it countable; a thank-you page becomes a conversion through a rule on its URL, which the conversion section of the tracking hub walks through.
How should you name events?
Pick one pattern, write it down, and never mix patterns. The most readable pattern is object_action in lowercase snake_case: newsletter_subscribed, quote_requested, video_played. Sorted alphabetically in an events report, everything about one object then sits together.
The rules are not only style. GA4 treats event names as case-sensitive, so my_event and My_Event are distinct events; names must start with a letter and use only letters, numbers and underscores, with no spaces (Google). Names longer than 40 characters are not logged at all, and a key event over 40 characters stops being reported as a key event (Google). AdPix applies the same logic: its tracker docs warn that signup_completed and SignupCompleted are counted as two events, and an event rule’s name must start with a letter, use only letters, digits and underscores, and stay within 40 characters (AdPix docs, AdPix docs).
| Instead of | Use | Why |
|---|---|---|
Contact Form Submit |
contact_form_submitted |
Spaces and capitals break the naming rules |
signup_pro, signup_basic |
sign_up with plan |
Variation belongs in a parameter |
lead |
generate_lead |
A recommended name already exists |
click_button_3 |
quote_requested |
Name the business action, not the UI element |
purchase_completed_successfully_mobile_checkout |
purchase with checkout_type |
Over 40 characters, and the detail is a parameter |
click, scroll, page_view as custom names |
a different name | These are reserved in GA4 for web streams |
Google also reserves some parameter names and prefixes. Parameters cannot begin with an underscore, firebase_, ga_, google_ or gtag., and names such as user_id, session_id and gclid cannot be used for custom dimensions (Google).
Which parameters should each event carry?
Send the details you will want to break the event down by, and nothing that identifies a person. A good parameter answers “which one?” or “how much?”: which form, which plan, which product category, what value.
A useful test for every parameter is whether its values repeat. plan has three or four values and makes a clean report column. order_id is different on every event, so as a report dimension it produces one row per order and pushes everything else out. AdPix’s docs make this rule explicit, listing plan, category, payment_method, logged_in and ab_variant as good dimensions and order_id, transaction_id, email and any unique ID as keys not to register (AdPix docs). Google’s guidance is the same for GA4: avoid high-cardinality custom dimensions such as unique user IDs, session IDs or timestamps, because they can push data into the “(other)” row (Google).
Unique IDs still belong on the event. A transaction_id on a purchase is what lets a tool deduplicate repeat firings; you just do not group reports by it.
Know the limits before you design a plan around them:
| Limit | GA4 (standard property) | AdPix |
|---|---|---|
| Event name length | 40 characters | 40 characters for rule-created events |
| Parameters per event | 25 | Not stated; send a flat object |
| Parameter value length | 100 characters (longer for page title, referrer, location) | Not stated |
| Event-scoped custom dimensions | 50 | Not stated |
| When a registered parameter shows up | After 24 to 48 hours | Immediately, with no reprocessing |
| Registering fills the past? | No | Only for events that already carried the parameter |
Sources: Google collection limits, Google custom dimensions, AdPix custom definitions.
The last row is where teams lose data. In both tools a parameter you never sent cannot be recovered later, so add the parameter to the event first and decide on the report afterwards. If an event carries money, send it as value with a currency; GA4 requires the currency for revenue to be computed accurately (Google), and AdPix sums value for key-event revenue (AdPix docs).
What does an event plan look like for an online shop?
A shop needs the shopping funnel in recommended names, plus a few events for the moments that leak sales. The plan below is hypothetical; it fits a small store selling through a bank payment gateway.
| Event | Parameters | Key event? | Sent from | Question it answers |
|---|---|---|---|---|
view_item |
items, value, currency | No | Browser | Which products get attention? |
add_to_cart |
items, value, currency | No | Browser | Which products get considered? |
begin_checkout |
items, value, currency | No | Browser | How many carts reach checkout? |
shipping_method_chosen |
shipping_method |
No | Browser | Does express delivery lift completion? |
purchase |
transaction_id, items, value, currency, payment_method |
Yes | Server | Did we sell, and through which gateway? |
refund |
transaction_id, value, currency | No | Server | Which channels bring orders that come back? |
stock_alert_subscribed |
item_id |
No | Browser | Which out-of-stock items still have demand? |
support_chat_started |
page_type |
No | Browser | Where do people get stuck? |
That is eight events. Together with automatic page views and site search, they answer the questions most shops review each week, and they keep event volume low. The purchase comes from the server because a customer who pays and closes the tab before the gateway redirects back never loads the thank-you page; the server-side tracking guide shows which events to move to the server first and how to keep the browser and server copies of a purchase from being counted twice. Once these events flow, the sales funnel analysis guide shows how to line up view_item to purchase as funnel steps and find the step that loses the most buyers.
What does an event plan look like for a lead-gen site?
A lead-gen site needs the form, and then the stages that happen after the form, because a lead is not revenue. Google’s recommended names cover this whole chain: generate_lead for the form, qualify_lead when sales accepts it, and close_convert_lead when the lead becomes a customer (Google).
| Event | Parameters | Key event? | Sent from |
|---|---|---|---|
generate_lead |
form_id, lead_source, service |
Yes | Browser |
phone_clicked |
page_type |
No | Browser |
quote_requested |
service, budget_band |
Yes | Browser |
qualify_lead |
service |
Yes | Server, from the CRM |
close_convert_lead |
value, currency, service |
Yes | Server, from the CRM |
disqualify_lead |
reason |
No | Server, from the CRM |
The server events matter because the qualify and close steps happen in your CRM days after the visit. Sending them with the same visitor or user ID ties them to the original campaign, which only holds if the campaign link was tagged in the first place; the UTM parameters guide explains the fields, and a shared UTM naming convention keeps those campaign values identical across the team. These order and CRM records are the core of your first-party data, the measurement layer that stays intact when browsers delete cookies or a visitor switches devices.
Worked example: why lead stages change the channel ranking
Take a hypothetical service business spending 40 million toman a month on each of two channels.
- Instagram ads: 300 leads, of which 15% qualify. That is 45 qualified leads.
- Google search ads: 100 leads, of which 55% qualify. That is 55 qualified leads.
Cost per lead says Instagram wins: 40,000,000 ÷ 300 ≈ 133,000 toman against 40,000,000 ÷ 100 = 400,000 toman. Cost per qualified lead reverses it: 40,000,000 ÷ 45 ≈ 889,000 toman for Instagram against 40,000,000 ÷ 55 ≈ 727,000 toman for Google. If you only track generate_lead, you move budget toward the channel that costs about 22% more per lead sales actually wants. The fix costs two server events. The marketing KPIs guide shows how to pick which of these numbers to report each month.
How do you keep an event plan working as the team grows?
Treat the event plan as a versioned document with one owner, and never change a live event without updating it. Most broken tracking is not a coding bug; it is two people solving the same problem with different names.
- One owner, one sheet. Each row has the event name, parameters, trigger, source (browser, tag manager or server), key-event status, owner and a status of planned, live or deprecated.
- Never rename a live event in code. A rename splits history into two rows and silently zeroes every dashboard and key event built on the old name. Add the new name, and use a rule to map the old one. In AdPix a Modify event rule renames an incoming event or cleans its parameters in place, which is the docs’ suggested way to normalise names when several site templates send the same action differently; rules apply going forward only and take up to a minute to load (AdPix docs).
- Keep a change log. One line per change with the date. When a conversion rate jumps on a Tuesday, this is where you find out it was a tracking change and not a campaign.
- Audit monthly. Sort the events report by name and look for anything not in the plan: capitalised duplicates, test events left in production, events from an old template.
- Test before every release that touches a page with an event, as described below.
How do you send and test events in AdPix?
AdPix sends a custom event with one call, ap('track', name, props). The name is exactly what appears in the Events report, and the optional props object becomes the event’s parameters (AdPix docs):
ap("track", "quote_requested", { service: "seo_audit", budget_band: "50_100m" });
A few behaviours from the docs are worth knowing before you test:
- Events are batched. They are sent every 5 seconds, at 20 events, or when the page is hidden, so a report does not move the instant after a
trackcall. Failed sends go back into a queue mirrored in local storage. - Consent applies.
track,ecommerceandidentifysit in the “statistics” consent category; under opt-in they do not run until the visitor chooses. How the four categories, opt-in and opt-out and the consent log work is covered in how AdPix cookie consent gates tracking. The guide to cookie consent and analytics shows how to size the resulting gap. - Parameters need registering to be reported. Under Admin → Custom definitions, register the props key; type “number” creates a sum and an average metric, type “string” a dimension. Custom definitions appear in Reports & Explore, Audiences and path exploration, not in the standard reports (AdPix docs).
- Google Tag Manager shops can skip code for the funnel. A data-stream option reads GA4 e-commerce events from the dataLayer; custom dataLayer events are not read, so custom events still need
ap('track', …)(AdPix docs).
To test, open Realtime → Debug view and pair your phone or browser with a link, a QR code or ap('debug', '<code>'). Each event appears within seconds with its verdict (accepted, modified by rule, dropped and why), its parameters, and warnings such as a name over 40 characters, value without currency, or a purchase without transaction_id. Turn on “Don’t count my traffic in reports” before a test purchase, or it counts in revenue like a real order (AdPix docs). Once an event is right, mark it as a key event if it earns that place; the mark applies to history immediately and makes the event selectable as a funnel step, which the AdPix funnels guide explains. Which events deserve that mark, and how to keep a purchase from being counted twice across browser, server and ad pixels, is the subject of the conversion tracking guide. If you have not installed the tag yet, start with the AdPix install guide.
AdPix is a web analytics platform that replaces Google Analytics 4: realtime, acquisition, engagement, conversion and e-commerce reports, plus attribution, lift testing and marketing mix modelling, with no data sampling and a free plan. Plans are sized by page views, so custom events do not use up the allowance: 100,000 page views a month for each website on Free and 1 million on Starter, which also adds custom reports, segments and audiences (AdPix pricing). It runs alongside GA4, so you can send the same event plan to both and compare; the guide to GA4 data discrepancies explains which gaps are normal.
Your next step is the sheet. Write the eight to fifteen events your site needs with their parameters and owners, check every name against the rules above, and test the two that involve money in a debug view before your next campaign starts.
Measure your site with AdPix today
The free plan covers 100,000 page views a month for each website, no credit card. Setup takes under five minutes.
Frequently asked questions
What is event tracking?
Event tracking is recording specific user actions on a website, such as a sign-up, a form submission or an add-to-cart, as named events with extra details called parameters. Analytics tools count those events to build conversion rates, funnels and revenue reports.
What is the difference between an event and a parameter?
An event is the action itself, such as form_submitted. A parameter is a detail attached to that action, such as which form was sent or how much the order was worth. Use one event with parameters instead of creating a separate event for every variation.
How should I name events?
Use lowercase letters, numbers and underscores, start with a letter, keep names under 40 characters, and follow one pattern such as object_action (newsletter_subscribed). Use Google's recommended event names, such as sign_up, generate_lead and purchase, whenever one matches the action.
How many events should a website track?
Fewer than most teams think. A small shop or lead-gen site usually needs 8 to 15 custom or recommended events on top of automatic page views; each one should answer a question someone actually reviews each month.
Why does my custom parameter not appear in reports?
In both GA4 and AdPix, a parameter is stored with the event but only becomes a selectable dimension or metric after you register it as a custom definition. Registration does not create data, so events sent before the parameter existed stay empty.
How do I test event tracking before launch?
Use a debug view that shows events from your own device within seconds. AdPix's Debug view pairs a phone or browser with a link or QR code, shows each event's verdict and parameters, and can keep test purchases out of reports.
Sources and methodology
GA4 naming rules, collection limits, custom-dimension quotas and recommended event names come from the Google help and developer pages in sources, opened in November 2026. AdPix behaviour (the track command, batching, consent category, custom definitions, event rules, key events, Debug view and the dataLayer bridge) comes from docs.adpix.io pages opened the same month; plan placement comes from adpix.io/pricing (read on 13 November 2026). The event plans and the lead and spend figures in the worked example are hypothetical.
- Google Analytics Help: About events
- Google Analytics Help: Event naming rules
- Google Analytics Help: Event collection limits
- Google Analytics Help: About custom dimensions and metrics
- Google Analytics Developers: Recommended events reference
- AdPix docs: Tracker command reference
- AdPix docs: Custom definitions
- AdPix docs: Create and Modify event rules
- AdPix docs: Key events
- AdPix docs: Debug view
- AdPix docs: Google Tag Manager and the dataLayer
This article was drafted with AI assistance and reviewed by the AdPix team before publishing. Editorial policy