👋 In this document you'll discover best practices for naming your analytics events, their parameters and values. These standards ensure consistency in data collection and facilitate analysis.

Nomenclature of events

Format verb_name

ℹ️ Most events use a verb_name format, where the verb describes the user's action and the name describes the object of the action.

This format is straightforward and makes the purpose of each event clear:

  • generate_lead (generate a lead)
  • join_group (join a group)
  • purchase (purchase)
  • refund (refund)
  • search (search)
  • select_content (select content)
  • share (share)

Specificity and clarity

ℹ️ Each event name clearly describes the specific action taken by the user, which is crucial for understanding what is being measured without the need for additional context.

Clarity in naming helps to link the event directly to the user action it follows. For example:

  • earn_virtual_currency vs. spend_virtual_currency (earning virtual currency vs. spending virtual currency)
  • add_to_cart vs. remove_from_cart (add to cart vs remove from cart)
  • view_item vs. select_item (view an article vs select an article)
⚠️ Never use event names such as clickor form_step_view etc. More explicit event names facilitate data segmentation (in a CRM, for example), and improve analysis by providing a clear context for user interaction.
⚠️ Never use variables in event names.For example, rather than navigate_to_memberships , navigate_to_myaccount , navigate_to_help_center prefer an event navigate with parameters navigation_title (ex values: 'view memberships' etc.), navigation_location (ex values: 'header', 'footer', 'breadcrumb' etc.).

Terminological consistency

Certain terms are used consistently across different events to describe similar actions or objects. This consistency helps maintain a uniform language across your tracking events. For example:

  • Terms like view, add, removeand select are constantly used for interactions with lists and items.
  • begin and complete are used to describe the beginning and end of a process (e.g., begin_tutorial and complete_tutorial).

Examples of Custom Events

For media interaction or feedback, here are some suggestions for customized events:

  • play_video (launch video)
  • pause_video (pause a video)
  • submit_feedback (submit feedback)
  • rate_product (evaluate a product)
  • download (download a document)
  • subscribe_newsletter (subscribe to a newsletter)

By following these templates, you can create a consistent set of event names that align well with existing GA4 recommendations and provide valuable insights into user behavior across your digital properties.

Nomenclature of Variables and Values

Parameter format

  • Use snake_case names for parameters: page_type, user_role, action_time.
  • Prefer explicit names, even if longer, to avoid any ambiguity.
  • Make sure parameters are consistent and reusable across multiple events to avoid unnecessary variations.

Values format

  • Text format : Values are written in lowercase and use spaces (mail contact ✅ and not Contact_mail ❌).
  • Digital format : Use consistent numerical values (e.g. price: 19.99 rather than price: "19,99€").
  • Boolean format : Prefer true/false for binary states (is_logged_in: true rather than is_logged_in: "yes").
  • List format : Use comma-separated values to store multiple elements in a single parameter (product_categories: "electronics, home_appliances").
  • Date format : Follow ISO 8601 (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ).

A need, a question?

Write to us at hello@starfox-analytics.com.
Our team will get back to you as soon as possible.

Contents
Post Tab Link
Post Tab Link

Follow Starfox Analytics on Linkedin so you don't miss a thing.