Reading starts here
ChurnAtlas

Key event names over 40 characters lose key event status

Short answer. Google Analytics stops reporting a key event whose name passes 40 characters. Measure name length before you trust a health score's key event count.

ChurnAtlas Editorial Team. How posts are made is set out in the editorial standards.

Published · Sources checked · 14 min read

  1. Inputs The signals you track and the date each one last arrived.
  2. Decision What each signal means for this customer, and which ones are missing.
  3. Next action Check the oldest signal first, then ask the customer what has changed.

Google Analytics stops reporting a key event when its name is longer than 40 characters, because the appended "_c" is missing. A health score that counts key events can therefore show a lower number than the customer's real activity, so measure name length before you trust the count.

Big takeaways

  • Measure event name length before you trust any key event count inside a health score.
  • Know which tags load from outside hosts, because there are still cases of malicious injection in third-party code, as OWASP's cheat sheet explains.
  • A compromised third-party host can let an attacker inject arbitrary content into the files it serves, as Mozilla's Subresource Integrity guide warns.

Why a long event name loses key event status

Marking an event as a key event tells Google Analytics that the action matters, and a customer success team usually depends on those marks when it counts key events for a health score. The rule that breaks that count is narrow. The Analytics help page on event collection limits says that if you mark an event as a key event and the event exceeds 40 characters, the event will not be reported as a key event, because the appended "_c" will be missing.

The rule depends only on the length of the name. Two events can describe the same customer action, one named checkout_completed and the other named checkout_completed_with_saved_payment_method_and_coupon. The second name runs well past 40 characters, so if both are marked as key events, only the short one can be reported as one. Long names usually come from teams trying to make an event clear to the people reading reports, which is a sensible goal that still has this cost.

The loss is easy to miss. A long, descriptive name looks reasonable in a tag manager, and the key event count in a health score simply comes out lower than the customer's real activity. The first sign is often a score that looks wrong for no obvious reason, and by then the account may already have been flagged for the wrong reasons.

Measure name length across your key events before you trust any count. Keep key event names at or under 40 characters. When you shorten a name, compare the customer's counts before and after the change, so the rename does not look like a drop in activity. For the wider event data behind a score, see event data checks for health scores.

Worked example: checking one key event name

Suppose a customer's team marks 50 events as key events, and 15 of those names are longer than 40 characters. Under the rule the help page describes, those 15 are not reported as key events, so the health score counts fewer key events than the customer actually triggered. Shortening each of the 15 names to 40 characters or fewer lets them be counted again.

Comparing your options for a long name

When a key event name runs past 40 characters, you have three realistic options. The table compares them on two measures that matter for a health score: whether key event status survives, and what happens to the 40-character limit.

Option Key event status Effect on the 40-character limit
Shorten the event name to 40 characters or fewer Not affected by the 40-character rule Name is within the limit
Keep the long name and mark it as a key event Not reported as a key event, because the appended "_c" is missing Name exceeds the limit, and Analytics does not process it
Upgrade the property to Google Analytics 360 The long name is still not reported as a key event No increase to event or parameter character limits

Shortening is the only one of the three that removes the problem on its own. Renaming the event to 40 characters or fewer puts it within the limit the help page describes, so the key event marking can be reported.

The upgrade is the option people reach for first, because it sounds like a general fix. The help page says you can increase certain limits by upgrading your property to Google Analytics 360, but the same sentence excludes event and parameter character limits. An upgrade therefore leaves a long name exposed, and a team that upgrades should still rename the event.

Keeping the long name costs more than key event status. Analytics does not process an event name longer than 40 characters, so a health score can lose the event itself, not only its key event marking. That makes the choice less balanced than it first looks. Renaming is the fix, and the other two options only keep the problem in place.

Trust in the tag that sends your events

Every event name in your data comes from a tag, and many tags are loaded from a third-party host, which means a vendor serves the script your site runs. That arrangement is common, but it carries a specific risk. The Mozilla guide to Subresource Integrity puts it this way: "This comes with a risk, in that if an attacker gains control of the third-party host, then they can inject arbitrary malicious content into its files (or replace the files completely)."

For a customer success manager, the implication is that a health score is only as reliable as the script sending its events. If a file is replaced, your own page code can look unchanged while the script it loads has changed. The events feeding your dashboard could then differ from what the customer's product actually does, and nothing in your page markup would reveal it.

