Configure Snowplow Signals
The next step is to define the user attributes you want to compute. You'll do this within Snowplow Console.
Create a Basic Web attribute group
Use one of Signals' built-in attribute group templates to define attributes. Use the domain_sessionid as attribute key to compute session-level attributes.
- In Console, navigate to Signals > Attribute Groups
- Click Create attribute group and choose Basic Web
- Set the Attribute Key to
domain_sessionid
The Basic Web template includes these attributes:
| Attribute | Description |
|---|---|
page_views_count | Total number of page views in the session |
unique_pages_viewed | Number of distinct pages visited |
first_event_timestamp | When the session started |
last_event_timestamp | When the most recent event was recorded |
Test your attribute group by clicking Run Preview before saving, to verify it's computing correctly based on recent events in your pipeline. This runs a query against your event data in your data warehouse and shows the computed attributes for recent sessions.
Click Create attribute group when you're happy with the attribute group.
Publish the attribute group
Attribute groups need to be published before Signals will start computing:
- Open your attribute group and click Publish
- Confirm the publish to deploy the computation logic to the pipeline
Once published, Signals will start computing attributes for each user session as events arrive.
Create a service
A service provides a pull-based API endpoint that exposes your computed attributes for a specific attribute (lookup) key.
Services allow you to combine multiple attribute groups if needed, but for this tutorial, use just the one you created in the last step.
Use this exact service name. It's the same as the SNOWPLOW_SIGNALS_SERVICE_NAME environment variable you configured in the Next.js application.
- Navigate to Signals > Services
- Click Create service
- Configure:
- Name:
web-agent-context - Attribute groups: Select the attribute group you just published
- Name:
- Click Create service
The page will show you retrieval instructions for Node.js. You'll need these to set up your API client in the next step.