Skip to main content

For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/signals/data-sources/existing-analytics/how-it-works/event-mapping.md. The index of all documentation pages is at https://docs.snowplow.io/llms.txt, and the index for this section is at https://docs.snowplow.io/docs/signals/llms.txt.

How events from your tool map to Snowplow events

Every adapter maps an event the same way, whatever the tool or approach. It goes down a ladder of Snowplow event types and takes the first one that fits. Events with a standard Snowplow equivalent become that event, so Signals attributes and Snowplow data models built for them work unchanged. Only what's left becomes the generic external_event.

The ladder​

RungSnowplow eventExamples from your tool
1Page view (page_view, native)Segment and RudderStack page, GA4 page_view, Amplitude [Amplitude] Page Viewed, Adobe page view events, PostHog $pageview
2Ecommerce (com.snowplowanalytics.snowplow.ecommerce/snowplow_ecommerce_action 1-0-2, with product, cart, checkout step, transaction, or refund entities)Segment and RudderStack Product Viewed and Order Completed, GA4 view_item and purchase, Adobe commerce.purchases and purchase, PostHog Product Viewed and Order Completed
3Site search (com.snowplowanalytics.snowplow/site_search 1-0-0)Segment, RudderStack, and PostHog Products Searched, GA4 search and view_search_results
4Identify (com.snowplowanalytics.snowplow/identify 1-0-0, ID only)Segment and RudderStack identify, GA4 login, Amplitude and PostHog $identify with a user ID, Adobe logins
5Google's schemas (GA4 only)Recommended events such as sign_up and generate_lead on every GA4 approach. On server-side GTM only, user_engagement and Enhanced Measurement events such as scroll, click, and file_download
6com.example/external_event 1-0-0, under your vendorEverything else: group and alias calls, your own custom events, autocaptured events, and, on most tools, ecommerce events missing a field Snowplow requires

Every event also carries an external_identity entity with your tool's IDs and the original event name. See Identifiers.

The external_event and external_identity schemas aren't on Iglu Central. You create them in your own registry, under your own vendor, shown on this page as com.example. See Where to start. Every other schema on this page is on Iglu Central.

Page views​

Page views stay native Snowplow page views, with the page URL, title, and referrer in the standard fields.

Ecommerce​

Ecommerce events become snowplow_ecommerce_action events, shaped the way the Snowplow ecommerce plugin sends them. Each product becomes its own product entity, so every line of an order is kept. A Signals attribute reads one product entity per event.

Only the events your tool defines as ecommerce take this rung, such as Segment's Order Completed or GA4's purchase. Map events from each tool lists them. Where your tool leaves out an optional field Snowplow's ecommerce schemas need, the adapter fills a placeholder, such as a payment method of unknown. What happens when a required field, such as the currency or order ID, is missing depends on the tool and approach:

  • Segment, RudderStack (client-side and transformation), PostHog, and the GA4 page script: the event becomes external_event.
  • Adobe: the adapter fills a currency of USD and an order ID of unknown.
  • Amplitude: the adapter uses the event's insert_id as the order ID. Only product view, cart, and order events fall back to external_event; checkout and refund events are sent without product entities.
  • GA4 GTM tag templates and RudderStack's no-code HTTP Webhook mappings: nothing checks, so the event fails validation and appears as a failed event.

Each tab in Map events from each tool gives its tool's behavior.

Example: a Segment order with two products
json
{
"schema": "iglu:com.snowplowanalytics.snowplow.ecommerce/snowplow_ecommerce_action/jsonschema/1-0-2",
"data": { "type": "transaction" }
}

With these entities:

json
[
{ "schema": "iglu:com.snowplowanalytics.snowplow.ecommerce/product/jsonschema/1-0-0",
"data": { "id": "sku-42", "price": 12.5, "currency": "USD", "quantity": 3, "category": "Mugs" } },
{ "schema": "iglu:com.snowplowanalytics.snowplow.ecommerce/product/jsonschema/1-0-0",
"data": { "id": "sku-77", "name": "Cork Coaster", "price": 8, "currency": "USD", "quantity": 2, "category": "Coasters" } },
{ "schema": "iglu:com.snowplowanalytics.snowplow.ecommerce/transaction/jsonschema/1-0-0",
"data": { "transaction_id": "o-1001", "revenue": 53.5, "currency": "USD", "payment_method": "unknown", "total_quantity": 5 } },
{ "schema": "iglu:com.example/external_identity/jsonschema/1-0-0",
"data": { "tool": "segment", "anonymous_id": "a525264d-56e3-4050-9599-397af94571a2", "user_id": null,
"session_id": null, "session_number": null, "event_name": "Order Completed" } }
]

Searches become site_search, with the search term in the terms list. In Signals, count searches with a counter on site_search, and count terms with the category_count aggregation on terms.

Identify​

Logins and identify calls become a Snowplow identify event that holds the user ID and nothing else. Identify traits, such as name, email, and plan, are dropped. The user ID is sent unchanged, so if it's an email address, the email reaches Snowplow. To use a plan in attributes, send it on a group call or a track event, where it fills the plan field of external_event.