The concern is not only about a hypothetical attacker. The OWASP cheat sheet on managing third-party scripts points to malicious injections in third-party code that followed a compromise of an organization's own servers. A breach on the customer's side can therefore reach the events you measure, which is why the trust question covers both the vendor and the customer's infrastructure.

A practical review starts with a short list of questions for the customer's web team. Which tags load from third-party hosts? Who can change each script? Does the team know when a script changes? The answers tell you which event names to treat with extra care when a score moves.

What third-party code can change in your data

OWASP's cheat sheet gives a measured picture of the likelihood. Its guidance on third-party scripts says it is widely accepted that intentionally injected rogue code from a third party is unlikely, but that there are still cases of malicious injection after an organization's servers were compromised, and it gives Yahoo in January 2014 as an example. For a health score, the useful split is between a vendor acting in bad faith and an outside party that takes over infrastructure, because the two routes create different risks for your data.

Risk route What the source says
Rogue code intentionally injected by the third party Widely accepted as low probability
Malicious injection after the organization's servers were compromised Cases still occur, such as Yahoo in January 2014
Attacker gains control of the third-party host Can inject arbitrary malicious content or replace files completely

Two of these routes can change your data without any vendor choosing to. In the third row, an attacker who controls the host can replace a script's files completely, and Mozilla's guide names that risk. A replaced script could rename events, drop them, or send events that the customer never triggered. Those are the changes that would move a health score.

Treat sudden shifts in event names or volumes as a signal to look at the tag first. A name that disappears, or a new name that appears in a burst, deserves a check of the script before the team concludes anything about the customer's behavior.

Counting distinct event names against the cap

A common health signal is the number of distinct event names a customer triggers, on the idea that a wider set of actions points to a more engaged account. The help page shows that this count does not behave the same across platforms. On apps, it says you might see more than 500 distinctly named events if users on different app instances trigger different events. On web data streams, the same page states that there is no limit on the number of distinctly named events.

The page also sets a length limit that affects which events count at all. Names over 40 characters fall outside key event reporting, as covered earlier. The table lists these limits next to the distinct-name figures so you can see where each one applies.

Limit What the help page says Figure
Distinct event names, app streams More than 500 may appear when different app instances trigger different events More than 500
Distinct event names, web streams No limit on the number of distinctly named events No limit
Key event names Names over 40 characters are not reported as key events 40 characters

The practical consequence is that an app customer and a web customer can produce very different distinct-name counts for reasons unrelated to engagement. The app figure can rise because different instances trigger different events, while the web figure has no stated cap. Before you compare customers, record which platform each count came from, and keep app and web counts in separate columns of the health score. For how to set up the score itself, see health score setup rules for weights and validity.

Ecommerce item parameters and the 27-parameter cap

Ecommerce events carry more detail than most events because each item in a purchase can hold its own information. The Analytics help page on event collection limits says that, in addition to the prescribed item-scoped parameters for each recommended ecommerce event, you can include up to 27 item-level custom parameters in an ecommerce event. That figure is a ceiling on the custom additions, so a team that adds fields such as an internal category code or a promotion label should count them before adding more.

For a health score, this matters because ecommerce data often feeds revenue and purchase-frequency signals. If a customer has added custom item fields over several releases, the list can grow until nobody remembers how many are in use. A quick audit of the parameter list for each ecommerce event shows whether the customer is close to the 27-parameter ceiling.

The limit also argues for choosing item parameters carefully. Every custom field is one more thing a developer must keep consistent across pages and releases. A short list of well-named fields is easier to check than a long one nobody maintains.

Keep the prescribed parameters separate from the custom ones when you document an account. The help page distinguishes between them, and a health score that mixes the two can make a customer look like it uses more custom fields than it does. Write down the custom count for each ecommerce event with the date, and recheck it after any release that changes the purchase flow.

Automatic events that do not count

Some events reach your data without anyone writing a tag for them. The help page on event collection limits says that automatically collected events and enhanced measurement events don't count toward the limits. That changes how you read a distinct-name count.

If an app customer's distinct-name count is near 500, separate the names the customer's team created from the ones Analytics collects on its own before drawing a conclusion. A high count driven by custom names points to instrumentation work. A high count driven by automatic collection says less about what the team built.

Automatic events still belong in engagement analysis, so keep them in the activity view as a separate group.

