Skip to main content

For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/signals/attributes/attribute-keys.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.

Define attribute keys

An attribute key is the identifier that attributes are calculated against. All attribute groups need an attribute key.

Signals includes five built-in attribute keys. Four are based on commonly used identifiers from the atomic user-related fields in all Snowplow events. The fifth, snowplow_id, calculates attributes per person, using the Snowplow ID from Identities when Identities is enabled on your pipeline. See Calculate attributes per person with identity resolution.

The built-in attribute keys are available to select when creating an attribute group in Snowplow Console: domain_userid, domain_sessionid, network_userid, user_id, and snowplow_id. The snowplow_id key shows Requires Identities until you configure Identities on your pipeline.

Choose a key your application can read by​

Your application reads attributes by the same attribute key the attribute group is calculated on, and it reads them on your backend, because reads need an API key. Choose a key whose value your backend has at read time: for example, domain_sessionid passed from the browser for session attributes, or user_id from an authenticated session for a logged-in user. See Retrieve attributes.

Custom attribute keys​

You can define custom attribute keys to calculate attributes against identifiers other than the built-in ones. How you specify the key depends on the attribute group data source.

For stream attribute groups, the key can be any property in your events:

  • Atomic properties: fields of the core Snowplow event, available for all events
  • Event schema properties: properties within a self-describing event
  • Entity properties: properties from schemas tracked as entities

For warehouse attribute groups, the attributes are pre-calculated in your warehouse table, so the key isn't based on event properties. Instead, define the attribute key using the name of the table column that contains the key values.

Navigate to Signals > Attribute keys in Console. Click the Create attribute key button.

Create attribute key form with name, description, and property selection

You will need to provide:

  • A unique name
  • An optional description
  • An optional email address for the primary owner or maintainer
  • Which property you want to calculate attributes against: an atomic field, or a property from an event or entity schema
    • For keys used with warehouse attribute groups, provide the name of the table column that contains the key values instead

To edit or delete a custom attribute key, go to the key details page and click the Edit button, or the ⋮ button followed by Delete.

Was this page helpful?