Google's schemas on GA4​

On GA4, events that Google defines and Snowplow has no equivalent for use Google's schemas on Iglu Central, under three vendors:

VendorEventsSent by
com.google.tag-manager.server-sideRecommended events such as sign_up, generate_lead, and shareEvery GA4 approach: the GTM tag templates, the page script, and server-side GTM
com.google.ga4user_engagementServer-side GTM only
com.google.ga4.enhanced-measurementEnhanced Measurement events such as scroll, click, and file_downloadServer-side GTM only

On the client-side approaches, use the Snowplow tracker's own page pings and link clicks instead of user_engagement and Enhanced Measurement events.

Signals attributes work on these schemas like any other. This one adds up GA4 engagement time from server-side GTM:

python
from snowplow_signals import Attribute, Event, EventProperty

engagement_msec = Attribute(
name="engagement_msec",
type="int64",
events=[Event(vendor="com.google.ga4", name="user_engagement", version="1-0-0")],
aggregation="sum",
property=EventProperty(
vendor="com.google.ga4",
name="user_engagement",
major_version=1,
path="engagement_time_msec",
),
default_value=0,
)

external_event​

Everything else becomes external_event, with a fixed set of typed fields:

FieldTypeHolds
namestring, requiredThe event name in your tool, such as Signup Form Submitted, signup_form_submitted or [Amplitude] Form Submitted
toolstring, requiredYour tool's name in lower case, such as segment, ga4 or posthog
kindstring, requiredtrack, identify, group, alias, screen or page
valuenumberA revenue, value, total or price property
currencystringA three-letter currency code
item_idstringThe product or item ID; on events with several items, the first one
item_categorystringThe product or item category; on events with several items, the first one
search_termstringA search query property
planstringA plan property, from track properties or group traits
group_idstringThe account or group ID on group calls
previous_idstringThe previous ID on alias calls
json
{
"schema": "iglu:com.example/external_event/jsonschema/1-0-0",
"data": { "name": "group", "tool": "segment", "kind": "group", "plan": "enterprise", "group_id": "acct-9" }
}

Signals calculates attributes only on properties a schema declares, which is why external_event has fixed fields instead of carrying your tool's properties as they are. Any property that doesn't map to a field is dropped, and events with several items keep only the first in item_id and item_category. If you need an attribute on a property external_event doesn't have, track that event natively. See Move to native Snowplow tracking.

Map events from each tool​

The adapter for each tool applies the ladder to that tool's own event names. Properties that don't match a typed field stay in your tool.

Segment call or eventSnowplow eventNotes
pagepage_viewTitle from the page context, or the page name
screenpage_viewServer-side only
Product Viewedsnowplow_ecommerce_action (product_view) with productNeeds a product ID, price, and currency
Product Added, Product Removedsnowplow_ecommerce_action (add_to_cart, remove_from_cart) with product
Checkout Started, Checkout Step Viewed, Checkout Step Completedsnowplow_ecommerce_action (checkout_step) with product and checkout_stepStep defaults to 1
Order Completedsnowplow_ecommerce_action (transaction) with one product per product and transactionNeeds an order ID, revenue or total, and currency
Order Refundedsnowplow_ecommerce_action (refund) with product and refundNeeds an order ID, total, and currency
Products Searchedsite_searchquery becomes the search term
identifyidentifyThe user ID only. Traits, including email, are dropped
groupexternal_eventgroup_id from groupId, plan from the group traits
aliasexternal_eventprevious_id from previousId (server-side only)
Any other track call, or an ecommerce event missing a required fieldexternal_eventname is the Segment event name. Typed fields such as value, currency, item_id, and plan are filled from matching properties

Filter attributes on the event name​

Every custom event from your tool is the same Snowplow event type, so an attribute on external_event needs a criteria filter on name. Use the name exactly as your tool sends it. This attribute counts Segment Signup Form Submitted events:

python
from snowplow_signals import Attribute, Criteria, Criterion, Event, EventProperty

external_event = Event(
vendor="com.example",
name="external_event",
version="1-0-0",
)

external_event_name = EventProperty(
vendor="com.example",
name="external_event",
major_version=1,
path="name",
)

signup_count = Attribute(
name="signup_form_submitted_count",
description="Number of Signup Form Submitted events from Segment",
type="int32",
events=[external_event],
aggregation="counter",
criteria=Criteria(
all=[Criterion.eq(external_event_name, "Signup Form Submitted")]
),
)

In Console, select the external_event schema as the attribute's event, choose the counter aggregation, and under More options add a criterion on the name event property with the = operator.

To filter on the original name of any event, including events that became page views or ecommerce events, use event_name in the external_identity entity:

python
from snowplow_signals import EntityProperty

original_event_name = EntityProperty(
vendor="com.example",
name="external_identity",
major_version=1,
path="event_name",
)

Was this page helpful?