The 40-character check works differently. Run the length check against custom key event names, since those are the ones the customer can fix.

Record the split in the health score notes: the custom event count, the automatic event count, and the date of the check. A later reader can then tell which number reflected the customer's implementation and which reflected the platform. A customer event specification for CS handoffs is one place to keep that record.

Which one should you pick?

For the long-name problem, pick shortening. It is the one option that fixes the length issue directly, because the 40-character rule depends on the length of the name, and renaming changes that length.

Upgrading does not solve it. The help page says upgrading to Google Analytics 360 can increase certain limits, but event and parameter character limits are excluded. An upgrade may be worth considering for other reasons, but a team weighing it should still rename the event.

Keeping the long name is the weakest choice, since the event itself is lost, as covered above.

The choice changes when the question is about the script rather than the name. If a tag loads from a host the customer does not control, you are relying on that host to stay safe, and the risk described above applies. Where you can choose between a script you can verify and one you cannot, weigh that risk against the convenience of the vendor's default version.

So the rule is simple for names and cautious for scripts. Shorten any key event name past 40 characters, and treat unverified third-party scripts as a source of uncertainty in the score.

When a script owner changes the tag

A script can change without anyone telling you. The vendor may release a new version, or the customer's web team may edit a tag in a tag manager. Either change can rename events, drop them, or add names that were never there before, and a health score will show that as a shift even when customer behavior has not moved.

An unexpected change is not automatically an attack, since the OWASP cheat sheet treats intentionally injected rogue code as low probability. It is a reason to check before you accept the new numbers.

When a change is announced, ask for a short record of what changed, which events were affected, and who approved it. Compare the event names for a window before and after the change. If a name is new, confirm it matches something the customer's product actually does. If a name has vanished, find out whether it was renamed, moved, or removed on purpose.

Hold the health score steady during the check. Do not reset a customer's rating because one week's counts shifted after a release. Note the change date in your records, and keep a copy of the earlier counts so the comparison can be repeated later.

Checking a script before you trust its events

Before you trust the events a script sends, know where the script comes from. Start with the list of tags on the customer's pages and mark which ones load from a third-party host. For most sites that list is short, and it is the starting point for the review.

The Mozilla warning about a compromised host applies here. Your checklist should assume that possibility exists, even if it is unlikely.

For each outside script, write down who controls it, how changes reach the site, and whether the customer's team would notice a change. A script that updates without review is harder to trust than one that changes only through a planned release. Where the customer's team can confirm the file they expect, note that in the record.

Finally, connect the script review to the event data. For each script on the list, check its event names against the names in the health score. A name that appears only after a script update, or a burst of events the product does not explain, is a reason to pause before reading the score.

Repeat the check after each vendor change and after any change to the customer's tag setup, so the record stays current. Today, list your key event names and mark any longer than 40 characters.

Related guides: Account analytics tools: 4 publishers compared · Check 4 analytics caps before the company usage review · API rate limit retry: 7 steps from Zendesk, Notion, Google.

Reader questions

Will a long key event name still count if I keep it? No. An event marked as a key event that exceeds 40 characters is not reported as one, because the appended "_c" is missing, so shortening the name is the fix.

Does upgrading to Google Analytics 360 fix a long name? No. The help page says upgrading can increase certain limits, but not event or parameter character limits.

Do automatically collected events count toward the limits? No. The help page says automatically collected events and enhanced measurement events don't count toward the limits.

How many custom item parameters can an ecommerce event carry? Up to 27 item-level custom parameters, in addition to the prescribed item-scoped parameters for each recommended ecommerce event.

Is a third-party script always a security problem? No. OWASP says the probability of intentionally injected rogue code from a third party is widely accepted as low, though malicious injections have still happened after an organization's servers were compromised, as with Yahoo in January 2014.

What happens if the third-party host is compromised? The Mozilla guide says an attacker in control of the host can inject arbitrary malicious content into the files or replace them completely. Watching for unexpected changes is part of the review.

Is there a limit on distinct event names for web data streams? No. The help page says there is no limit on the number of distinctly named events for web data streams. App streams differ, since more than 500 distinct names can appear when different app instances trigger different events.

Sources

Limits of this post

This post is general operational information, not legal advice about notice periods or renewal clauses. It does not promise that any method keeps a customer. Software can get a fact wrong, so open the sources before you act.