Tags Without the Combinatorial Explosion

    Tags Without the Combinatorial Explosion

    Break event counts down by plan, source or environment. Each tag is counted on its own, so adding one doesn't multiply everything else.

    A count tells you how many. It doesn't tell you which kind.

    checkout_completed: 184 is good to know. Whether most of those were on the Pro plan, or came from the newsletter you sent on Monday, is often the more useful part. Tags give you that breakdown without creating a separate event name for every variation.

    How tags work

    Any field you send alongside the event name becomes a tag. With GET, that's any extra query parameter. With POST, it's any extra key in the JSON body:

    curl -X POST "https://app.eventkiwi.com/api/event?_id=YOUR_AGGREGATOR_ID" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name":"checkout_completed","plan-pro":true,"source-google":true}'
    

    Eventkiwi counts the tag key and ignores the value. plan=pro and plan=starter both count as plan, which is rarely what you want. When the value matters, put it in the key: plan-pro, plan-starter, source-google.

    Keys are lowercased and limited to letters, digits, -, _ and :, so Plan-Pro and plan-pro end up as the same tag.

    In the report, tags appear under the event they arrived with, each with the number of times it appeared:

    EventCountChange
    checkout_completed
    • plan-pro 121
    • plan-starter 63
    • source-google 97
    • source-newsletter 52
    • source-direct 35
    184+20 (+12%)
    How tags show up in a report: occurrences listed under the event they arrived with.

    Why each tag is counted on its own

    Many analytics tools store every combination of values they see. One counter for Pro checkouts from Google in production on the web, another for Pro checkouts from Google in production on iOS, and so on.

    That gives you every possible slice, and it grows fast. Each new dimension multiplies the number of counters instead of adding to it:

    Counters per event

    Every combination of valuesEach tag counted on its own (Eventkiwi)
    plan3 values
    3
    3
    + source4 values
    12
    7
    + env2 values
    24
    9
    + platform3 values
    72
    12
    Counters needed for one event as tag families are added. Combinations multiply; independent tags add up.

    With four ordinary tag families, combinations need 72 counters for a single event. Counted on their own, the same tags need 12. A fifth family with five values takes combinations to 360 and independent counting to 17.

    The number of counters isn't the problem you'd notice first, though. A report built from combinations is unreadable: dozens of tiny rows, most of them with a count of 1 or 2. A report built from independent tags stays short. You can see at a glance that two thirds of checkouts were Pro and about half came from Google.

    The trade-off

    Independent counting has a cost, and you should know it before you design your tags: you can't ask about intersections.

    The report above says 121 checkouts were Pro and 97 came from Google. It can't say how many were both. If that particular overlap matters to you, track it on purpose:

    • Add a combined tag for the case you care about, such as pro-from-google.
    • Or split it into its own event, such as checkout_completed_pro, when it deserves its own line in the report.

    Eventkiwi isn't trying to be a query engine. It's trying to put the handful of numbers you care about in front of you every day, and short lists of independent tags are what keep that readable.

    Choosing good tags

    A good tag is one you would act on. Some patterns that work well:

    • Plan or tier: plan-starter, plan-pro, plan-business
    • Acquisition source: source-google, source-newsletter, source-partner
    • Environment: env-production, env-staging
    • Platform: platform-web, platform-ios
    • Outcome detail: reason-card-declined, reason-expired

    And a few that don't:

    • IDs. user-8231 creates a new tag for every user and turns a five-line report into a phone book.
    • Timestamps or free text. Same problem, and the report already shows when things happened.
    • Tags on every event "just in case". If nobody would change anything based on the split, leave it out. You can add a tag later; it starts counting from the next event.

    Start with one

    Pick the event you look at most and add the one tag that would explain its changes. For a checkout event, that's usually the plan. For a signup, the source. For an error, the reason.

    After a week of reports you'll know whether the breakdown earns its place, and which tag to add next.