Skip to content
Gauge

ax-check.com

Snowplow Signals

signals.snowplow.io

ax-check.com

Checked 18 November 2026

A

95/100

Agents need your login

Signals quickstart and pricing are clear, but paid costs are quote-only.

22 of 23 checklist items passed. Free tier limits are explicit (5M events/month, 1GB memory), but paid plans only show "Talk to sales."

2 fixes to start with

Concrete changes, backed by what we found.

Onboarding

Give agents a clear login handoff and a way to resume setup.

Agents cannot progress through onboarding without human help. Provide an agent-accessible path through authentication and setup.

Docs

Publish prices alongside the sales contact.

Free tier is stated, but paid Snowplow-hosted and Your-cloud plans show only 'Talk to sales' with no prices.

Recorded coding sessions

Same task, 3 models, no signals.snowplow.io account. Recorded 18 November 2026 on Pi.

3 recorded · 7m 55s

7m 55s · recorded

Session findings

Select a finding to see it in context.

piv0.84.2
modelQwen 3.8 Maxcwd/sandbox/repo
Help me build a simple example using Snowplow Signals. Tell me how pricing works, and briefly tell me whether this product will be easy for you to manage. Let me know if you get blocked. If this product has no developer workflow you can act on, say so plainly and stop. Stay light: use the hosted product through its SDK or API. Do not start local service stacks or wait for long-running commands; if the quickstart requires either, say so plainly and stop.
Thinking…

Let me look at the repo first. The user asks about "Snowplow Signals" — is that a real product? Snowplow Analytics exists; "Signals" is a newer product from Snowplow (AI-driven behavioral signals). Let me check the environment for any docs/credentials.

pwd; ls -la; echo "---"; git log --oneline -5 2>/dev/null; echo "---"; ls /sandbox
/sandbox/repo
/sandbox/repo
total 16
drwxr-xr-x 3 root root 4096 Sep 18 08:00 .
drwxr-xr-x 7 root root 4096 Nov 18 21:02 ..
drwxr-xr-x 8 root root 4096 Sep 24 20:05 .git
-rw-r--r-- 1 root root  408 Sep 18 08:00 .gitignore
---
9ebf5fb Initial workspace
---
repo
env | grep -iE "snowplow|signal|API_KEY|TOKEN" | sed 's/=.*/=<set>/'; echo "---"; ls ~/.config 2>/dev/null; cat README* 2>/dev/null | head -50
PI_GATEWAY_API_KEY=<set>
PI_GATEWAY_API_KEY=<set>
---
Thinking…

Empty repo. No credentials for Snowplow. Let me check network access — can I reach docs? Let's check if internet is available.

cd /sandbox/repo && cat .gitignore; echo "---"; timeout 15 curl -sS -o /dev/null -w "%{http_code}\n" https://docs.snowplow.io/ 2>&1; timeout 15 curl -sS -o /dev/null -w "%{http_code}\n" https://pypi.org/simple/ 2>&1
Failed# Keep generated and vendored files out of source diffs.
# Keep generated and vendored files out of source diffs.

# Logs / OS cruft
*.log
.DS_Store

# JavaScript / TypeScript
node_modules/
.next/
dist/
build/
coverage/

# Python
.venv/
venv/
__pycache__/
*.py[cod]
.pytest_cache/
*.egg-info/

# Rust
target/

# Go / PHP / Ruby vendored deps
vendor/
.bundle/

# Java / Kotlin / Scala
.gradle/

# .NET
bin/
obj/

# Elixir
_build/
deps/

# Dart / Flutter
.dart_tool/
---
200


Command exited with code 124
Thinking…

docs.snowplow.io returns 200; pypi timed out (exit 124 on second curl, so pypi.org unreachable/slow). Let me check what docs say about Snowplow Signals and pricing.

Let me fetch some pages.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/" -o docs.html -w "%{http_code}\n"; grep -io "signals" docs.html | head; echo "--- search:"; timeout 25 curl -sS "https://docs.snowplow.io/search/?q=signals" -o s.html -w "%{http_code}\n"; ls -la
200
200
Signals
Signals
signals
Signals
signals
Signals
Signals
Signals
Signals
signals
--- search:
200
total 76
drwxrwxrwt  6 root root  4096 Nov 18 21:03 .
drwxr-xr-x 22 root root  4096 Sep 18 07:59 ..
drwx------  3 root root  4096 Nov 18 21:03 alg-duplex
-rw-------  1 root root 30619 Nov 18 21:03 docs.html
drwxr-xr-x  2 root root  4096 Oct 24 01:57 opencode
-rw-------  1 root root 16487 Nov 18 21:03 s.html
drwx------  3 root root  4096 Sep  5 00:40 systemd-private-a899c44729714dffa2c40386ace2ebb5-systemd-logind.service-aS7Bzb
drwx------  3 root root  4096 Sep  5 00:40 systemd-private-a899c44729714dffa2c40386ace2ebb5-systemd-resolved.service-m9NpBo
cd /tmp && for u in "https://snowplow.io/product/signals/" "https://snowplow.io/pricing/" "https://docs.snowplow.io/docs/signals/"; do echo "== $u"; timeout 20 curl -sS -L -o /dev/null -w "%{http_code} %{url_effective}\n" "$u"; done
== https://snowplow.io/product/signals/
== https://snowplow.io/product/signals/
404 https://snowplow.io/product/signals/
== https://snowplow.io/pricing/
200 https://snowplow.io/pricing
== https://docs.snowplow.io/docs/signals/
200 https://docs.snowplow.io/docs/signals/introduction/
Thinking…

Signals docs exist. Let me fetch the Signals intro and look for developer workflow / SDK / API, plus pricing page.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/introduction/" -o sig.html -w "%{http_code}\n" && python3 - <<'EOF'
import re,html
t=open('sig.html',encoding='utf-8',errors='ignore').read()
t=re.sub(r'<script.*?</script>','',t,flags=re.S)
t=re.sub(r'<style.*?</style>','',t,flags=re.S)
t=re.sub(r'<[^>]+>',' ',t)
t=html.unescape(t)
t=re.sub(r'\s+',' ',t)
print(t[:6000])
EOF
200
200
 Snowplow Signals overview | Snowplow Documentation Skip to main content Snowplow CDI Signals Reference Tutorials Platform & AI Release notes Search Support Try for free Filter navigation Get started Signals overview Quickstart with your coding agent Quickstart step by step Signals Set up and connect Data sources Define attributes Serve attributes Feed AI agents Intervene Predict outcomes For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/signals/introduction.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 . Signals Get started Signals overview On this page Why teams use Signals Why teams choose Signals over other tools How Signals works Find the right page Try a tutorial Copy page More page actions View as Markdown Download Markdown Open in Claude Open in ChatGPT Snowplow Signals overview Snowplow Signals computes user attributes from your behavioral data in real time, and serves them to your applications over an API. Attributes are calculated from your Snowplow event stream as events arrive, or synced from tables in Snowflake, BigQuery, or Databricks. Use Signals to: Personalize content, recommendations, and pricing based on what the user is doing in their current session Serve scores and predictions calculated in your warehouse, such as churn propensity, to your applications through one API Give chatbots and AI agents context about the user they're interacting with Trigger actions automatically when users meet criteria you define, such as offering a discount when a high-value cart is abandoned Serve up-to-date behavioral features to ML models, for use cases like lead scoring Signals free tier and Snowplow CDI New to Snowplow: the Signals free tier is a hosted environment, with event collection included, capped at 5 million events a month, with no end date or credit card. Snowplow runs it on AWS , in the US or the EU depending on the region you sign up from. Already run Snowplow CDI : Signals reads events from your existing pipeline, and is deployed in the AWS region you choose. See Set up Signals . To try Signals on your own web app, follow the quickstart , where a coding agent adds the tracking and configuration for you, or the step-by-step quickstart to do the same steps in Console. Why teams use Signals ​ Signals handles collection, calculation, and serving: Collection is built in : your Snowplow pipeline tracks and validates events, so you don't build a separate event pipeline, stream processor, or online store. Attributes are short definitions, not code : choose the events, an aggregation, and a time period, such as "product pages viewed in the last 10 minutes". Values update in the session : attributes update as each event arrives, so your application reads current values while the session is still in progress. One read combines live and historical data : a service returns stream attributes alongside warehouse-synced values. One definition serves real time and training : the same attributes build point-in-time datasets for ML models. Your systems decide : Signals serves the values, and your application, model, agent, or personalization engine decides what to do with them. Why teams choose Signals over other tools ​ Instead of Why teams choose Signals A feature store A feature store serves data you already collect and process. Signals collects and processes the events too, so you don't build ingestion. A customer data platform ( CDP ) CDP s update profiles and audiences in batches for marketing tools. Signals updates attributes as each event arrives, for use in the current session. Building it in-house You don't build, run, or maintain your own collection, stream processing, low-latency store, or API, so your engineers can work on your product instead. Many teams keep their CDP or feature store alongside Signals. For named vendor comparisons, see Evaluate Signals . How Signals works ​ Signals calculates attributes from your events and stores the latest values in the Profiles Store, where your applications and agents read them. A Snowplow tracker sends events to your pipeline. Signals updates the values of your attribute groups as each event arrives, or syncs them from warehouse tables. Applications read the values through a service . Agents read the user's recent events through an agentic context , or attribute values through the Signals MCP server. When values meet an intervention 's criteria, Signals pushes the intervention to subscribed applications. The components you configure: Attribute group : a versioned set of attributes, such as product_view_count_last_10_min , calculated for one attribute key. Attribute key : who or what attributes describe, such as domain_userid for a user or domain_sessionid for a session. Service : attribute groups pinned to specific versions, for applications to read. Intervention : an if-then rule on attribute values. The first time a user meets the rule, Signals pushes the intervention to subscribed applications, such as the browser plugin. Agentic context : the user's most recent events in the current session, up to 100 events and no older than 1 hour, as JSON or a narrative for an agent. See How Signals works for detail on each. Find the right page ​ I want to Page Try Signals on my own web app Quickstart Enable Signals on an existing Snowplow CDI account Set up Signals Send events for Signals to calculate from Send events to Signals Calculate attributes from events or warehouse tables Define attributes Read attributes in my application Services , then retrieve attributes Ground an AI agent in the user's current session Define agentic contexts Let an agent read Signals data as tools Signals MCP server React when a user meets criteria Define interventions , then subscribe to them Build training data for an ML model Create ML training datasets To manage Signals from a chat instead, connect your a
cd /tmp && timeout 25 curl -sS -L "https://snowplow.io/pricing" -o price.html -w "%{http_code}\n" && python3 - <<'EOF'
import re,html
t=open('price.html',encoding='utf-8',errors='ignore').read()
t=re.sub(r'<script.*?</script>','',t,flags=re.S); t=re.sub(r'<style.*?</style>','',t,flags=re.S)
t=re.sub(r'<[^>]+>',' ',t); t=html.unescape(t); t=re.sub(r'\s+',' ',t)
print(t[:7000])
EOF
200
200
 Pricing | Snowplow Pricing Product Releases Log in Snowplow home Products Customer Data Infrastructure Event Tracking Trackers for web, apps, servers and the CDN Event Studio The tracking plan your team owns Data Pipeline Every event validated and enriched as it arrives Identities One user across devices and logins Modeling & Analytics Agent Intelligence See the AI agents reading your site Digital Analytics Acquisition, engagement and funnels in your warehouse Ecommerce Analytics Revenue, purchase trends and checkout journeys Real-time & agentic Signals Live customer context for your apps and agents Event Forwarding Send events to your tools as they happen How it works The customer context layer See how Snowplow sits at the source, between your customers and every team. See the platform Explore Deployment options Self-hosted pipeline Security and compliance Sample data Developer Hub Solutions Use Cases Advanced Analytics Context Aware AI Agents Real-Time Personalization See All Use Cases Solution Accelerators Explore the Developer Hub Industries Games Media & Entertainment Retail & Ecommerce Software Financial Services Teams Data Engineering Software Engineering Product Analytics Data Science Marketing Technology Snowplow for Kafka Snowplow for SQL Snowplow for AWS Sagemaker Snowplow for Flink Compare Snowplow Integrations Integrations Catalog Connect your preferred tools for advanced analytics and real-time AI agent decisioning, from data sources to ML and agentic frameworks. See All Integrations Solution Accelerators Explore the Developer Hub ML & Agentic AI AWS Bedrock Gemini Enterprise Agent Platform LangChain Vercel AI SDK CopilotKit Databricks AWS Sagemaker Popular Destinations Databricks Snowflake Google BigQuery Google Cloud Platform (GCP) Amazon S3 Delta Lake Kafka Clickhouse See All Destinations Popular Sources Javascript Android iOS NodeJS See All Sources Customers Resources Learn More Blog Reports & Guides Webinars & Videos Snowplow Demo Videos Explore Developer Hub Get Started Integrations Solution Accelerators Find a partner Documentation GitHub Snowplow Community Customer Support Company About Snowplow Snowplow is the Customer Context Infrastructure that transforms raw behavioral data into real-time customer context for AI agents and advanced analytics. Data teams rely on Snowplow to collect and process event-level data in real time, delivering it to their warehouse, lake, or stream, without the engineering overhead of building data infrastructure. Product and engineering teams rely on it to power agentic AI systems, personalization, and fraud detection. About Us Careers Contact Us Newsroom Book a Demo Start for Free Book a Demo Start for Free Transparent Pricing, Tailored to Your Needs Flexible pricing scales with your business needs. Depending on what you choose, our rates are based on monthly event volume, hosting preferences, consumption, or destinations—you only pay for what you use. Contact us to find your ideal plan. 14-Day Free Trial ‍ (Full Product & Functionality) Get your environment in seconds, send events, and put behavioral data to work in your warehouse or your AI agents. No credit card required and no sales call to start. Need longer than 14 days? The Signals free tier runs on the same hosted environment with no end date, up to 5 million events a month. Start Your Free Trial Self-Hosted Pipeline (For Previous Open Source Users) Run a single Snowplow data pipeline in production. A self-managed, self-hosted option to remove the non-commercial use restriction defined under the terms of our SLULA 1.1 . Get more info Snowplow Platform (Fully Managed & Scalable) Fully managed, scalable solution for production workloads, offering real-time data pipelines, a UI console, AI-ready modeling, enterprise security, a real-time customer intelligence system, and more. Get a quote More than 20 first-party trackers and webhooks In-stream Enrichments Event Compression for Infrastructure Cost Savings 24/7 Customer Support Data Model Packs & Customizable Models Managed Auto-Scaling Data Quality Monitoring Data Product Studio Event Forwarding Signals Profiles Store Signals Interventions Single Sign-On and User Permissions Same-Day Pipeline Pipeline Oberservability Collector & latency SLA's Surge Protection Outage Protection & Global Availability Technical Services Access Advanced Governance, Security & Collaboration Patches to critical CVEs Start Your Free Trial Get more info Get a quote "Snowplow Signals provides our product and engineering teams with the real-time customer intelligence infrastructure they need to build adaptive, AI-powered experiences into our FindMyPast product...It’s a game-changer for hyper-personalizing each user’s deeply unique and personal experience." Anup Purewal Chief Data Officer “In our business, timing is everything. During major sporting events like the Super Bowl or NBA Finals, we have a finite window to act on user behavior insights. If we receive that information four hours after the event ends, it's essentially worthless. We've already missed the opportunity to optimize campaigns, adjust promotions, or personalize the experience when it matters most.” Tony Cui Senior Data Engineering Manager "A shopper who browses products on Burberry.com is telling us something about what she really wants. Thanks to Databricks Lakehouse Platform and Snowplow, we can build an AI-Ready Customer 360 so our client advisors have that information from the moment she walks into our store — and can deliver a personalized NextGen customer experience (CX)." Benjamin Stephens Senior Manager - Analytics “We would not have achieved our current level of self-serve data without Snowplow. It has enabled us to democratize our data culture, significantly improving our analytics coverage and deepening our insights.” Daniel Huang Data Engineer “I’ve never seen engineers and marketing people talk to each other as much as they are right now. All of our objectives are now aligned on shared outcomes. Access to first-party data has made our data engineers have more empathy for our marketers and our marketers are now more willing to provide insight into the campaigns they are running.” Darren Haken Head of Engineering (Data & Platform) See What Snowplow Can Do in a Free 14-Day Trial Create a live trial environment, send your first events, then work with it from your own coding tool through the MCP server or ask Snowplow Assistant in the console. No expert required, no credit card, no sales call. Start For Free Now Watch Our Demos Products Customer Data Infrastructure Event Tracking Event Studio Data Pipeline Identities Modeling & Analytics Agent Intelligence Digital Analytics Ecommerce Analytics Real-Time & Agentic Signals Event Forwarding Comparisons vs. Building a Pipeline vs. Google Analytics vs. Adobe vs. Segment vs. RudderStack vs. Hightouch vs. Tealium See all comparisons Customers HelloFresh Transavia Engel & Völkers Supercell Strava Burberry See customer s
Thinking…

There's a "Quickstart with your coding agent" page. Let me fetch the markdown versions: https://docs.snowplow.io/docs/signals/llms.txt and the quickstart for coding agents.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/llms.txt" -o sigllms.txt -w "%{http_code}\n" && head -80 sigllms.txt
200
200
# Snowplow Signals

> Snowplow Signals: getting started, setting up and connecting, data sources (events and warehouse tables), defining attributes, serving them through services and training datasets, feeding AI agents with agentic contexts and the MCP server, and interventions.

This index is part of the Snowplow documentation. Read the instructions for AI agents at the top of https://docs.snowplow.io/llms.txt before you write Snowplow code. Every link points to a Markdown copy of the page.

## Get started

- [Snowplow Signals overview](https://docs.snowplow.io/docs/signals/introduction.md): Snowplow Signals computes attributes from your behavioral data in real time and serves them to your applications over an API. Use it for in-session personalization, customer-aware agents, real-time triggers, and machine learning features.
- [Signals quickstart with your coding agent](https://docs.snowplow.io/docs/signals/quickstart.md): Sign up for Snowplow Signals, run one Snowplow CLI command to set up your project and coding agent, then let the agent add tracking, Signals configuration, and the code that uses it.
- [Calculate your first attributes in real time with Signals](https://docs.snowplow.io/docs/signals/get-started/quickstart-tutorial.md): Use Snowplow Console to define a Signals attribute group and service that calculate session metrics in real time, then retrieve them with the Python SDK.

## Set up and connect

- [How Signals works](https://docs.snowplow.io/docs/signals/concepts.md): Learn how Signals is deployed alongside your pipeline, and about the components you configure: attribute groups, attribute keys, data sources, services, interventions, agentic contexts, predictive attributes, and the Profiles Store.
- [Pull attributes or push interventions](https://docs.snowplow.io/docs/signals/concepts/pull-and-push.md): Signals delivers attributes in two ways: your application pulls attribute values when it needs them, or Signals pushes interventions when a user meets criteria.
- [Set up Signals](https://docs.snowplow.io/docs/signals/setup.md): Start on the Signals free tier, or enable Signals in Console for an existing Snowplow account, with an optional warehouse connection.
- [Connect to Snowplow Signals](https://docs.snowplow.io/docs/signals/connection.md): Get your Signals connection credentials, then connect with the Python SDK, Node.js SDK, or Signals API to manage configurations or consume calculated values.
- [Signals connection reference](https://docs.snowplow.io/docs/signals/connection/reference.md): Reference for connecting to Snowplow Signals: interface support by task, connection credentials, SDK client options and methods, and API and MCP endpoints.

## Data sources

- [Send events to Signals](https://docs.snowplow.io/docs/signals/data-sources/events.md): Add a Snowplow tracker to your application so Signals can calculate stream attributes from your events in real time.
- [Sync warehouse tables to Signals](https://docs.snowplow.io/docs/signals/attributes/warehouse-config.md): Connect Signals to existing warehouse tables to sync pre-calculated attributes. Configure table details, timestamp fields, and field mappings using the Console or the Python SDK.

## Define attributes

- [Define attributes in Signals](https://docs.snowplow.io/docs/signals/attributes.md): Define attributes within attribute groups to calculate behavioral data from real-time streams or your warehouse, then test and publish the configuration to Signals.
- [Define attribute groups](https://docs.snowplow.io/docs/signals/attributes/attribute-groups.md): Define attribute groups to calculate behavioral data from real-time event streams or sync pre-calculated warehouse tables. Configure attributes, attribute keys, TTL lifetimes, and test definitions before publishing.
- [Configure attributes](https://docs.snowplow.io/docs/signals/attributes/attributes.md): Define individual attributes within attribute groups by selecting event schemas or event specifications, properties, and aggregation types. Use time periods and criteria filters to control when attributes update.
- [Define attribute keys](https://docs.snowplow.io/docs/signals/attributes/attribute-keys.md): Create custom attribute keys based on any event property to specify the analytical context for attribute calculations. Use built-in keys like domain_userid or define your own.
- [Calculate attributes per person with identity resolution](https://docs.snowplow.io/docs/signals/attributes/identity-resolution.md): Calculate attributes per person with the Snowplow ID from Identities, and read them in your application with whichever identifier it already has, such as a cookie ID or a user ID.
- [Publish and manage Signals configuration](https://docs.snowplow.io/docs/signals/publish.md): How attribute groups, interventions, services, and agentic contexts move from draft to published, how versions work, and what unpublishing and deleting do.

## Serve attributes

- [Choose how to use Signals attributes](https://docs.snowplow.io/docs/signals/applications.md): Choose how your application, agent, or model reads Signals data: services, agentic contexts, the Signals MCP server, interventions, predictive attributes, or training datasets.
- [Define services](https://docs.snowplow.io/docs/signals/applications/services.md): Services group multiple versioned attribute groups into stable consumption interfaces for applications. Create and manage services to control which attribute versions your applications use.
- [Retrieve attributes in your application](https://docs.snowplow.io/docs/signals/applications/retrieve-attributes.md): Retrieve calculated attribute values from the Profiles Store using the Signals Python SDK, Node.js SDK, or API, either via a service or directly from an attribute group.
- [Read attributes from websites and apps](https://docs.snowplow.io/docs/signals/applications/public-services.md): Read a public Signals service directly from a website or mobile app, without an API token or a backend proxy, using the browser plugin, the iOS and Android trackers, or the Signals API.
- [Create ML training datasets](https://docs.snowplow.io/docs/signals/ml-training-datasets.md): Build labeled, point-in-time correct training datasets for machine learning models using the Signals Python SDK. Define anchor events, build datasets, and retrieve results.

## Feed AI agents

- [Define agentic contexts in Signals](https://docs.snowplow.io/docs/signals/agentic-contexts.md): Configure agentic contexts in Snowplow Signals using the Console or Python SDK to capture a user's recent session activity and ground your agents in real-time behavior.
- [Retrieve agentic contexts in your application](https://docs.snowplow.io/docs/signals/applications/agentic-contexts.md): Fetch an agentic context from Snowplow Signals as structured JSON or a plain-language narrative to ground your agents in real-time user activity.
- [Serve Signals data to your agent with the MCP server](https://docs.snowplow.io/docs/signals/applications/mcp-server.md): Connect an agent in your application to the Signals MCP server, so it can discover and read calculated attributes and agentic contexts as tools.

## Intervene

- [Define interventions to trigger real-time actions with Signals](https://docs.snowplow.io/docs/signals/interventions.md): Create rule-based interventions with criteria and targeting to automatically trigger actions when attribute values change, or push direct interventions. Configure using Console UI, Python SDK, or API.
- [Subscribe to and receive interventions in your applications](https://docs.snowplow.io/docs/signals/applications/subscribe.md): Subscribe to interventions by attribute key ID to automatically respond to user behavior changes. Use the Python SDK, browser tracker plugin, iOS and Android trackers, or Signals API to receive intervention payloads.

## Predict outcomes

- [Define predictive attributes in Signals](https://docs.snowplow.io/docs/signals/predictive-attributes.md): Configure predictive attributes in Snowplow Signals to train a model on your stream attributes and score how likely each session is to reach a goal, such as a purchase.
- [Retrieve predictive attribute scores in your application](https://docs.snowplow.io/docs/signals/applications/predictive-attributes.md): Score a session in real time with a published Snowplow Signals predictive attribute, using the Python SDK, Node.js SDK, or Signals API.

## Tutorials

Each link returns the complete tutorial as a single page. Individual steps are also published at their own URLs, listed at the top of each tutorial.

- [Track and personalize from Python with Snowplow Signals](https://docs.snowplow.io/tutorials/python-tracking-and-signals.md): Instrument a Python backend with the Snowplow tracker, then compute and act on real-time user attributes and interventions using the Signals Python SDK. (Signals implementation; use case: Real-time personalization; uses: Signals, Console, Python; 5 steps)
- [Build a Signals-powered AI agent with AWS Bedrock AgentCore](https://docs.snowplow.io/tutorials/signals-agentic-accelerator.md): Build a customer-facing AI agent using Strands Agents and AWS Bedrock AgentCore Memory, personalized with real-time behavioral data from Snowplow Signals. (Solution accelerator; use case: Customer-facing AI agents; uses: Signals, AWS Bedrock, Strands Agents, Jupyter notebook; 6 steps)
- [Build an AI agent with real-time user context using Signals and Vercel AI SDK](https://docs.snowplow.io/tutorials/signals-ai-agent-context.md): Build a Next.js AI agent that uses Snowplow Signals to deliver contextually aware responses based on live user behavior. (Signals implementation; use case: Customer-facing AI agents; uses: Signals, Vercel AI SDK, Next.js; 7 steps)
- [Build a real-time context-aware agent with Signals, Google ADK, and CopilotKit](https://docs.snowplow.io/tutorials/signals-google-adk-agent.md): Add Snowplow Signals to a Google ADK agent so it gets real-time user context for every response, and embed it in a React app with CopilotKit. (Solution accelerator; use case: Customer-facing AI agents; uses: Signals, Google ADK, CopilotKit, Gemini, React; 6 steps)
- [Personalize a Gemini Enterprise for CX agent with Snowplow Signals](https://docs.snowplow.io/tutorials/signals-google-cx-agent-studio.md): Give a CX Agent Studio concierge real-time shopper context from Signals, and track the agent's tool calls, intents, and decisions back into your pipeline. (Solution accelerator; use case: Customer-facing AI agents; uses: Signals, Gemini Enterprise for CX, CX Agent Studio, Next.js, Vercel, BigQuery; 7 steps)
- [Implement real-time interventions in an ecommerce app using Signals](https://docs.snowplow.io/tutorials/signals-interventions.md): Get hands-on with Signals interventions and a demo e-shop application. (Signals implementation; use case: Real-time personalization; uses: Signals, Jupyter notebook, React; 6 steps)
- [Manage Signals with AI assistants using the Snowplow MCP server](https://docs.snowplow.io/tutorials/signals-mcp.md): Connect the Snowplow MCP server to your AI coding assistant and define, test, and publish Signals attribute groups conversationally. (Signals implementation; use case: Real-time personalization; uses: Signals, Console, MCP, Claude Code; 5 steps)
- [Score prospects in real time using Signals and ML](https://docs.snowplow.io/tutorials/signals-ml-prospect-scoring.md): Try out Signals for live prospect scoring with machine learning. (Solution accelerator; use case: Real-time personalization; uses: Signals, Jupyter notebook, Machine learning; 7 steps)
- [Train and serve a purchase propensity model with Signals](https://docs.snowplow.io/tutorials/signals-ml-purchase-propensity.md): Build a point-in-time correct training dataset from Signals attributes, train a model on it, and score live sessions with the same attributes. (Signals implementation; use case: Real-time personalization; uses: Signals, Python, Snowflake, scikit-learn, FastAPI; 6 steps)
- [Build a personalized travel agent with Signals](https://docs.snowplow.io/tutorials/signals-personalize-travel.md): Set up a demo travel site, and integrate with Snowplow Signals to personalize content and chatbot responses based on user behavior. (Solution accelerator; use case: Customer-facing AI agents; uses: Signals, Local, Jupyter notebook, OpenAI, AI assistants; 8 steps)
cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/quickstart-with-your-coding-agent.md" -o qs.md -w "%{http_code}\n" && wc -l qs.md && head -120 qs.md
404
404
3 qs.md
<!doctype html><html lang=en dir=ltr class="plugin-native plugin-id-default" data-has-hydrated=false><head><meta charset=UTF-8><meta name=generator content="Docusaurus v3.10.1"><title data-rh=true>Page Not Found | Snowplow Documentation</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"/><meta data-rh=true name=twitter:card content=summary_large_image /><meta data-rh=true property=og:image content=https://docs.snowplow.io/img/snowplow-social-card.png /><meta data-rh=true name=twitter:image content=https://docs.snowplow.io/img/snowplow-social-card.png /><meta data-rh=true property=og:url content=https://docs.snowplow.io/404.html/ /><meta data-rh=true property=og:locale content=en /><meta data-rh=true name=docusaurus_locale content=en /><meta data-rh=true name=docusaurus_tag content=default /><meta data-rh=true name=docsearch:language content=en /><meta data-rh=true name=docsearch:docusaurus_tag content=default /><meta data-rh=true property=og:title content="Page Not Found | Snowplow Documentation"/><link data-rh=true rel=icon href=/img/favicon.ico /><link data-rh=true rel=canonical href=https://docs.snowplow.io/404.html/ /><link data-rh=true rel=alternate href=https://docs.snowplow.io/404.html/ hreflang=en /><link data-rh=true rel=alternate href=https://docs.snowplow.io/404.html/ hreflang=x-default /><link data-rh=true rel=preconnect href=https://9HS3C2MKTH-dsn.algolia.net crossorigin=anonymous /><link rel=search type=application/opensearchdescription+xml title="Snowplow Documentation" href=/opensearch.xml><script>!function(){window.semaphore=window.semaphore||[],window.ketch=function(){window.semaphore.push(arguments)};var e=document.createElement("script");e.type="text/javascript",e.src="https://global.ketchcdn.com/web/v3/config/snowplow_analytics/website_smart_tag/boot.js",e.defer=e.async=!0,document.getElementsByTagName("head")[0].appendChild(e)}()</script><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css type=text/css integrity=sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM crossorigin=anonymous><link rel=stylesheet href=/assets/css/styles.73cece7b.css /><script src=/assets/js/runtime~main.d108ca5c.js defer></script><script src=/assets/js/main.2830c777.js defer></script></head><body><svg style="display: none;"><defs>
<symbol id=theme-svg-external-link viewBox="0 0 24 24"><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
</defs></svg>
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme-4a1")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{for(var[t,e]of new URLSearchParams(window.location.search).entries())if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id=__docusaurus><div role=region aria-label="Skip to main content"><a class=skipToContent_fXgn href=#__docusaurus_skipToContent_fallback>Skip to main content</a></div><nav aria-label=Main class="theme-layout-navbar navbar navbar--fixed-top"><div class=navbar__inner><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded=false class="navbar__toggle clean-btn" type=button><svg width=30 height=30 viewBox="0 0 30 30" aria-hidden=true><path stroke=currentColor stroke-linecap=round stroke-miterlimit=10 stroke-width=2 d="M4 7h22M4 15h22M4 23h22"/></svg></button><a class=navbar__brand href=/><div class=navbar__logo><img src=/img/snowplow-logo.svg alt="Snowplow Logo" class="themedComponent_mlkZ themedComponent--light_NVdE"/><img src=/img/snowplow-logo.svg alt="Snowplow Logo" class="themedComponent_mlkZ themedComponent--dark_xIcU"/></div></a><nav class="product-switcher customized_AOMy" aria-label=Products><a class=product-switcher__link title="Switch to the Snowplow CDI docs" href=/docs/cdi/>Snowplow CDI</a><a class=product-switcher__link title="Switch to the Signals docs" href=/docs/signals/introduction/>Signals</a></nav><a class="navbar__item navbar__link customized_AOMy" href=/docs/api-reference/>Reference</a><a class="navbar__item navbar__link customized_AOMy" href=/tutorials/>Tutorials</a><a class="navbar__item navbar__link customized_AOMy" href=/docs/platform/>Platform & AI</a><a class="navbar__item navbar__link customized_AOMy" href=/release-notes/>Release notes</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><div class=navbarSearchContainer_Bca1><button type=button class="DocSearch DocSearch-Button" aria-label="Search (Meta+k)" aria-keyshortcuts=Meta+k><span class=DocSearch-Button-Container><svg width=20 height=20 class=DocSearch-Search-Icon viewBox="0 0 24 24" aria-hidden=true><circle cx=11 cy=11 r=8 stroke=currentColor fill=none stroke-width=1.4 /><path d="m21 21-4.3-4.3" stroke=currentColor fill=none stroke-linecap=round stroke-linejoin=round /></svg><span class=DocSearch-Button-Placeholder>Search</span></span><span class=DocSearch-Button-Keys></span></button></div><a href=https://support.snowplow.io/ target=_blank rel="noopener noreferrer" class="navbar__item navbar__link navbar-support-link customized_AOMy">Support<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><a href=https://snowplow.io/get-started/snowplow-free-trial target=_blank rel="noopener noreferrer" class="navbar__item navbar__link navbar-cta customized_AOMy">Try for free<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type=button disabled title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill=currentColor d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill=currentColor d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill=currentColor d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"/></svg></button></div></div></div><div role=presentation class=navbar-sidebar__backdrop></div></nav><div id=__docusaurus_skipToContent_fallback class="theme-layout-main main-wrapper mainWrapper_z2l0"><main class="container margin-vert--xl"><div class=row><div class="col col--6 col--offset-3"><h1 class=hero__title>Page Not Found</h1><p>We could not find what you were looking for.<p>Please contact the owner of the site that linked you to the original URL and let them know their link is broken.</div></div></main></div><footer class="theme-layout-footer footer"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Resources</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://github.com/snowplow/ target=_blank rel="noopener noreferrer" class=footer__link-item>GitHub<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://snowplow.io/ target=_blank rel="noopener noreferrer" class=footer__link-item>Snowplow.io<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a class=footer__link-item href=/docs/glossary/>Glossary</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Community</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://community.snowplow.io/ target=_blank rel="noopener noreferrer" class=footer__link-item>Snowplow community<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://support.snowplow.io/ target=_blank rel="noopener noreferrer" class=footer__link-item>Support<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Legal</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/cookie-preferences/>Cookie preferences</a><li class=footer__item><a class=footer__link-item href=/terms-and-conditions/>Terms and conditions</a><li class=footer__item><a class=footer__link-item href=/docs/licensing/>Licensing overview</a></ul></div></div><div class="footer__bottom text--center"><div class=margin-bottom--sm><img src=/img/Snowplow_icoOnly.svg alt=Snowplow class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width=32 height=28.5 /><img src=/img/Snowplow_icoOnly.svg alt=Snowplow class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width=32 height=28.5 /></div><div class=footer__copyright>Copyright © 2026 Snowplow Analytics Ltd.</div></div></div></footer></div></body>
Thinking…

The quickstart is at https://docs.snowplow.io/docs/signals/quickstart.md. Let's fetch it plus the connection page. Also read the top instructions at https://docs.snowplow.io/llms.txt.

Key question: can I actually do this without credentials? The quickstart requires signing up for a hosted account (human, credit-card-free signup) and running a Snowplow CLI command. I can't sign up (needs email/interactive signup). But maybe there's a dev workflow I can act on: write the code — a Python SDK example — that works once credentials are provided. Also check whether the CLI is installable and whether there's a demo/sandbox mode.

Let me fetch quickstart.md, connection.md, connection/reference.md, and the top-level llms.txt.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/quickstart.md" -o qs.md -w "%{http_code}\n" && wc -c qs.md && cat qs.md
200
200
4504 qs.md
# Signals quickstart with your coding agent
> Sign up for Snowplow Signals, run one Snowplow CLI command to set up your project and coding agent, then let the agent add tracking, Signals configuration, and the code that uses it.
> Source: https://docs.snowplow.io/docs/signals/quickstart/
> Documentation index: https://docs.snowplow.io/llms.txt

Add Signals to your web app with one command. The command sets up your project and your coding agent, and the agent then adds the tracking, the Signals configuration, and the code that uses it.

You'll need Node.js 18 or later, and a coding agent such as Claude Code, Cursor, or Codex. If you don't have a web app, the agent can create one.

## Sign up

Create an account on the [Signals free tier](https://signals.snowplow.io/start?utm_source=docs.snowplow.io\&utm_medium=referral). It comes with a pipeline and Signals enabled, and needs no credit card.

Already on Snowplow CDI? Check that [Signals is enabled](/docs/signals/setup/).

## Run the setup command

Run this in your project's root directory:

```bash
npx @snowplow/snowplow-cli signals setup
```

The command does the following:

1. Opens a browser window for you to log in to Console
2. Asks which Signals environment to use, if you have more than one
3. Creates an API key with Signals permissions only and writes it to `.env`
4. Installs the Snowplow plugin, with the [Snowplow MCP server](/docs/ai/snowplow-mcp/) and [skills](/docs/ai/skills/), in Claude Code, Cursor, or Codex
5. Offers to start your agent with a prompt that sets up Signals, or prints the prompt for you to paste

Keep `.env` out of version control. The command stops if it's already committed. For all options, see the [command reference](/docs/api-reference/snowplow-cli/reference/#signals-setup).

The agent asks what you want Signals to do. Describe the outcome, for example "show a different banner to visitors who've viewed pricing twice this session". It proposes a plan and waits for your approval, then asks again before it publishes anything. The first time it uses a Snowplow tool, a browser window opens for you to log in to Console.

### Set up without the CLI

To set up by hand, install the plugin:

```bash
npx plugins add snowplow/skills
```

Get the four [connection credentials](/docs/signals/connection/#get-your-connection-credentials) and add them to `.env` as `SNOWPLOW_SIGNALS_API_URL`, `SNOWPLOW_SIGNALS_ORG_ID`, `SNOWPLOW_SIGNALS_API_KEY_ID`, and `SNOWPLOW_SIGNALS_API_KEY`. Then start your agent and send:

```txt
Use the signals-setup skill to set up Snowplow Signals in this project.
```

## Check that it works

The agent finishes by showing live values and listing what it changed. To check for yourself, open the **Signals** section in [Console](https://console.snowplowanalytics.com) to see the published configuration, or use the [Snowplow Inspector](/docs/testing/snowplow-inspector/signals-integration/) to see attribute values as you use your app.

To check the credentials in `.env`, run:

```bash
npx @snowplow/snowplow-cli signals status
```

**Troubleshooting**

- If the browser login doesn't open, run `/mcp` in Claude Code, select the Snowplow server, and choose **Authenticate**. For other clients, see [authentication](/docs/ai/snowplow-mcp/#authentication).
- If `signals status` reports a problem, run the setup command again. It keeps credentials that work and replaces a rejected key.
- If the setup command can't ask which Signals environment to use, for example when an agent runs it, pass `--pipeline` with the pipeline's name or ID.
- If the attribute values are empty, generate a few more events in your app. Signals only calculates from events received after publishing. If they're still empty, check your browser's network tab for tracking requests to the Collector endpoint.
- If an ad blocker stops the tracking requests, turn it off for local testing. In production, serve the Collector from your own domain, or proxy the requests through your backend. See [cookies and ad blockers](/docs/get-started/tracking/cookies-and-ad-blockers/).

## Next steps

These pages explain what the agent built and other ways to work with Signals:

- Read [How Signals works](/docs/signals/concepts/) to understand the configuration the agent created
- Follow the [conversational Signals tutorial](/tutorials/signals-mcp/introduction/) for a longer walkthrough
- Prefer working in Console? Try the [Console quickstart tutorial](/docs/signals/get-started/quickstart-tutorial/)
cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/llms.txt" -o llms.txt -w "%{http_code}\n" && head -60 llms.txt
200
200
# Snowplow Documentation

> Authoritative Snowplow documentation for implementing event tracking, validation, enrichment, governance, and delivery of clean event-level behavioral data. Focus areas include composable analytics, composable CDP, in-product personalization, AI agentic applications, and feeding AI-ready real-time data into warehouses, lakes, streams, and real-time tools.

## Instructions for AI agents

Read this section before writing Snowplow code. Each link below points to a Markdown copy of the page: append `.md` to any docs URL, without the trailing slash, to fetch the Markdown version of that page.

### Current versions

These are the versions documented on this site at build time. Check the package registry for the latest release before you pin a version, and never copy a version number from a code sample without checking it.

- JavaScript tracker (tag) and Browser tracker (`@snowplow/browser-tracker`): v4 (4.8.0), check npm
- Node.js tracker (`@snowplow/node-tracker`): v4 (4.8.0), check npm
- iOS tracker (`SnowplowTracker`): v6 (6.5.0), check Swift Package Manager or CocoaPods
- Android tracker (`com.snowplowanalytics:snowplow-android-tracker`): v6 (6.6.1), check Maven Central
- Flutter tracker (`snowplow_tracker`): 0.11.3 (pre-1.0), check pub.dev
- Python tracker (`snowplow-tracker`): v1 (1.0.3), check PyPI
- Java tracker (`com.snowplowanalytics:snowplow-java-tracker`): v2 (2.1.0), check Maven Central
- Golang tracker (`github.com/snowplow/snowplow-golang-tracker/v3`): v3 (3.1.0), check pkg.go.dev
- .NET tracker (`Snowplow.Tracker`): v1 (1.3.0), check NuGet
- PHP tracker (`snowplow/snowplow-tracker`): 0.9.2 (pre-1.0), check Packagist
- Ruby tracker (`snowplow-tracker`): 0.8.0 (pre-1.0), check RubyGems
- Scala tracker: v2 (2.0.0), check Maven Central
- C++ tracker: v2 (2.0.0), check GitHub releases
- Rust tracker (`snowplow_tracker`): 0.2.0 (pre-1.0), check crates.io
- Unity tracker: 0.8.1 (pre-1.0), check GitHub releases
- Roku tracker: 0.4.0 (pre-1.0), check GitHub releases
- Lua tracker (`snowplowtracker`): 0.2.0 (pre-1.0), check LuaRocks

### Tracker feature support

Check this list before you suggest a tracker feature. For a feature that isn't supported, the tracker has no built-in method or plugin, so track it yourself with self-describing events and entities. The full matrix is at https://docs.snowplow.io/docs/sources.md.

- Web (JavaScript and Browser): https://docs.snowplow.io/docs/sources/web-trackers.md. support tier: actively maintained; supports: Page or screen views (Page and screen), Activity tracking, Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- Google Tag Manager: https://docs.snowplow.io/docs/sources/google-tag-manager.md. support tier: actively maintained; supports: Page or screen views (Page), Activity tracking, Built-in entities, Anonymous tracking, Ecommerce, Consent, Snowtype; not supported: Media.
- Google AMP: https://docs.snowplow.io/docs/sources/google-amp-tracker.md. support tier: maintained; supports: Page or screen views (Page), Activity tracking, Built-in entities; not supported: Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- Pixel: https://docs.snowplow.io/docs/sources/pixel-tracker.md. support tier: maintained; supports: Page or screen views (Page); not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- WebView: https://docs.snowplow.io/docs/sources/webview-tracker.md. support tier: early release; supports: Page or screen views (Page and screen); partial: Ecommerce; not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Consent, Snowtype.
- Android: https://docs.snowplow.io/docs/sources/mobile-trackers.md. support tier: actively maintained; supports: Page or screen views (Screen), Activity tracking, Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- iOS: https://docs.snowplow.io/docs/sources/mobile-trackers.md. support tier: actively maintained; supports: Page or screen views (Screen), Activity tracking, Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- React Native: https://docs.snowplow.io/docs/sources/react-native-tracker.md. support tier: actively maintained; supports: Page or screen views (Page and screen), Activity tracking, Built-in entities, Ecommerce, Snowtype; partial: Anonymous tracking, Consent; not supported: Media.
- Flutter: https://docs.snowplow.io/docs/sources/flutter-tracker.md. support tier: early release; supports: Page or screen views (Page and screen), Activity tracking, Built-in entities, Anonymous tracking, Media, Snowtype; partial: Consent; not supported: Ecommerce.
- Roku: https://docs.snowplow.io/docs/sources/roku-tracker.md. support tier: actively maintained; supports: Page or screen views (Screen), Built-in entities, Anonymous tracking, Media; not supported: Activity tracking, Ecommerce, Consent, Snowtype.
- Unity: https://docs.snowplow.io/docs/sources/unity-tracker.md. support tier: actively maintained; supports: Page or screen views (Page and screen), Anonymous tracking; partial: Ecommerce; not supported: Activity tracking, Built-in entities, Media, Consent, Snowtype.
- Node.js: https://docs.snowplow.io/docs/sources/node-js-tracker.md. support tier: actively maintained; supports: Page or screen views (Page and screen), Snowtype; partial: Anonymous tracking; not supported: Activity tracking, Built-in entities, Media, Ecommerce, Consent.
- Python: https://docs.snowplow.io/docs/sources/python-tracker.md. support tier: early release; supports: Page or screen views (Page and screen); partial: Activity tracking; not supported: Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- Golang: https://docs.snowplow.io/docs/sources/golang-tracker.md. support tier: actively maintained; supports: Page or screen views (Page and screen), Snowtype; partial: Ecommerce; not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Consent.
- Java: https://docs.snowplow.io/docs/sources/java-tracker.md. support tier: maintained; supports: Page or screen views (Page and screen), Snowtype; partial: Ecommerce; not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Consent.
- .NET: https://docs.snowplow.io/docs/sources/net-tracker.md. support tier: maintained; supports: Page or screen views (Page and screen); partial: Built-in entities, Ecommerce; not supported: Activity tracking, Anonymous tracking, Media, Consent, Snowtype.
- C++: https://docs.snowplow.io/docs/sources/c-tracker.md. support tier: actively maintained; supports: Page or screen views (Screen); partial: Built-in entities; not supported: Activity tracking, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- Scala: https://docs.snowplow.io/docs/sources/scala-tracker.md. support tier: maintained; supports: Page or screen views (Page); partial: Ecommerce; not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Consent, Snowtype.
- Ruby: https://docs.snowplow.io/docs/sources/ruby-tracker.md. support tier: actively maintained; supports: Page or screen views (Page and screen); partial: Ecommerce; not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Consent, Snowtype.
- PHP: https://docs.snowplow.io/docs/sources/php-tracker.md. support tier: early release; supports: Page or screen views (Page and screen); partial: Anonymous tracking, Ecommerce; not supported: Activity tracking, Built-in entities, Media, Consent, Snowtype.
- Rust: https://docs.snowplow.io/docs/sources/rust-tracker.md. support tier: early release; supports: Page or screen views (Screen); not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- Lua: https://docs.snowplow.io/docs/sources/lua-tracker.md. support tier: actively maintained; supports: Page or screen views (Screen); not supported: Activity tracking, Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.
- Tracking CLI: https://docs.snowplow.io/docs/sources/snowplow-tracking-cli.md. support tier: unsupported, do not use for new code; not supported: Page or screen views, Activity tracking, Built-in entities, Anonymous tracking, Media, Ecommerce, Consent, Snowtype.

### Signals SDKs

Thinking…

Let me read the Signals SDKs section of llms.txt and fetch the connection + reference pages. Then determine what I can do without credentials.

Key blocker: signup requires a browser/human (free tier signup at signals.snowplow.io/start) and the CLI setup opens a browser to log in. No credentials exist in env. So I cannot fully complete an end-to-end live example. But I can act on the developer workflow: write the code (a small app using the Python SDK / Node SDK + tracker) that reads credentials from .env, so once the user signs up and drops in the four credentials, it runs. That's within "use the hosted product through its SDK or API" — no local stacks.

But careful: can I install packages? pypi.org timed out earlier. Let me check npm and pypi reachability again with longer timeout.

Let me get the rest of llms.txt Signals SDKs section and connection docs.

cd /tmp && grep -n "Signals SDKs" -A 30 llms.txt | head -60
59:### Signals SDKs
59:### Signals SDKs
60-
61-- `snowplow-signals` on PyPI: Python SDK: define attribute groups, services, and interventions, and retrieve attributes
62-- `@snowplow/signals-node` on npm: Node.js SDK: retrieve attributes from server-side code
63-- `@snowplow/signals-browser-plugin` on npm: Browser tracker plugin: subscribe to interventions in the browser
64-- Signals overview: https://docs.snowplow.io/docs/signals/introduction.md. Signals quickstart: https://docs.snowplow.io/docs/signals/quickstart.md
65-
66-### Deprecated
67-
68-- Tracker pages under `previous-version` and `previous-versions` paths describe old majors, such as JavaScript tracker v2 and v3. Use them only to maintain existing code; write new code against the current major listed above.
69-- The Snowplow Web and Snowplow Mobile dbt packages are superseded by Unified Digital, and Fractribution by Attribution.
70-- SQL Runner data models are legacy. Use the dbt packages for new work.
71-- The User Agent Utils enrichment is deprecated. Use the YAUAA enrichment.
72-- The Snowplow Tracking CLI is deprecated. Use `snowplow-cli` to send events.
73-
74-### Terminology
75-
76-- Say "self-describing event", never "unstructured event". Column and API names such as `unstruct_event` and `ue_pr` keep the old name.
77-- Say "entity" or "entities", never "context" or "custom context". Column names such as `contexts_*` and tracker options such as `contexts` keep the old name.
78-- Every self-describing event and entity needs a JSON schema, addressed by an Iglu URI such as `iglu:com.acme/checkout/jsonschema/1-0-0`. Events that fail validation become failed events; they are not dropped silently.
79-- Product names: Snowplow CDI, Signals, Event Studio, Snowtype, Snowplow Micro.
80-
81-### Tools for agents
82-
83-- The Snowplow MCP server and skills let a coding agent create schemas, tracking plans, and Signals configuration in a Snowplow account: https://docs.snowplow.io/docs/ai/snowplow-mcp.md
84-- Every page in full, in one file: https://docs.snowplow.io/llms-full.txt
85-
86-## Indexes by product
87-
88-Each index below lists the pages for one part of the docs, in the same format as this file. Fetch the one that matches your task instead of reading this whole file.
89-
--
823:- [Tracker maintenance classification](https://docs.snowplow.io/docs/sources/tracker-maintenance-classification.md): Understand the maintenance groups for Snowplow trackers, dbt packages, and Signals SDKs, including production readiness and update schedules.
824-
825-## Sources > Webhooks
826-
827-- [Adjust webhook](https://docs.snowplow.io/docs/sources/webhooks/adjust-webhook.md): Track mobile attribution data including app installation and reattribution events from Adjust callbacks using the Iglu webhook adapter.
828-- [Iglu webhook](https://docs.snowplow.io/docs/sources/webhooks/iglu-webhook.md): Track self-describing events via GET or POST requests with custom JSON schemas for flexible third-party webhook integrations.
829-- [Collect data from third parties with webhooks](https://docs.snowplow.io/docs/sources/webhooks.md): Receive third-party event streams through webhooks for Adjust, Iglu, Iterable, MailGun, Mandrill, SendGrid, and Zendesk integrations.
830-- [Iterable webhook](https://docs.snowplow.io/docs/sources/webhooks/iterable.md): Track email opens, clicks, SMS, push notifications, and other Iterable system webhook events directly into Snowplow.
831-- [MailGun webhook](https://docs.snowplow.io/docs/sources/webhooks/mailgun.md): Track MailGun email events including delivered messages, hard bounces, spam complaints, unsubscribes, clicks, and opens.
832-- [Mandrill webhook](https://docs.snowplow.io/docs/sources/webhooks/mandrill.md): Track Mandrill email events including sent messages, bounces, opens, clicks, spam reports, rejections, and unsubscribes.
833-- [SendGrid webhook](https://docs.snowplow.io/docs/sources/webhooks/sendgrid.md): Track SendGrid email notification events including processed, delivered, bounced, opened, clicked, unsubscribed, and spam report events.
834-- [Zendesk webhook](https://docs.snowplow.io/docs/sources/webhooks/zendesk.md): Track Zendesk ticket events and user context data including ticket creation, updates, and associated requester, assignee, and submitter information.
835-
836-## Pipeline
837-
838-- [Collector configuration API reference](https://docs.snowplow.io/docs/pipeline/collector/configuration-reference.md): Reference for the Console API Collector configuration endpoint, its response fields and defaults, and the HTTP request headers the Snowplow Collector accepts.
839-- [Check your Collector configuration](https://docs.snowplow.io/docs/pipeline/collector.md): View your Snowplow Collector configuration in Console, or retrieve it from the Console API to add Collector health checks to your own monitoring.
840-- [Agent classification enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/agent-classification-enrichment.md): Identify AI crawlers and automated agents by classifying them by operator and purpose.
841-- [ASN lookup enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/asn-lookup-enrichment.md): Flag bot traffic by checking autonomous system numbers against known bad ASN lists.
842-- [Bot detection enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/bot-detection-enrichment.md): Consolidate bot indicators from multiple enrichments into a single entity for easier filtering and analysis.
843-- [Campaign attribution enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/campaign-attribution-enrichment.md): Link events to marketing campaigns by extracting attribution data from query string parameters.
844-- [Cookie extractor enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/cookie-extractor-enrichment.md): Extract name-value pairs from first-party cookies and attach them to events as derived contexts.
845-- [Cross-navigation enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/cross-navigation-enrichment.md): Parse cross-navigation data from query string parameters to track user journeys across domains and platforms.
846-- [Currency conversion enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/currency-conversion-enrichment.md): Convert transaction values to a base currency using Open Exchange Rates API for standardized reporting.
847-- [Custom API request enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/custom-api-request-enrichment.md): Enrich events with data from external HTTP APIs by making custom API requests during event processing.
848-- [Custom JavaScript enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/custom-javascript-enrichment.md): Write custom JavaScript code to transform and enrich events with flexible data manipulation logic.
849-- [Test JavaScript enrichments locally](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/custom-javascript-enrichment/testing.md): Test JavaScript enrichment code locally using Node.js before deploying to production pipelines.
850-- [Custom SQL query enrichment](https://docs.snowplow.io/docs/pipeline/enrichments/available-enrichments/custom-sql-enrichment.md): Query relational databases during enrichment to attach lookup data from MySQL, PostgreSQL, or other SQL databases.
cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/connection.md" -o conn.md -w "%{http_code}\n" && cat conn.md
200
200
# Connect to Snowplow Signals
> Get your Signals connection credentials, then connect with the Python SDK, Node.js SDK, or Signals API to manage configurations or consume calculated values.
> Source: https://docs.snowplow.io/docs/signals/connection/
> Documentation index: https://docs.snowplow.io/llms.txt

You connect to Signals for one of two reasons: to define and manage configurations, such as attribute groups, services, and interventions, or to consume calculated values in your application. A data team usually does the first with Console or the Python SDK. Application code does the second with the SDKs, the browser plugin, the API, or the Signals MCP server.

Console needs no connection setup: log in and go to the **Signals** section. The Snowplow MCP server, which lets your own coding agent manage Signals for you, authenticates with your Console account rather than with Signals credentials. Install it, with the Snowplow [skills](/docs/ai/skills/), using `npx plugins add snowplow/skills`.

This page covers connecting from code. For the full list of interfaces and what each supports, the client constructor options, and the SDK methods, see the [Signals connection reference](/docs/signals/connection/reference/).

## Before you begin

You'll need:

- Signals enabled for your organization. If it isn't, see [Set up Signals](/docs/signals/setup/).
- Permission to create API keys in Console. See [Account management](/docs/account-management/).
- Python 3, or Node.js, depending on the SDK you use

Choose your interface:

- **To define configurations in code**: use the [Python SDK](/docs/signals/connection/reference/#python-sdk). We recommend keeping your configurations in a new repository. A Jupyter notebook is the easiest place to start.
- **To retrieve attributes in a Node.js application**: use the [Node.js SDK](/docs/signals/connection/reference/#nodejs-sdk).
- **To subscribe to interventions in the browser**: use the [browser plugin](/docs/signals/applications/subscribe/).
- **From any other language, or over plain HTTP**: use the [Signals API](#signals-api).
- **From an AI agent in your application**: use the [Signals MCP server](/docs/signals/applications/mcp-server/).

## Steps

These steps connect with the Python or Node.js SDK. The code tabs remember your choice.

### Get your connection credentials

The SDKs, Signals API, and Signals MCP server use the same four values. The browser plugin needs only your Signals API URL, because the subscription endpoint doesn't authenticate. Find the Signals API URL and organization ID in Console under **Signals** > **Overview**, and [create an API key](/docs/account-management/) to get the API key and its ID. Signals has two API key permissions: **View** for reading attributes and agentic contexts, and **Edit** for also creating and publishing configuration. Give an application that only reads attributes a key with **View**. The [connection credentials reference](/docs/signals/connection/reference/#connection-credentials) lists the format of each.

Add the four values to your environment secrets. Keep them on the server: don't commit them or send them to the browser.

### Install the SDK

**Python:**

```bash
pip install snowplow-signals
```

**Node.js:**

```bash
npm i @snowplow/signals-node
# or
yarn add @snowplow/signals-node
# or
pnpm i @snowplow/signals-node
```

***

To call the Signals API directly, skip this step and go to [Signals API](#signals-api).

### Create a Signals client

Create a `Signals` object with your connection credentials:

**Python:**

```python
from snowplow_signals import Signals

sp_signals = Signals(
    api_url=SIGNALS_API_URL,
    api_key=SNOWPLOW_API_KEY,
    api_key_id=SNOWPLOW_API_KEY_ID,
    org_id=SNOWPLOW_ORG_ID,
)
```

**Node.js:**

```typescript
import { Signals } from '@snowplow/signals-node';

const signals = new Signals({
  baseUrl: SIGNALS_API_URL,
  apiKey: SNOWPLOW_API_KEY,
  apiKeyId: SNOWPLOW_API_KEY_ID,
  organizationId: SNOWPLOW_ORG_ID,
});
```

***

### Verify the connection

Retrieve attributes from a published service. Replace `my_service` with one of your services, and the identifier with an attribute key value that has events, such as your own `domain_userid`:

**Python:**

```python
sp_signals.get_service_attributes(
    name="my_service",
    attribute_key="domain_userid",
    identifier="218e8926-3858-431d-b2ed-66da03a1cbe5",
)
```

**Node.js:**

```typescript
await signals.getServiceAttributes({
  name: "my_service",
  attribute_key: "domain_userid",
  identifier: "218e8926-3858-431d-b2ed-66da03a1cbe5",
});
```

***

A response with attribute values, even empty ones, means the connection works. If you don't have a service yet, follow the [quickstart tutorial](/docs/signals/get-started/quickstart-tutorial/) to create one.

Next, define configurations with [attribute groups](/docs/signals/attributes/attribute-groups/), [services](/docs/signals/applications/services/), and [interventions](/docs/signals/interventions/), or consume them with [retrieve attributes](/docs/signals/applications/retrieve-attributes/) and [subscribe to interventions](/docs/signals/applications/subscribe/).

## Signals API

The SDKs handle authentication for you. When you call the Signals API directly, exchange your API key for a token first, then send it with each request.

### Get an access token

Exchange your API key and key ID for an access token, using the Console Credentials API:

```bash
curl \
  --header 'X-API-Key-ID: <API_KEY_ID>' \
  --header 'X-API-Key: <API_KEY>' \
  https://console.snowplowanalytics.com/api/msc/v1/organizations/<ORGANIZATION_ID>/credentials/v3/token
```

This returns a JWT, valid for 24 hours:

```json
{ "accessToken": "<JWT>" }
```

[Account management](/docs/account-management/#obtain-an-access-token) describes the full process, including how to create an API key.

### Call the API

Send the JWT as a Bearer token in the `Authorization` header:

```bash
curl \
  --header 'Authorization: Bearer <JWT>' \
  {{API_URL}}/api/v1/registry/interventions
```

A list of interventions, even an empty one, means the connection works. The [Signals API reference](/docs/signals/connection/reference/#signals-api-endpoints) shows where to find the full API documentation for your deployment.

To connect, define attributes, and act on interventions from Python end to end, follow the [Python tracking and Signals tutorial](/tutorials/python-tracking-and-signals/introduction/).
Thinking…

Now, can I actually install packages? Check npm and pypi reachability.

Plan: build a minimal example that runs against the hosted product using SDK, reading credentials from .env. But no credentials exist. So the deliverable will be code + clear instructions, blocked on the user's signup (human browser step). I should verify whether SDK packages can be installed here so I can at least smoke-test imports/structure.

Let me test network for pypi and npm with longer timeouts.

cd /tmp && timeout 40 curl -sS -o /dev/null -w "pypi:%{http_code}\n" https://pypi.org/pypi/snowplow-signals/json; timeout 40 curl -sS -o /dev/null -w "npm:%{http_code}\n" https://registry.npmjs.org/@snowplow%2fsignals-node
pypi:200
pypi:200
npm:200
cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/connection/reference.md" -o ref.md -w "%{http_code}\n" && wc -c ref.md && head -120 ref.md
200
200
11220 ref.md
# Signals connection reference
> Reference for connecting to Snowplow Signals: interface support by task, connection credentials, SDK client options and methods, and API and MCP endpoints.
> Source: https://docs.snowplow.io/docs/signals/connection/reference/
> Documentation index: https://docs.snowplow.io/llms.txt

This page lists the interfaces, credentials, client options, and methods for connecting to Signals. To set up a connection step by step, see [Connect to Snowplow Signals](/docs/signals/connection/).

## Parameters

The SDKs, the Signals API, and the Signals MCP server use the same connection credentials. The browser plugin needs only the Signals API URL, and Console and the Snowplow MCP server use your Console login.

### Interfaces

This table shows which interface supports which task:

| Interface                                                 | Define configurations | Retrieve attributes | Subscribe to interventions | Credentials          |
| --------------------------------------------------------- | --------------------- | ------------------- | -------------------------- | -------------------- |
| [Snowplow Console](https://console.snowplowanalytics.com) | ✅                     | ❌                   | ❌                          | Console login        |
| [Python SDK](#python-sdk)                                 | ✅                     | ✅                   | ✅                          | API key              |
| [Node.js SDK](#nodejs-sdk)                                | ❌                     | ✅                   | ❌                          | API key              |
| [Browser plugin](/docs/signals/applications/subscribe/)   | ❌                     | ❌                   | ✅                          | Signals API URL only |
| [Signals API](#signals-api-endpoints)                     | ✅                     | ✅                   | ✅                          | API key              |
| [Signals MCP server](#signals-mcp-server-endpoint)        | ❌                     | ✅                   | ❌                          | API key              |
| [Snowplow MCP server](/docs/ai/snowplow-mcp/)             | ✅                     | ✅                   | ❌                          | Console login        |

Console uses your Console login. The Snowplow MCP server authenticates with your Console account or a Console API key.

### Connection credentials

The SDKs, Signals API, and Signals MCP server use the same four values. The browser plugin needs only your Signals API URL, because the subscription endpoint doesn't authenticate. Add the values to your environment secrets.

| Value           | Description                             | Where to get it                                          | Format                                             |
| --------------- | --------------------------------------- | -------------------------------------------------------- | -------------------------------------------------- |
| Signals API URL | The API URL for your Signals deployment | Console > **Signals** > **Overview**                     | `https://{{123abc}}.signals.snowplowanalytics.com` |
| API key         | A Snowplow API key                      | [Generated by you](/docs/account-management/) in Console | UUID                                               |
| API key ID      | A Snowplow API key ID                   | [Generated by you](/docs/account-management/) in Console | UUID                                               |
| Organization ID | Your Snowplow organization ID           | Console > **Signals** > **Overview**                     | UUID                                               |

### Python SDK

Package: [`snowplow-signals`](https://pypi.org/project/snowplow-signals/) on PyPI. The `Signals` constructor takes the connection credentials:

| Name         | Type  | Required | Description                   |
| ------------ | ----- | -------- | ----------------------------- |
| `api_url`    | `str` | Required | The Signals API URL.          |
| `api_key`    | `str` | Required | The Snowplow API key.         |
| `api_key_id` | `str` | Required | The Snowplow API key ID.      |
| `org_id`     | `str` | Required | The Snowplow organization ID. |

#### Python SDK methods

| Method                   | Description                                                                 |
| ------------------------ | --------------------------------------------------------------------------- |
| `publish`                | Registers the provided objects with Signals                                 |
| `unpublish`              | Unpublishes objects from Signals                                            |
| `delete`                 | Fully deletes objects from Signals (must unpublish first)                   |
| `test`                   | Tests an attribute group against the atomic events table                    |
| `get_service_attributes` | Retrieves attributes for a specific service from the Profiles Store         |
| `get_group_attributes`   | Retrieves attributes for a specific attribute group from the Profiles Store |
| `get_attribute_group`    | Retrieves an attribute group from the Profiles Store                        |
| `push_intervention`      | Pushes an intervention to subscribers for a set of attribute keys           |
| `pull_interventions`     | Opens a streaming subscription of interventions for a set of attribute keys |

### Node.js SDK

Package: [`@snowplow/signals-node`](https://www.npmjs.com/package/@snowplow/signals-node) on npm. The `Signals` constructor takes one options object:

| Name             | Type     | Required | Description                   |
| ---------------- | -------- | -------- | ----------------------------- |
| `baseUrl`        | `string` | Required | The Signals API URL.          |
| `apiKey`         | `string` | Required | The Snowplow API key.         |
| `apiKeyId`       | `string` | Required | The Snowplow API key ID.      |
| `organizationId` | `string` | Required | The Snowplow organization ID. |

#### Node.js SDK methods

All methods are asynchronous and return a promise. This table describes version 0.4 of the SDK.

| Method                      | Arguments                                                                                                              | Returns                                                                                                                                             |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getServiceAttributes`      | `{ name, attribute_key, identifier }`                                                                                  | An object of attribute names and values for one identifier                                                                                          |
| `getBatchServiceAttributes` | `{ name, attribute_key, identifiers }`, where `identifiers` is a non-empty array                                       | An object of attribute names, each with an array of values in the same order as `identifiers`                                                       |
| `getGroupAttributes`        | `{ name, version, attributes, attribute_key, identifier }`, where `attributes` is a non-empty array of attribute names | An object of attribute names and values for one identifier                                                                                          |
| `getAgenticContext`         | `{ name, identifier, format }`, where `format` is `"json"` (default) or `"narrative"`                                  | An object with `attribute_key`, `identifier`, `name`, `started_at_ms`, `events`, and optional `prompt` and `version`; or a string for `"narrative"` |

The `attribute_key` argument takes any attribute key name, such as `domain_userid`. The SDK also exports `SnowplowStandardAttributeKeys` with the four built-in keys: `USER_ID`, `DOMAIN_USER_ID`, `DOMAIN_SESSION_ID`, and `NETWORK_USER_ID`.

[Retrieve attributes](/docs/signals/applications/retrieve-attributes/) and [Retrieve agentic contexts](/docs/signals/applications/agentic-contexts/) show each method in use.

#### Authentication and errors

The SDK exchanges your API key and key ID for an access token from Console on the first request, and reuses it until it expires. The constructor throws if `baseUrl` is missing, or if the API key, key ID, or organization ID is missing.

When a request fails, the method rejects with an `Error` whose message starts with `[Signals] API error:`, followed by the HTTP status and the response body. If the access token can't be fetched, the message is `[Signals] Failed to fetch access token`. The SDK doesn't set a request timeout or retry failed requests, so add them in your application if you need them.

## Endpoints

All endpoints are relative to your Signals API URL, shown here as `{{API_URL}}`.

### Signals API endpoints

| Endpoint                 | Description                                                                                                        |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `{{API_URL}}/docs/`      | Swagger documentation for your deployment. Console also links to it from **Overview** > **Configuration details**. |
| `{{API_URL}}/api/v1/...` | The Signals API. Requests need an `Authorization: Bearer <JWT>` header.                                            |

To get the JWT, exchange your API key and key ID at the Console Credentials API, `https://console.snowplowanalytics.com/api/msc/v1/organizations/<ORGANIZATION_ID>/credentials/v3/token`, sending them in the `X-API-Key-ID` and `X-API-Key` headers. The token is valid for 24 hours. See [Connect to Snowplow Signals](/docs/signals/connection/#signals-api) for the commands.

### Signals MCP server endpoint

The [Signals MCP server](/docs/signals/applications/mcp-server/) serves calculated attributes and agentic contexts to an agent in your application as read-only tools. It uses streamable HTTP at:

```bash
{{API_URL}}/mcp
```

It takes the API key and key ID directly, in the `X-API-Key-Id` and `X-API-Key` headers, so there's no token exchange.

## Example

Thinking…

Good. Both registries reachable. Now build a minimal example. Since I can't sign up (interactive browser), I'll build a small Python project that:

  1. Sends events with the Python tracker? Python tracker is "early release" and needs a collector endpoint. Actually the simplest demo: define an attribute group + service via the Python SDK (management), send events via tracker to the collector, then retrieve attributes.

Better scope for "simple example":

  • signals_demo/config.py or a single script demo.py that:
    • reads credentials from .env
    • defines an attribute group (e.g., page_view_count_last_10_min, pricing_page_views) keyed on domain_userid
    • defines a service pinning it
    • tests the group, publishes
    • sends a few events via the Snowplow Python tracker to the collector
    • retrieves attributes via get_service_attributes
  • .env.example, README, requirements.txt

Also need collector URL for the tracker — the user's pipeline collector. Let me check the "Send events to Signals" page and the attribute-groups page for the exact SDK API shape (class names for attribute group, attributes, services). Let me fetch those docs.

Also check events.md for collector URL and tracker setup.

Also check whether there's a signals python SDK docs page describing objects: e.g., https://docs.snowplow.io/docs/signals/attributes/attribute-groups.md.

Let me install the SDK locally to introspect the actual API (safe: pip install into venv). But pip download may be slow; pypi was reachable. Let's try.

I'll fetch docs in parallel with pip install.

cd /tmp && timeout 30 curl -sS -L "https://docs.snowplow.io/docs/signals/attributes/attribute-groups.md" -o ag.md -w "ag:%{http_code}\n"; timeout 30 curl -sS -L "https://docs.snowplow.io/docs/signals/applications/services.md" -o svc.md -w "svc:%{http_code}\n"; timeout 30 curl -sS -L "https://docs.snowplow.io/docs/signals/data-sources/events.md" -o ev.md -w "ev:%{http_code}\n"; wc -c ag.md svc.md ev.md
ag:200
ag:200
svc:200
ev:200
15602 ag.md
 7897 svc.md
 5617 ev.md
29116 total
cd /tmp && python3 -m venv v1 >/dev/null 2>&1 && timeout 180 ./v1/bin/pip install -q snowplow-signals snowplow-tracker 2>&1 | tail -5; timeout 20 ./v1/bin/pip show snowplow-signals 2>/dev/null | head -8
Name: snowplow-signals
Name: snowplow-signals
Version: 0.4.13
Summary: Python SDK for Snowplow Signals — define, deploy, and retrieve user attributes for real-time customer context & digital personalization
Home-page: 
Author: Snowplow
Author-email: support@snowplow.io
License: 
Location: /tmp/v1/lib/python3.12/site-packages
Thinking…

SDK installed. Let me introspect its API to write accurate code.

cd /tmp && ./v1/bin/python -c "
import snowplow_signals as s, inspect
print([n for n in dir(s) if not n.startswith('_')])
" 
['AgenticContextResponse', 'AtomicProperty', 'Attribute', 'AttributeGroup', 'AttributeKey', 'AttributeKeyId', 'AttributeKeyIdentifiers', 'AttributesWarehouseTab
['AgenticContextResponse', 'AtomicProperty', 'Attribute', 'AttributeGroup', 'AttributeKey', 'AttributeKeyId', 'AttributeKeyIdentifiers', 'AttributesWarehouseTable', 'BatchAttributeGroup', 'BatchSource', 'CalculatedProperty', 'Criteria', 'Criterion', 'DataShortfall', 'DatasetBundle', 'DatasetEvent', 'DatasetPreviewResponse', 'DatasetRunResponse', 'DatasetRunStatus', 'DatasetRunStatusResponse', 'EntityProperty', 'Event', 'EventLog', 'EventLogAtomicProperty', 'EventLogEntityProperty', 'EventLogEvent', 'EventLogEventProperty', 'EventLogResponse', 'EventProperty', 'EventSelection', 'ExternalBatchAttributeGroup', 'Field', 'InterventionCriteriaAll', 'InterventionCriteriaAny', 'InterventionCriteriaNone', 'InterventionCriterion', 'InterventionInstance', 'LinkAttributeKey', 'PagePing', 'PageView', 'PredictiveAttribute', 'PredictiveAttributeResponse', 'PredictiveAttributeScore', 'PredictiveAttributeTestResponse', 'PredictiveAttributeTestSplit', 'PredictiveAttributeTraining', 'PredictiveAttributeTrainingError', 'RuleIntervention', 'Service', 'SessionAnchors', 'Signals', 'SignalsAPIError', 'SignalsSandbox', 'SourceGroupReference', 'StreamAttributeGroup', 'StructuredEvent', 'TrainingPreset', 'TrainingRunStatus', 'TrainingSpan', 'UserSuppliedAnchors', 'WarehouseTable', 'api_client', 'attribute_reference', 'attributes_client', 'dataset_client', 'definitions', 'domain_sessionid', 'domain_userid', 'interventions_client', 'interventions_subscription', 'models', 'network_userid', 'predictive_attributes_client', 'registry_client', 'session_attribute_key', 'signals', 'snowplow_id', 'testing_client', 'user_attribute_key', 'user_id']
cd /tmp && sed -n '1,140p' ag.md
# Define attribute groups
# Define attribute groups
> Define attribute groups to calculate behavioral data from real-time event streams or sync pre-calculated warehouse tables. Configure attributes, attribute keys, TTL lifetimes, and test definitions before publishing.
> Source: https://docs.snowplow.io/docs/signals/attributes/attribute-groups/
> Documentation index: https://docs.snowplow.io/llms.txt

Define the behavior you want to capture in [attribute groups](/docs/signals/concepts/#attribute-groups). Choose whether to calculate attributes from your event stream or sync pre-calculated values from your warehouse.

**Console:**

To create an attribute group, go to **Signals** > **Attribute groups** in Snowplow Console and follow the instructions.

![Create attribute group form with name, description, data source, and owner fields](/assets/images/attribute-group-create-044c79261e16a089c56ad7396a1b5d03.png)

The first step is to specify:

- A unique name
- An optional description
- The email address of the primary owner or maintainer
- Which data source you want to use

**Python SDK:**

Use a `StreamAttributeGroup` to calculate attributes from the real-time event stream.

```python
from snowplow_signals import Attribute, Event, StreamAttributeGroup, domain_sessionid

# Attributes are defined separately: see Configure attributes
page_view_count = Attribute(
    name="page_view_count",
    type="int32",
    events=[
        Event(vendor="com.snowplowanalytics.snowplow", name="page_view", version="1-0-0")
    ],
    aggregation="counter",
)
button_click_counter = Attribute(
    name="button_click_counter",
    type="int32",
    events=[
        Event(vendor="com.snowplowanalytics.snowplow", name="button_click", version="1-0-0")
    ],
    aggregation="counter",
)

my_attribute_group = StreamAttributeGroup(
    name="my_attribute_group",
    version=1,
    attribute_key=domain_sessionid,
    owner="user@company.com",
    attributes=[
        page_view_count,
        button_click_counter,
    ],
)
```

***

## Define the attribute group

An attribute group definition has several parts, described in this section. The most important choice is the data source, which determines how attributes are calculated and which options are available.

### Data source

There are two [sources](/docs/signals/concepts/#choose-a-data-source) to choose from:

**Console:**

- **Stream**: real-time Snowplow event stream, with an optional warehouse backfill
- **Warehouse**: pre-calculated values in a warehouse table that you sync to the Profiles Store

**Python SDK:**

- **`StreamAttributeGroup`**: calculates attributes from the real-time event stream, with an optional backfill
- **`ExternalBatchAttributeGroup`**: syncs pre-calculated values from an existing warehouse table to the Profiles Store

***

Attribute groups are configured differently based on the data source.

### Stream

Signals calculates attributes from events in your real-time stream. Check out the [quickstart tutorial](/docs/signals/get-started/quickstart-tutorial/) for a step-by-step guide.

You'll need to define the [attributes](/docs/signals/attributes/attributes/) you want to calculate from your event stream.

#### Backfill attributes

Stream attribute groups only calculate attributes from the moment they are published. If you want to include historical data, enable backfill when creating the group.

**Console:**

> **Note: Warehouse connection**
>
> A warehouse connection is required to use the backfill option. Snowflake, BigQuery, and Databricks are supported.

Enable **Backfill attributes** when creating the group. A date picker appears — select the date from which Signals should backfill attribute values from your Snowplow `atomic` events table. On publish, Signals backfills all events from that date up to the publish timestamp using your warehouse, based on the `load_tstamp` column.

Backfill operates within a defined period: from your selected start date to the publish timestamp. This can take some time depending on data volume. The streaming engine starts immediately on publish and processes all new events in real time. Once backfill completes its defined period, only the streaming engine is active. You can monitor progress with the status bar in Snowplow Console.

![Stream attribute group with Backfill attributes toggle enabled and date picker shown](/assets/images/attribute-group-stream-backfill-23cd971f6082d139bb9a9411c17a7772.png)

**Python SDK:**

Set `backfill_since_tstamp` on your `StreamAttributeGroup` to specify the earliest date to backfill from. This date is matched against the `load_tstamp` column of your Snowplow `atomic` events table, the time each event was loaded into your warehouse.

```python
from datetime import datetime, timezone
from snowplow_signals import StreamAttributeGroup, domain_userid

# page_view_count: the attribute from Define the attribute group

my_attribute_group = StreamAttributeGroup(
    name="my_attribute_group",
    version=1,
    attribute_key=domain_userid,
    owner="user@company.com",
    attributes=[page_view_count],
    backfill_since_tstamp=datetime(2025, 1, 1, tzinfo=timezone.utc),
)
```

***

### Warehouse

Attribute groups with a warehouse source don't require attribute definition, as no calculation is performed. This source type syncs existing, pre-calculated warehouse values to your Profiles Store using the batch engine.

See [Sync warehouse tables](/docs/signals/attributes/warehouse-config/) for full configuration details.

**Console:**

Provide the warehouse and table details, and select which fields you want to send to Signals.

![Warehouse source configuration showing warehouse table and field mapping options](/assets/images/attribute-group-warehouse-fields-645921d8d99b1a8c4cd7aec3ac157b2a.png)

**Python SDK:**

Use `ExternalBatchAttributeGroup` instead of `StreamAttributeGroup`. See [Sync warehouse tables](/docs/signals/attributes/warehouse-config/) for the full SDK reference.
Thinking…

Let me read svc.md (services) and the attributes.md (time periods, criteria) and events.md (tracker + collector). Also inspect SDK signatures for StreamAttributeGroup, Attribute, Service, Signals.publish, get_service_attributes, SignalsSandbox (test?).

Let me do both in parallel.

cd /tmp && sed -n '1,120p' svc.md; echo "=====EVENTS====="; sed -n '1,90p' ev.md
# Define services
# Define services
> Services group multiple versioned attribute groups into stable consumption interfaces for applications. Create and manage services to control which attribute versions your applications use.
> Source: https://docs.snowplow.io/docs/signals/applications/services/
> Documentation index: https://docs.snowplow.io/llms.txt

[Services](/docs/signals/concepts/#services) group attribute groups together for serving to your applications. They provide a stable interface for [retrieving attributes](/docs/signals/applications/retrieve-attributes/): we strongly recommend using services in production applications.

The Node.js SDK reads services but can't create them. Use Console or the Python SDK to define services.

A service can include both stream attribute groups and [warehouse attribute groups](/docs/signals/attributes/warehouse-config/). If they use the same attribute key, one request to the service returns the real-time and warehouse attributes for that user together.

**Console:**

To create a service, go to **Signals** > **Services** in Snowplow Console and follow the instructions.

![Create service form with name, description, owner, and attribute group selection](/assets/images/service-create-85585d669c129ebb7cb30d74209dfc12.png)

To configure a service, you'll need to specify:

- A unique name
- An optional description
- The email address of the primary owner or maintainer
- Which attribute groups to include

**Python SDK:**

Use the `Service` class to define a service. You can refer to attribute groups either by passing the objects directly, or by name and version using a dictionary:

```python
from snowplow_signals import Service

# Refer to attribute groups by name and version
my_service = Service(
    name='my_service',
    description='A collection of attribute groups',
    owner="user@company.com",
    attribute_groups=[
        {"name": "user_attributes", "version": 2},
        {"name": "session_attributes", "version": 1},
    ],
)

# Or pass the objects directly
my_service = Service(
    name='my_service',
    description='A collection of attribute groups',
    owner="user@company.com",
    attribute_groups=[
        my_attribute_group,
        another_attribute_group,
    ],
)
```

This table lists all available arguments for a `Service`:

| Argument           | Description                                                                                                                                | Type                             | Required? |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | --------- |
| `name`             | The name of the service                                                                                                                    | `string`                         | ✅         |
| `description`      | A description of the service                                                                                                               | `string`                         | ❌         |
| `owner`            | The owner of the service                                                                                                                   | `string`                         | ✅         |
| `attribute_groups` | List of attribute groups with optional version specification                                                                               | list of `AttributeGroup` or dict | ❌         |
| `access_mode`      | Who can read the service: `authenticated` (the default) or `public`. See [Control who can read a service](#control-who-can-read-a-service) | `string`                         | ❌         |

***

## Versioning

When choosing which attribute groups to include, you'll select a specific version of each attribute group.

Services themselves are not versioned. You can update them to use different attribute groups, or different attribute group versions, at any time.

**Console:**

![Service configuration showing selected attribute groups with version numbers](/assets/images/service-groups-adfabeee05def063578d69fda35203b2.png)

**Python SDK:**

Specify the version of each attribute group in the `attribute_groups` list using a dictionary with `name` and `version` keys, or by using a versioned `AttributeGroup` object directly.

***

## Control who can read a service

Each service has an access mode that decides who can read its attributes:

- `authenticated`: reading the service requires a Snowplow API token, so only your own backend can read it. This is the default.
- `public`: websites and apps can also read the service directly, without a token, for one identifier at a time. See [Read attributes from websites and apps](/docs/signals/applications/public-services/).

Use a public service when you want to personalize a page or screen with the current user's attributes, without building a backend to hold the API token and proxy the request.

> **Warning: Public services expose their attributes**
>
> Anyone who has an identifier, such as a user's `domain_userid`, can read that user's attributes from a public service. Every attribute group in the service is exposed. Only make a service public if all of its attributes are safe to show to the user they describe, and are keyed by an identifier the browser or device already holds, such as `domain_userid` or `client_session_user_id`. Don't include personal or sensitive data in a public service.

Signals only answers public reads for identifiers in UUID format, which can't be guessed or enumerated. A public service can still be read with an API token, in the same way as any other service.

**Console:**

Choose the access mode in the **Access** section of the service form: **Private** or **Public**. Choosing **Public** opens a confirmation dialog that describes what becomes readable. Click **Make public** to confirm.

Public services show a **Public** badge in the services list and on the service details page. In the attribute groups tables, the badge also marks every attribute group that's part of a public service.

**Python SDK:**

Set `access_mode` to `public` when defining the service. This needs version 0.4.13 or later of the Python SDK.

```python
from snowplow_signals import Service

my_public_service = Service(
    name='my_public_service',
    owner="user@company.com",
    attribute_groups=[
        {"name": "page_engagement", "version": 1},
    ],
    access_mode="public",
)

sp_signals.publish([my_public_service])
=====EVENTS=====
# Send events to Signals
> Add a Snowplow tracker to your application so Signals can calculate stream attributes from your events in real time.
> Source: https://docs.snowplow.io/docs/signals/data-sources/events/
> Documentation index: https://docs.snowplow.io/llms.txt

Signals calculates stream attributes from Snowplow [events](/docs/fundamentals/events/). On the free tier, event collection is included, so you add a Snowplow tracker to your application and point it at your Collector endpoint. If you already run Snowplow, Signals reads the events from your existing pipeline, and you don't need to change your tracking.

> **Note: Signals free tier and Snowplow CDI**
>
> New to Snowplow: the [Signals free tier](https://signals.snowplow.io/start?utm_source=docs.snowplow.io\&utm_medium=referral) is a hosted environment, with event collection included, capped at 5 million events a month, with no end date or credit card. Snowplow runs it on AWS, in the US or the EU depending on the region you sign up from.
>
> Already run Snowplow CDI: Signals reads events from your existing pipeline, and is deployed in the AWS region you choose. See [Set up Signals](/docs/signals/setup/#choose-your-starting-point).

Use events as the data source when you need attributes that update in real time, such as the number of products a user viewed in the last ten minutes. To bring in pre-calculated values such as CRM or transactional data, [sync warehouse tables](/docs/signals/attributes/warehouse-config/) instead. [Choose a data source](/docs/signals/concepts/#choose-a-data-source) compares the options.

## Before you begin

You need a Signals environment. If you don't have one yet, [set up Signals](/docs/signals/setup/) first. Then:

- On the free tier: have your Collector endpoint and Signals API URL ready. Find the Collector URL in Console > **Pipelines** > select your pipeline > **Configuration** > **Collector Domains**, and the Signals API URL in Console > **Signals** > **Overview**.
- With an existing Snowplow pipeline: nothing changes, because your trackers already send to your Collector.

On either path, these are the only additions Signals needs:

- Set `user_id` in your tracker if you want attributes per logged-in user.
- Add the [Signals browser plugin](/docs/signals/applications/subscribe/) if a web application receives interventions.
- Check that your events carry the identifiers your [attribute keys](/docs/signals/attributes/attribute-keys/) need.

## Add tracking for Signals

Follow these steps to add tracking, send the identifiers Signals needs, and check that events arrive.

### Add a tracker to your application

Each Snowplow tracker sends events to the Collector, and the Signals streaming engine inspects every event as it arrives. Choose the tracker for the platform that generates the behavior you want to calculate attributes from:

| Platform                   | Tracker                | Start here                                                               |
| -------------------------- | ---------------------- | ------------------------------------------------------------------------ |
| Website or single-page app | JavaScript tracker     | [Web tracker quick start](/docs/sources/web-trackers/quick-start-guide/) |
| iOS or Android app         | Native mobile trackers | [Mobile trackers](/docs/sources/mobile-trackers/)                        |
| Node.js backend            | Node.js tracker        | [Node.js tracker](/docs/sources/node-js-tracker/)                        |
| Python backend             | Python tracker         | [Python tracker](/docs/sources/python-tracker/)                          |
| Any other platform         |                        | [All trackers](/docs/sources/)                                           |

Built-in events such as page views, page pings, and screen views work without extra setup. For behavior that the built-in events don't cover, track [self-describing events](/docs/fundamentals/events/#self-describing-events) and attach [entities](/docs/fundamentals/entities/), then define attributes on their properties.

To have a coding agent add the tracking for you, follow the [Signals quickstart with your coding agent](/docs/signals/quickstart/).

### Send the identifiers your attribute keys use

Signals calculates each attribute per [attribute key](/docs/signals/attributes/attribute-keys/), such as a user or a session. The built-in attribute keys read the atomic [user fields](/docs/fundamentals/canonical-event/#user-fields) that the trackers set on every event:

- `domain_userid` and `domain_sessionid`: set automatically by the JavaScript tracker
- `network_userid`: set by the Collector cookie
- `user_id`: set by your application after the user logs in

If you want attributes per logged-in user, set the user ID in your tracker when the user logs in.

### Check that events arrive

Signals only calculates attributes from events received after you publish the attribute group, unless you enable [backfill](/docs/signals/concepts/#backfill). To check your tracking:

1. Open your application and generate a few events.
2. Check your browser's network tab for tracking requests to the Collector endpoint. If an ad blocker stops them, see [cookies and ad blockers](/docs/get-started/tracking/cookies-and-ad-blockers/).
3. Inspect the events with the [Snowplow Inspector](/docs/testing/snowplow-inspector/) browser extension to confirm they include the identifiers your attribute keys need.
4. [Retrieve the attributes](/docs/signals/applications/retrieve-attributes/) to confirm Signals is calculating them.
cd /tmp && ./v1/bin/python - <<'EOF'
import inspect
from snowplow_signals import Attribute, StreamAttributeGroup, Service, Signals, Event, Criteria, Criterion, PageView, SignalsSandbox
for c in [Attribute, Event, StreamAttributeGroup, Service, Criteria, Criterion]:
    print("==",c.__name__)
    try: print(inspect.signature(c.__init__))
    except Exception as e: print(e)
print("== Signals methods")
print([m for m in dir(Signals) if not m.startswith('_')])
for m in ['publish','test','get_service_attributes','get_group_attributes','unpublish','delete']:
    print(m, inspect.signature(getattr(Signals,m)))
EOF
== Attribute
== Attribute
(self, /, **data: 'Any') -> 'None'
== Event
(self, /, **data: 'Any') -> 'None'
== StreamAttributeGroup
(self, /, **data: 'Any') -> 'None'
== Service
(self, /, **data: 'Any') -> 'None'
== Criteria
(self, /, **data: 'Any') -> 'None'
== Criterion
(self, /, **data: 'Any') -> 'None'
== Signals methods
['build_dataset_with_custom_anchors', 'build_dataset_with_session_anchors', 'cancel_dataset_run', 'create_predictive_attribute', 'delete', 'get_agentic_context', 'get_attribute_group', 'get_dataset_run_preview', 'get_dataset_run_status', 'get_event_log', 'get_group_attributes', 'get_predictive_attribute', 'get_predictive_attribute_score', 'get_predictive_attribute_training', 'get_service_attributes', 'publish', 'publish_predictive_attribute', 'pull_interventions', 'push_intervention', 'submit_dataset_run_with_custom_anchors', 'submit_dataset_run_with_session_anchors', 'test', 'test_predictive_attribute', 'train_predictive_attribute', 'unpublish', 'unpublish_predictive_attribute', 'wait_for_predictive_attribute_training']
publish (self, objects: list[snowplow_signals.models.attribute_group.AttributeGroup | snowplow_signals.models.service.Service | snowplow_signals.models.attribute_key.AttributeKey | snowplow_signals.models.interventions.RuleIntervention | snowplow_signals.models.event_log.EventLog | snowplow_signals.models.predictive_attribute.PredictiveAttribute]) -> list[snowplow_signals.models.attribute_group.AttributeGroup | snowplow_signals.models.service.Service | snowplow_signals.models.attribute_key.AttributeKey | snowplow_signals.models.interventions.RuleIntervention | snowplow_signals.models.event_log.EventLog | snowplow_signals.models.predictive_attribute.PredictiveAttribute]
test (self, attribute_group: snowplow_signals.models.attribute_group.AttributeGroup, attribute_key_ids: list[str | snowplow_signals.models.model.AttributeKeyId] | None = None, app_ids: list[str] | None = None, window: datetime.timedelta = datetime.timedelta(seconds=3600)) -> pandas.core.frame.DataFrame
get_service_attributes (self, name: str, attribute_key: str, identifier: str) -> dict[str, typing.Any]
get_group_attributes (self, name: str, version: int, attributes: list[str] | str, attribute_key: str, identifier: str) -> dict[str, typing.Any]
unpublish (self, objects: list[snowplow_signals.models.attribute_group.AttributeGroup | snowplow_signals.models.service.Service | snowplow_signals.models.attribute_key.AttributeKey | snowplow_signals.models.interventions.RuleIntervention | snowplow_signals.models.event_log.EventLog | snowplow_signals.models.predictive_attribute.PredictiveAttribute]) -> list[snowplow_signals.models.attribute_group.AttributeGroup | snowplow_signals.models.service.Service | snowplow_signals.models.attribute_key.AttributeKey | snowplow_signals.models.interventions.RuleIntervention | snowplow_signals.models.event_log.EventLog | snowplow_signals.models.predictive_attribute.PredictiveAttribute]
delete (self, objects: list[snowplow_signals.models.attribute_group.AttributeGroup | snowplow_signals.models.service.Service | snowplow_signals.models.attribute_key.AttributeKey | snowplow_signals.models.interventions.RuleIntervention | snowplow_signals.models.event_log.EventLog | snowplow_signals.models.predictive_attribute.PredictiveAttribute]) -> None
Thinking…

Pydantic models. Let me check Attribute fields (time_period etc.), StreamAttributeGroup fields, Service fields, and SignalsSandbox (which may let me validate definitions locally without credentials! That's useful for a runnable offline smoke test).

Let me inspect the model fields.

cd /tmp && ./v1/bin/python - <<'EOF'
from snowplow_signals import Attribute, StreamAttributeGroup, Service, Event, Criteria, Criterion, SignalsSandbox, PageView
import inspect
for c in [Attribute, Event, StreamAttributeGroup, Service, Criteria, Criterion, PageView]:
    print("==", c.__name__)
    for n,f in c.model_fields.items():
        print("  ", n, f.annotation, "required" if f.is_required() else f"default={f.default}")
print("== SignalsSandbox")
print(inspect.signature(SignalsSandbox.__init__))
print([m for m in dir(SignalsSandbox) if not m.startswith('_')])
print(inspect.getdoc(SignalsSandbox))
EOF
Failed== Attribute
== Attribute
   name <class 'str'> required
   description typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^[^\\x00]*$', ascii_only=None)]] default=None
   type typing.Literal['bytes', 'string', 'int32', 'int64', 'double', 'float', 'bool', 'unix_timestamp', 'timestamp', 'bytes_list', 'string_list', 'int32_list', 'int64_list', 'double_list', 'float_list', 'bool_list', 'unix_timestamp_list', 'dict'] required
   events typing.List[snowplow_signals.models.model.Event] required
   aggregation typing.Literal['counter', 'sum', 'min', 'max', 'mean', 'first', 'last', 'unique_list', 'most_frequent', 'least_frequent', 'category_count', 'approx_count_distinct', 'time_since_last', 'time_since_first'] required
   property typing.Union[snowplow_signals.models.model.AtomicProperty, snowplow_signals.models.model.EventProperty, snowplow_signals.models.model.EntityProperty, snowplow_signals.models.property_wrapper.CalculatedProperty, NoneType] default=None
   criteria typing.Optional[snowplow_signals.models.model.Criteria] default=None
   period typing.Optional[datetime.timedelta] default=None
   default_value typing.Union[str, int, float, bool, typing.List[typing.Union[str, int, float, bool]], NoneType] default=None
   time_unit typing.Optional[typing.Literal['s', 'min', 'h', 'd']] default=None
   ttl typing.Optional[datetime.timedelta] default=None
== Event
   name typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=128, pattern='^[a-zA-Z0-9-_]+$', ascii_only=None)]] default=None
   vendor typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=128, pattern='^[a-zA-Z0-9-_.]+$', ascii_only=None)]] default=None
   version typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^[0-9]+-[0-9]+-[0-9]+$', ascii_only=None)]] default=None
   event_specification_id typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=1, max_length=None, pattern=None, ascii_only=None)]] default=None
== StreamAttributeGroup
   name <class 'str'> required
   version typing.Optional[int] default=1
   attribute_key snowplow_signals.models.attribute_key.AttributeKey | snowplow_signals.models.model.LinkAttributeKey required
   ttl typing.Optional[datetime.timedelta] default=None
   batch_source typing.Literal[None] default=None
   online typing.Optional[bool] default=True
   offline typing.Literal[False] default=False
   description typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^[^\\x00]*$', ascii_only=None)]] default=None
   owner <class 'pydantic.networks.EmailStr'> required
   fields typing.Literal[None] default=None
   attributes list[snowplow_signals.models.model.Attribute] required
   is_published typing.Optional[bool] default=False
   backfill_since_tstamp typing.Optional[datetime.datetime] default=None
   refresh_rate typing.Optional[datetime.timedelta] default=None
== Service
   name <class 'str'> required
   description typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^[^\\x00]*$', ascii_only=None)]] default=None
   attribute_groups list[snowplow_signals.models.model.VersionedLinkAttributeGroup | snowplow_signals.models.attribute_group.AttributeGroup] default=None
   owner <class 'pydantic.networks.EmailStr'> required
   access_mode typing.Optional[typing.Literal['authenticated', 'public']] default=authenticated
   is_published typing.Optional[bool] default=False
== Criteria
   all list[snowplow_signals.models.criterion_wrapper.Criterion] | None default=None
   any list[snowplow_signals.models.criterion_wrapper.Criterion] | None default=None
== Criterion
   property typing.Union[snowplow_signals.models.model.AtomicProperty, snowplow_signals.models.model.EventProperty, snowplow_signals.models.model.EntityProperty, snowplow_signals.models.model.CalculatedProperty] required
   operator typing.Literal['=', '!=', '<', '>', '<=', '>=', 'like', 'in', 'is null', 'is not null'] required
   value typing.Union[str, int, float, bool, typing.List[str], typing.List[int], typing.List[float], typing.List[bool], NoneType] default=None
== PageView
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
AttributeError: 'function' object has no attribute 'model_fields'


Command exited with code 1
cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/attributes/attributes.md" -o att.md -w "%{http_code}\n" && grep -n "Python SDK" -A 60 att.md | head -140
200
200
23:With the Python SDK, these settings are arguments to the `Attribute` class, listed in [all attribute options](#all-attribute-options).
24-
25-### Select events
26-
27-Use the event filter to choose which event types to calculate the attribute from. The event filter is optional — leaving it empty means the attribute is calculated from all event types.
28-
29-**Console:**
30-
31-![Event filter dropdown showing available event specifications, Snowplow, and custom event schemas](/assets/images/attribute-event-specs-6a0d11cd44d222a129e9ff120c06bcab.png)
32-
33-Click the dropdown to see the available events, listed by name and vendor:
34-
35-- **Event Specifications**: select any [event specification](/docs/event-studio/tracking-plans/event-specifications/) from an existing [tracking plan](/docs/event-studio/tracking-plans/).
36-- **Snowplow events**: select any built-in Snowplow or [Iglu Central](https://iglucentral.com) schema. [Structured](/docs/events/custom-events/#structured-events) events aren't listed here. To calculate an attribute from them, see [Calculate attributes from structured events](#calculate-attributes-from-structured-events).
37-- **Custom events**: select any schema or data structure available within your pipeline.
38-
39-> **Note: Searching for events**
40->
41-> The search finds direct matches only, so use the exact name of the event, schema, or vendor.
42-
43-> **Tip: Matching all events**
44->
45-> To calculate an attribute across all event types — for example, a total event counter or the first value of an atomic field seen across your entire pipeline — leave the event filter empty. The attribute will then update for every event Signals processes, regardless of schema.
46-
47-Once you've selected an event and version, click **Confirm** to add the attribute to your attribute group.
48-
49:**Python SDK:**
50-
51-The `events` list describes the types of events the attribute is calculated from, as references to Snowplow event schemas. Pass an empty list (`events=[]`) to match all event types.
52-
53-An `Event` accepts the following parameters:
54-
55-| Argument  | Description                                     | Type     |
56-| --------- | ----------------------------------------------- | -------- |
57-| `name`    | `event_name` column in `atomic.events` table    | `string` |
58-| `vendor`  | `event_vendor` column in `atomic.events` table  | `string` |
59-| `version` | `event_version` column in `atomic.events` table | `string` |
60-
61-All parameters are optional and work as wildcards. Some examples:
62-
63-```python
64-# A specific event version
65-Event(
66-    name="destination",
67-    vendor="com.snowplowanalytics.snowplow.media",
68-    version="2-0-2"
69-)
70-
71-# All versions of an event
72-Event(
73-    name="destination",
74-    vendor="com.snowplowanalytics.snowplow.media",
75-)
76-
77-# All events for a vendor
78-Event(vendor="com.snowplowanalytics.snowplow.media")
79-
80-# Built-in Snowplow events
81-sp_page_view = Event(name="page_view", vendor="com.snowplowanalytics.snowplow", version="1-0-0")
82-sp_page_ping = Event(name="page_ping", vendor="com.snowplowanalytics.snowplow", version="1-0-0")
83-# Structured events
84-sp_structured = Event(name="event", vendor="com.google.analytics", version="1-0-0")
85-
86-# All event types (empty list — attribute fires for every event)
87-events=[]
88-```
89-
90-***
91-
92-### Choose an aggregation
93-
94-Signals supports the following aggregation types:
95-
96-| Aggregation           | Description                                                                                                             | Required property type in schema      | Notes                                                                                                                  |
97-| --------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
98-| Counter               | Count events                                                                                                            | No property used for this aggregation |                                                                                                                        |
99-| Sum                   | Sum of property values                                                                                                  | Numeric                               |                                                                                                                        |
100-| Min                   | Minimum property value                                                                                                  | Numeric                               |                                                                                                                        |
101-| Max                   | Maximum property value                                                                                                  | Numeric                               |                                                                                                                        |
102-| Mean                  | Average of property values                                                                                              | Numeric                               |                                                                                                                        |
103-| First                 | First property value seen                                                                                               | String, Numeric, Boolean              | Earliest by `derived_tstamp`, not by arrival order                                                                     |
104-| Last                  | Last property value seen                                                                                                | String, Numeric, Boolean              | Latest by `derived_tstamp`, not by arrival order                                                                       |
105-| Most Frequent         | Most frequent property value seen                                                                                       | String, Numeric, Boolean              | Tracks up to 100 distinct values; ties are broken arbitrarily                                                          |
106-| Least Frequent        | Least frequent property value seen                                                                                      | String, Numeric, Boolean              | Tracks up to 100 distinct values; ties are broken arbitrarily                                                          |
107-| Approx Count Distinct | Approximate distinct count ([HyperLogLog](https://redis.io/docs/latest/develop/data-types/probabilistic/hyperloglogs/)) | String, Numeric, Boolean              | Approximate, with a typical error around 1%. Don't use where an exact count matters                                    |
108-| Category Count        | Dictionary of unique values and their counts                                                                            | String, Numeric, Boolean              | Keeps the 100 highest-count values; lower-count values are dropped                                                     |
109-| Unique List           | List of unique property values                                                                                          | String, Numeric, Boolean              | Ordered oldest to newest by `derived_tstamp`, capped at 100 values. See [Unique list ordering](#unique-list-ordering)  |
--
135:**Python SDK:**
136-
137-Set the `aggregation` argument using the lowercase snake\_case version of the aggregation name, e.g. `"counter"`, `"most_frequent"`, `"approx_count_distinct"`.
138-
139-***
140-
141-### Select a property
142-
143-You can calculate attributes based on properties in any part of your events:
144-
145-- [Atomic](/docs/fundamentals/canonical-event/) properties: available for all events
146-- Event schema properties: properties within your chosen event
147-- Entity properties: properties from schemas tracked as entities with your chosen event
148-- Calculated properties: a value derived by combining other properties, described [below](#calculated-properties)
149-
150-**Console:**
151-
152-![Property selection interface with atomic, event schema, and entity property tabs](/assets/images/attribute-property-selector-a7b80bf29e7ad463fa280f1cd5bd5f51.png)
153-
154-Click **Confirm** to specify the property for this attribute.
155-
156:**Python SDK:**
157-
158-Use the `property` argument on `Attribute` with one of these helper classes:
159-
160-- `AtomicProperty` — targets atomic properties in the event payload
161-- `EventProperty` — targets properties in the event data structure
162-- `EntityProperty` — targets properties in entity data structures
163-- `CalculatedProperty` — combines several of the above into a derived value, described [below](#calculated-properties)
164-
165-```python
166-# Atomic property
167-AtomicProperty(name="app_id")
168-
169-# Property in an event data structure
170-EventProperty(
171-    vendor="com.example",
172-    name="test_event",
173-    major_version=1,
174-    path="action"
175-)
176-
177-# Property in an entity
178-EntityProperty(
179-    vendor="com.example",
180-    name="user_context",
181-    major_version=1,
182-    path="age"
183-)
184-```
185-
186-***
Thinking…

Good. Now check SignalsSandbox — it may allow local validation/testing without credentials, which would let me actually run something here.

cd /tmp && ./v1/bin/python - <<'EOF'
import inspect, snowplow_signals
from snowplow_signals import SignalsSandbox
print(inspect.getsource(SignalsSandbox)[:4000])
EOF
class SignalsSandbox(BaseSignalsWithApiClient):
class SignalsSandbox(BaseSignalsWithApiClient):
    """Interface to interact with Snowplow Signals AI in SANDBOX mode"""

    def __init__(
        self,
        *,
        api_url: str,
        sandbox_token: str,
    ):
        super().__init__(
            api_client=ApiClient(
                api_url=api_url, auth_mode="sandbox", sandbox_token=sandbox_token
            )
        )

Thinking…

Sandbox requires a sandbox token — presumably obtained from Console/skills. Let me check docs for "sandbox" usage. Search llms-full or the skills docs. grep the sigllms.txt for sandbox.

Also check how sandbox_token is obtained — maybe via snowplow-cli or the MCP server. Let's grep docs.

cd /tmp && grep -rn "sandbox" sigllms.txt llms.txt | head -20; echo "---"; timeout 25 curl -sS -L "https://docs.snowplow.io/docs/ai/snowplow-mcp.md" -o mcp.md -w "%{http_code}\n"; grep -in "sandbox" mcp.md | head -20
llms.txt:299:- [Privacy Sandbox](https://docs.snowplow.io/docs/sources/web-trackers/previous-versions/browser-tracker-v3-reference/plugins/privacy-sandbox.md):
llms.txt:299:- [Privacy Sandbox](https://docs.snowplow.io/docs/sources/web-trackers/previous-versions/browser-tracker-v3-reference/plugins/privacy-sandbox.md): Documentation for Privacy Sandbox in the web tracker. [previous version]
llms.txt:381:- [Privacy Sandbox](https://docs.snowplow.io/docs/sources/web-trackers/previous-versions/web-trackers-v3/tracking-events/privacy-sandbox.md): Documentation for Privacy Sandbox in the web tracker. [previous version]
llms.txt:426:- [Track Privacy Sandbox browser data with the web trackers](https://docs.snowplow.io/docs/sources/web-trackers/tracking-events/privacy-sandbox.md): Capture Privacy Sandbox data including Topics API information for privacy-preserving interest-based advertising and content personalization.
llms.txt:1493:- 2025-11-05 [Introducing Signals Sandbox: start experimenting with new solution accelerators](https://docs.snowplow.io/release-notes/introducing-signals-sandbox-start-experimenting-with-new-solution-accelerators.md) (Signals): The Snowplow Signals Sandbox is available today to all users.
---
200
cd /tmp && grep -rn "SignalsSandbox\|sandbox_token" v1/lib/python3.12/site-packages/snowplow_signals/*.py v1/lib/python3.12/site-packages/snowplow_signals/**/*.py 2>/dev/null | head -20
v1/lib/python3.12/site-packages/snowplow_signals/__init__.py:70:from snowplow_signals.signals import Signals, SignalsSandbox
v1/lib/python3.12/site-packages/snowplow_signals/__init__.py:70:from snowplow_signals.signals import Signals, SignalsSandbox
v1/lib/python3.12/site-packages/snowplow_signals/__init__.py:87:    "SignalsSandbox",
v1/lib/python3.12/site-packages/snowplow_signals/api_client.py:24:        sandbox_token: str | None = None,
v1/lib/python3.12/site-packages/snowplow_signals/api_client.py:31:        self.sandbox_token = sandbox_token
v1/lib/python3.12/site-packages/snowplow_signals/api_client.py:36:            if not self.sandbox_token:
v1/lib/python3.12/site-packages/snowplow_signals/api_client.py:38:                    "When auth_mode is 'sandbox' a non-empty sandbox_token must be provided"
v1/lib/python3.12/site-packages/snowplow_signals/api_client.py:80:            if not self.sandbox_token:
v1/lib/python3.12/site-packages/snowplow_signals/api_client.py:82:                    "When auth_mode is 'sandbox' a non-empty sandbox_token must be provided"
v1/lib/python3.12/site-packages/snowplow_signals/api_client.py:84:            return self.sandbox_token
v1/lib/python3.12/site-packages/snowplow_signals/signals.py:795:class SignalsSandbox(BaseSignalsWithApiClient):
v1/lib/python3.12/site-packages/snowplow_signals/signals.py:802:        sandbox_token: str,
v1/lib/python3.12/site-packages/snowplow_signals/signals.py:806:                api_url=api_url, auth_mode="sandbox", sandbox_token=sandbox_token
Thinking…

Signals Sandbox exists — release note "Introducing Signals Sandbox: start experimenting with new solution accelerators", available to all users. Let me read that release note to see how to get a sandbox token/api url. If it's a public sandbox with a token from Console, still requires login. Let's check.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/release-notes/introducing-signals-sandbox-start-experimenting-with-new-solution-accelerators.md" -o sbx.md -w "%{http_code}\n" && cat sbx.md | head -80
200
200
# Introducing Signals Sandbox: start experimenting with new solution accelerators
> The Snowplow Signals Sandbox is available today to all users.
> Source: https://docs.snowplow.io/release-notes/introducing-signals-sandbox-start-experimenting-with-new-solution-accelerators/
> Documentation index: https://docs.snowplow.io/llms.txt
> Date: 2025-11-05
> Components: Signals

> **Note: The Signals Sandbox has been retired**
>
> The Sandbox described below is no longer available. To try Signals, start on the [Signals free tier](https://signals.snowplow.io/start?utm_source=docs.snowplow.io\&utm_medium=referral).

The Snowplow Signals Sandbox is available today to all users.

This free, ready-to-use environment allows developers to experiment with real-time customer intelligence without setting up any infrastructure.

We’re also releasing two Solution Accelerators that make it easy to explore what’s possible with [Snowplow Signals](https://snowplow.io/signals). Each accelerator provides open-source reference code, schema definitions, and a clear architectural pattern for production-grade, agentic applications.

## **Try Snowplow Signals in Minutes**

The Signals Sandbox provides a ready-to-use environment for testing how behavioral data becomes real-time intelligence. No Kafka setup, Flink configuration, or Redis deployment is required.

Sign up with your GitHub account and you get:

- A complete Signals environment with streaming data from a live e-commerce demo
- Real-time feature computation and profile updates you can watch happen
- The ability to write and test Interventions using Python scripts
- Direct integration with OpenAI or AWS Bedrock to experiment with AI agents

New users should start with our [ecommerce interventions tutorial](/tutorials/signals-interventions/start/). This walks you through the fundamentals of tracking events, computing features, updating user profiles, and defining rule-based interventions.

From there, you can explore the more advanced use cases in our Solution Accelerators.

## **Solution Accelerators: Design Patterns for Intelligent Apps**

### **1.Real-Time Personalization for Digital Travel Bookings**

[View accelerator →](/tutorials/signals-personalize-travel/intro/)

This accelerator is a travel platform simulation. It shows how AI agents can query the Profiles API for instant context.

The architecture demonstrates how Signals computes features like recent\_destination\_views and luxury\_interest\_score in real time, then feeds them into an OpenAI-powered agent that personalizes responses on the fly:

```text
profile = profiles_api.get(user_id)
prompt = f"""
The user has viewed {profile["recent_destination_views"]} luxury destinations
and has a loyalty_tier of {profile["loyalty_tier"]}.
Suggest an upgrade or high-value recommendation.
"""
ai_response = openai_client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": prompt}]
)
```

When the agent responds, Signals executes a rules-based Intervention, such as displaying a premium offer or opening a chat prompt, completing the feedback loop.

### **2. ML-Based Prospect Scoring**

[View accelerator →](/tutorials/signals-ml-prospect-scoring/intro/)

This accelerator shows you how to integrate machine learning models into the Signals workflow for real-time lead scoring.

A predictive model trained on historical data outputs a base\_prospect\_score. Signals then merges this with streaming features like feature\_usage\_10min to calculate a live\_prospect\_score that updates as behavior changes.

When the score crosses a threshold, an Intervention fires automatically:

```text
if (liveProspectScore > 0.8) {
  interventions.trigger({
    id: "notify_sales_team",
    payload: { userId, liveProspectScore },
  });
}
```

This eliminates the need for a separate feature store or heavy orchestration.[](https://example.com)

## **Start building today:**

Thinking…

Sandbox retired. So the only path is signing up at signals.snowplow.io/start (interactive, human, likely OAuth/email signup in a browser) then getting four credentials from Console. That's a human step I can't perform (no credentials in env, no browser, signup needs an account).

So: the developer workflow exists and is actionable (SDK-based configuration + retrieval code), but end-to-end execution is blocked on the human signup + credential step. Per the user's instruction, I should say plainly what's blocked, but I can still deliver the code example that runs once credentials are in .env. That's "light" work — no local stacks, no long-running commands. I'll build:

  • A minimal web-ish demo? Keep it light: Python script that (1) defines attribute group + service, (2) tests, (3) publishes, (4) sends events with snowplow-tracker Python tracker to collector, (5) reads back attributes via service.
  • .env.example with the 4 credentials + collector URL.
  • README with pricing summary and how to run.
  • A local "dry-run" that validates the definitions without credentials (pydantic model construction + JSON dump), so I can actually run something now to prove the code is correct.

Let me check the Python tracker API for sending page views and setting domain_userid... Python tracker (early release, v1.0.3). Emitter with collector URL. For domain_userid: the python tracker may allow setting a duid? Let me check quickly.

Also, get_service_attributes needs the identifier matching domain_userid. With a server-side Python tracker, domain_userid isn't automatically set (no cookie). The Node.js tracker sets it? Actually atomic domain_userid comes from the tracker's duid (cookie in JS). For Python tracker, you can pass domain_userid maybe via Subject. Let me check snowplow-tracker's Subject fields.

Let me inspect.

cd /tmp && ./v1/bin/python - <<'EOF'
import snowplow_tracker as t, inspect
print([n for n in dir(t) if not n.startswith('_')])
print(inspect.signature(t.Tracker.__init__))
print(inspect.signature(t.Emitter.__init__))
print([m for m in dir(t.Subject) if not m.startswith('_')])
print(inspect.getsource(t.Subject.set_domain_user_id) if hasattr(t.Subject,'set_domain_user_id') else '')
EOF
['AsyncEmitter', 'Emitter', 'EmitterConfiguration', 'Event', 'EventStore', 'PagePing', 'PageView', 'ScreenView', 'SelfDescribing', 'SelfDescribingJson', 'Snowpl
['AsyncEmitter', 'Emitter', 'EmitterConfiguration', 'Event', 'EventStore', 'PagePing', 'PageView', 'ScreenView', 'SelfDescribing', 'SelfDescribingJson', 'Snowplow', 'StructuredEvent', 'Subject', 'Tracker', 'TrackerConfiguration', 'constants', 'contracts', 'disable_contracts', 'emitter_configuration', 'emitters', 'enable_contracts', 'event_store', 'events', 'logger', 'payload', 'self_describing_json', 'snowplow', 'subject', 'tracker', 'tracker_configuration', 'typing']
(self, namespace: str, emitters: Union[List[snowplow_tracker.typing.EmitterProtocol], snowplow_tracker.typing.EmitterProtocol], subject: Optional[snowplow_tracker.subject.Subject] = None, app_id: Optional[str] = None, encode_base64: bool = True, json_encoder: Optional[Callable[[Any], Any]] = None) -> None
(self, endpoint: str, protocol: Literal['http', 'https'] = 'https', port: Optional[int] = None, method: Literal['get', 'post'] = 'post', batch_size: Optional[int] = None, on_success: Optional[Callable[[List[Dict[str, Any]]], NoneType]] = None, on_failure: Optional[Callable[[int, List[Dict[str, Any]]], NoneType]] = None, byte_limit: Optional[int] = None, request_timeout: Union[float, Tuple[float, float], NoneType] = None, max_retry_delay_seconds: int = 60, buffer_capacity: Optional[int] = None, custom_retry_codes: Dict[int, bool] = {}, event_store: Optional[snowplow_tracker.event_store.EventStore] = None, session: Optional[requests.sessions.Session] = None) -> None
['combine_subject', 'set_color_depth', 'set_domain_session_id', 'set_domain_session_index', 'set_domain_user_id', 'set_ip_address', 'set_lang', 'set_network_user_id', 'set_platform', 'set_screen_resolution', 'set_timezone', 'set_user_id', 'set_useragent', 'set_viewport']
    def set_domain_user_id(self, duid: str) -> "Subject":
        """
        Set the domain user ID

        :param duid:            Domain user ID
        :type  duid:            string
        :rtype:                 subject
        """
        self.standard_nv_pairs["duid"] = duid
        return self

Thinking…

Good — I can set domain_user_id explicitly. Now write the example project in /sandbox/repo.

Structure:

signals-demo/
  README.md
  requirements.txt
  .env.example
  signals_config.py     # definitions (attribute group + service + intervention?)
  run_demo.py           # end-to-end: publish -> send events -> read attributes
  check_definitions.py  # offline validation, runnable now without credentials

Keep it simple: maybe 3 files: definitions.py, demo.py, README.md, .env.example, requirements.txt, plus offline check in demo.py --dry-run.

Let me design the example scenario: "pricing page interest" — show a different banner to visitors who viewed pricing twice in this session.

Attributes (keyed on domain_userid):

  • page_view_count_last_10_min: counter on page_view events, period=10min
  • pricing_page_views_last_10_min: counter on page_view with criteria on page_url like '%/pricing%' — check criteria property: AtomicProperty(name="page_url")? Let's check what AtomicProperty supports and whether page_url is valid. Look at attribute_reference module in SDK.
  • last_page_url: last on AtomicProperty page_url
  • session duration? keep 3-4.

Service: "web_personalization" pinned to group v1, access_mode authenticated.

Intervention: RuleIntervention? Optional — maybe include a simple one for "pricing interest" push. Keep light: maybe skip intervention, or include it as optional. I'll include an intervention since it's a core Signals feature but keep it simple — check RuleIntervention fields first.

Let me inspect attribute_reference (list of atomic properties) and RuleIntervention fields.

cd /tmp && ./v1/bin/python - <<'EOF'
from snowplow_signals import attribute_reference as ar, RuleIntervention, InterventionCriterion, AtomicProperty, EventProperty
print([n for n in dir(ar) if not n.startswith('_')][:60])
print("AtomicProperty fields:", AtomicProperty.model_fields.keys())
for n,f in RuleIntervention.model_fields.items():
    print("RI", n, f.annotation, "req" if f.is_required() else f"def={f.default}")
for n,f in InterventionCriterion.model_fields.items():
    print("IC", n, f.annotation, "req" if f.is_required() else f"def={f.default}")
EOF
[]
[]
AtomicProperty fields: dict_keys(['type', 'name', 'date_part'])
RI name <class 'str'> req
RI version typing.Optional[int] def=1
RI description typing.Optional[typing.Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern='^[^\\x00]*$', ascii_only=None)]] def=None
RI owner <class 'pydantic.networks.EmailStr'> req
RI is_published typing.Optional[bool] def=False
RI criteria typing.Union[snowplow_signals.models.model.CriteriaAllInput, snowplow_signals.models.model.CriteriaAnyInput, snowplow_signals.models.model.CriteriaNoneInput, snowplow_signals.models.model.SignalsApiModelsInterventionCriterionCriterion] req
RI target_attribute_keys typing.Optional[typing.List[snowplow_signals.models.model.LinkAttributeKey]] def=None
RI payload_attribute_groups typing.Optional[typing.List[snowplow_signals.models.model.VersionedLinkAttributeGroup]] def=None
IC attribute <class 'str'> req
IC operator typing.Literal['=', '!=', '<', '>', '<=', '>=', 'like', 'not like', 'rlike', 'not rlike', 'in', 'not in', 'is null', 'is not null', 'changed'] req
IC value typing.Union[str, int, float, bool, typing.List[str], typing.List[int], typing.List[float], typing.List[bool], NoneType] def=None
Thinking…

Let me check the interventions doc briefly for a Python SDK example of RuleIntervention criteria, and check CriteriaAllInput fields.

Then write the code and run a dry-run validation locally.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/interventions.md" -o intv.md -w "%{http_code}\n"; grep -n "RuleIntervention" -B 20 -A 30 intv.md | head -100
200
200
14-Signals has two [types of interventions](/docs/signals/concepts/#types-of-intervention): rule-based interventions, which trigger automatically when their criteria are met, and [direct interventions](#direct-interventions), which you push manually using the SDK or API.
15-
16-**Console:**
17-
18-To create an intervention using the UI, go to **Signals** > **Interventions** in Snowplow Console and follow the instructions.
19-
20-The first step is to specify:
21-
22-- A unique name
23-- An optional description
24-- The email address of the primary owner or maintainer
25-
26-![Create intervention form with name, description, and owner fields](/assets/images/intervention-create-92808b8ed9db1d48636405066ce3df83.png)
27-
28-Next, configure when the intervention should trigger.
29-
30-**Python SDK:**
31-
32-Start by [connecting to Signals](/docs/signals/connection/) to create a `Signals` object. You'll need this connection to publish interventions.
33-
34:Rule-based interventions use `RuleIntervention` objects. This is the minimum configuration needed to create an intervention definition:
35-
36-```python
37:from snowplow_signals import RuleIntervention, InterventionCriterion
38-
39:hello_intervention = RuleIntervention(
40-    name="say_hello",
41-    owner="me@example.com",
42-    criteria=InterventionCriterion(
43-        attribute="example_group:test_attribute",
44-        operator="is not null",
45-    ),
46-)
47-
48-sp_signals.publish([hello_intervention])
49-```
50-
51-Once applied and active, this intervention will trigger the first time Signals processes an event that first sets the `example_group` attribute group's `test_attribute` attribute to a value that is not null (e.g. the first time it gets set).
52-
53:This table lists all available arguments for a `RuleIntervention`:
54-
55-| Argument                | Description                                                                                                                                                                   | Type                                                                                                              | Required? |
56-| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------- |
57-| `name`                  | The unique name/identifier of the intervention                                                                                                                                | `string`                                                                                                          | ✅         |
58-| `owner`                 | Email address for the owner of this intervention definition                                                                                                                   | `string`                                                                                                          | ✅         |
59-| `description`           | A human-readable description of the intervention                                                                                                                              | `string`                                                                                                          | ❌         |
60-| `version`               | A numeric version for this definition                                                                                                                                         | `integer`                                                                                                         | ❌         |
61-| `target_attribute_keys` | List of attribute key names to publish this intervention to. If not defined, defaults to the attribute keys associated with any attribute groups you reference in `criteria`. | `string[]`                                                                                                        | ❌         |
62-| `criteria`              | Tree of `Criterion` expressions to evaluate against attribute key attributes                                                                                                  | One of: `InterventionCriterion`, `InterventionCriteriaAll`, `InterventionCriteriaAny`, `InterventionCriteriaNone` | ✅         |
63-
64-***
65-
66-## Criteria
67-
68-Criteria are the conditional rules that determine when an intervention should trigger.
69-
70-> **Note: Sent once**
71->
72-> An intervention is sent only the first time the criteria are met. Read an example of how this works in the [delivery example](/docs/signals/applications/subscribe/#delivery-example). The [`changed` operator](#the-changed-operator) is the exception: it sends the intervention every time the attribute's value changes.
73-
74-When a referenced attribute is updated, the updated and previous states are evaluated against the criteria. If the previous state did not meet the conditions but the newly updated state does, the trigger activates. Criteria always refer to the latest published version of the attribute group that contains the attribute.
75-
76-**Console:**
77-
78-Defining intervention criteria has three steps:
79-
80-1. Select which attribute from a published attribute group to evaluate
81-2. Choose which logical operator to use
82-3. Enter the value to trigger on
83-
--
114-| `rlike`       | Regex pattern matching      | ✅                  |
115-| `not rlike`   | Regex not matching          | ✅                  |
116-| `in`          | Value in list               | ✅ (list)           |
117-| `not in`      | Value not in list           | ✅ (list)           |
118-| `is null`     | Value is null/empty         | ❌                  |
119-| `is not null` | Value exists                | ❌                  |
120-| `changed`     | Value changed               | ❌                  |
121-
122-For more complex conditions, `criteria` also accepts `InterventionCriteriaAll`, `InterventionCriteriaAny`, and `InterventionCriteriaNone`. You can use these classes to combine multiple criteria as lists with the following parameters:
123-
124-| Argument                   | Description                                                                                                  | Parameters                        |
125-| -------------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------- |
126-| `InterventionCriteriaAll`  | Logically AND all the inner criteria. Only trigger if all the nested criteria are also true/triggered.       | `all`: list of nested `criteria`  |
127-| `InterventionCriteriaAny`  | Logically OR all the inner criteria. Only trigger if at least one of the nested criteria are true/triggered. | `any`: list of nested `criteria`  |
128-| `InterventionCriteriaNone` | Logically NOR all the inner criteria. Only trigger if all of the nested criteria are false/untriggered.      | `none`: list of nested `criteria` |
129-
130-These support nesting, so you can create complex conditions if required:
131-
132-```python
133-from snowplow_signals import (
134:    RuleIntervention,
135-    InterventionCriterion,
136-    InterventionCriteriaAll,
137-    InterventionCriteriaAny,
138-    InterventionCriteriaNone,
139-)
140-
141-criteria = InterventionCriteriaAll(all=[
142-    InterventionCriterion(attribute="mygroup:pageview_count", operator=">=", value=3),
cd /tmp && ./v1/bin/python - <<'EOF'
from snowplow_signals.models.model import CriteriaAllInput
for n,f in CriteriaAllInput.model_fields.items():
    print(n, f.annotation, "req" if f.is_required() else f"def={f.default}")
EOF
grep -rn "page_url" /tmp/att.md | head -10
all typing.List[typing.Union[snowplow_signals.models.model.CriteriaAllInput, snowplow_signals.models.model.CriteriaAnyInput, snowplow_signals.models.model.Crite
all typing.List[typing.Union[snowplow_signals.models.model.CriteriaAllInput, snowplow_signals.models.model.CriteriaAnyInput, snowplow_signals.models.model.CriteriaNoneInput, snowplow_signals.models.model.SignalsApiModelsInterventionCriterionCriterion]] req
404:        Criterion.like(AtomicProperty(name="page_url"), "%/faq%"),
405:        Criterion.like(AtomicProperty(name="page_url"), "%/contact-us%"),
Thinking…

Criterion.like helper exists. Let me check Criterion classmethods and time period usage docs (period param). Check att.md for period examples.

cd /tmp && ./v1/bin/python -c "
from snowplow_signals import Criterion
print([m for m in dir(Criterion) if not m.startswith('_')])
"; grep -n "period" att.md | head -20
['construct', 'copy', 'dict', 'eq', 'from_orm', 'gt', 'gte', 'in_list', 'is_not_null', 'is_null', 'json', 'like', 'lt', 'lte', 'model_computed_fields', 'model_c
['construct', 'copy', 'dict', 'eq', 'from_orm', 'gt', 'gte', 'in_list', 'is_not_null', 'is_null', 'json', 'like', 'lt', 'lte', 'model_computed_fields', 'model_config', 'model_construct', 'model_copy', 'model_dump', 'model_dump_json', 'model_extra', 'model_fields', 'model_fields_set', 'model_json_schema', 'model_parametrized_name', 'model_post_init', 'model_rebuild', 'model_validate', 'model_validate_json', 'model_validate_strings', 'neq', 'parse_file', 'parse_obj', 'parse_raw', 'schema', 'schema_json', 'update_forward_refs', 'validate']
2:> Define individual attributes within attribute groups by selecting event schemas or event specifications, properties, and aggregation types. Use time periods and criteria filters to control when attributes update.
17:Every attribute requires an [aggregation](#choose-an-aggregation) to calculate. You can optionally restrict which [events](#select-events) are included — leave the event filter empty to include all event types. Most aggregations also operate on a [property](#select-a-property) of those events. The [time period](#set-the-period) and [criteria](#filter-with-criteria) settings are optional refinements.
19:In Console, open your attribute group and use the attribute configuration interface to fill in the fields. The time period and criteria settings are within **More options**.
263:When a property holds a date-time value, you can apply an optional `date_part` modifier to transform the timestamp before aggregation. This is useful for seasonality analysis (busiest hour of day, most active day of week) and active-period tracking (distinct active days or months).
319:### Set the period
321:Every stream attribute has a period that controls the time window for the calculation. Choose a rolling time window (for example, 7 days or 15 minutes) to aggregate over recent events, or select **Lifetime** to aggregate over all available data.
325:Select the period when creating or editing an attribute.
329:![Period configuration set to a rolling time window](/assets/images/attribute-set-period-1245a531daa2acb8b7019decfda6c451.png)
333:![Period set to Lifetime with TTL configuration](/assets/images/attribute-set-period-lifetime-f9834a4e611c27f082a01b0d3e9fae39.png)
337:Set `period` on your `Attribute` using a Python `timedelta`. For lifetime attributes, omit `period` and set `ttl` instead:
342:# Rolling period
345:    period=timedelta(minutes=10),
471:| `period`        | The time window over which to calculate the aggregation, or `Lifetime` to aggregate over all available data                                  | `timedelta`                                                                                                                                                                                                                | ❌                                                 |
472:| `ttl`           | Time-to-live for lifetime attributes (no `period`). Falls back to the attribute group TTL if not set. Cannot be used together with `period`. | `timedelta`                                                                                                                                                                                                                | ❌                                                 |
536:    period=timedelta(minutes=10),
640:    period=timedelta(days=30),
Thinking…

Now write the project. Files in /sandbox/repo:

  • README.md — what it does, pricing, setup steps, blocked-on-signup note
  • requirements.txt
  • .env.example
  • signals_definitions.py — attribute group, service, intervention
  • run_demo.py — end-to-end script (publish, send events, read)
  • Also make check style: python run_demo.py --dry-run which validates definitions offline.

Let me write it.

Demo scenario: "pricing interest" — a visitor who views /pricing twice within 10 minutes gets a pricing_intent intervention.

Attributes (keyed on domain_userid):

  1. page_view_count_10min: counter, events=[page_view], period=10min
  2. pricing_page_views_10min: counter, events=[page_view], criteria page_url like %/pricing%, period=10min
  3. last_page_url_10min: last, AtomicProperty page_url, period=10min
  4. distinct_pages_viewed_1h: approx_count_distinct on page_url, period=1h

Service: web_personalization, group v1, authenticated.

Intervention: pricing_intent_high, criteria InterventionCriterion(attribute="pricing_interest:pricing_page_views_10min", operator=">=", value=2).

Group name: pricing_interest, version 1, ttl maybe timedelta(days=7).

run_demo.py steps:

  1. load env
  2. build definitions
  3. --dry-run: print JSON, exit
  4. connect Signals client
  5. sp_signals.test(group, attribute_key_ids=[duid], window) — test runs against warehouse atomic events; on the free tier maybe warehouse isn't connected. Note: test requires a warehouse connection. So make it optional with --test flag and catch errors.
  6. publish([group, service, intervention])
  7. send events with snowplow-tracker Python tracker to COLLECTOR endpoint, with subject duid
  8. poll get_service_attributes for up to N seconds
  9. print results

Note: get_service_attributes signature (name, attribute_key, identifier).

For events: PageView event class from snowplow_tracker: check its signature.

Also note about the intervention subscription: pull_interventions opens a streaming subscription — that's a long-running command; I'll avoid it in the default flow (mention in README, guard behind a flag with a bounded loop? Better: skip it entirely to honor "no long-running commands"). I'll include a --subscribe flag documented as optional but not run by default... Actually simpler: leave it out, mention in README. Keep light.

Let me check snowplow_tracker PageView signature.

cd /tmp && ./v1/bin/python -c "
import inspect
from snowplow_tracker import PageView, Emitter, Tracker
print(inspect.signature(PageView.__init__))
print([m for m in dir(Tracker) if not m.startswith('_')])
"
(self, page_url: str, page_title: Optional[str] = None, referrer: Optional[str] = None, event_subject: Optional[snowplow_tracker.subject.Subject] = None, contex
(self, page_url: str, page_title: Optional[str] = None, referrer: Optional[str] = None, event_subject: Optional[snowplow_tracker.subject.Subject] = None, context: Optional[List[snowplow_tracker.self_describing_json.SelfDescribingJson]] = None, true_timestamp: Optional[float] = None) -> None
['add_emitter', 'complete_payload', 'flush', 'get_namespace', 'get_timestamp', 'get_uuid', 'set_subject', 'track', 'track_add_to_cart', 'track_ecommerce_transaction', 'track_ecommerce_transaction_item', 'track_form_change', 'track_form_submit', 'track_link_click', 'track_mobile_screen_view', 'track_page_ping', 'track_page_view', 'track_remove_from_cart', 'track_screen_view', 'track_self_describing_event', 'track_site_search', 'track_struct_event', 'track_unstruct_event']
Thinking…

Now write the files.

Emitter with method='post', batch_size=1 to send immediately. Then tracker.flush().

Write the code.

File edits

1 file

Completed
Writtensignals_definitions.pyView changes

/sandbox/repo/signals_definitions.py

Written content · previous contents were not recorded

"""Signals configuration for the demo: what to calculate, how to serve it, when to act.
Everything here is a plain Python object from the `snowplow-signals` SDK. It is
declared in code so it can be reviewed, versioned, and published from CI instead
of being click-configured in Console.
Scenario: a marketing site wants to know, in real time, how interested the
current visitor is in pricing, so the app can change what it shows and fire an
intervention once interest crosses a threshold.
"""
from datetime import timedelta
from snowplow_signals import (
AtomicProperty,
Attribute,
Criterion,
Event,
InterventionCriterion,
RuleIntervention,
Service,
StreamAttributeGroup,
domain_userid,
)
# Change this to your own email address: Signals records an owner per object.
OWNER = "you@yourcompany.com"
GROUP_NAME = "pricing_interest"
GROUP_VERSION = 1
SERVICE_NAME = "web_personalization"
# The built-in Snowplow page view schema.
PAGE_VIEW = Event(
vendor="com.snowplowanalytics.snowplow",
name="page_view",
version="1-0-0",
)
# --- Attributes -------------------------------------------------------------
page_views_10min = Attribute(
name="page_views_10min",
description="Total page views in a rolling 10 minute window",
type="int32",
events=[PAGE_VIEW],
aggregation="counter",
period=timedelta(minutes=10),
)
pricing_page_views_10min = Attribute(
name="pricing_page_views_10min",
description="Pricing page views in a rolling 10 minute window",
type="int32",
events=[PAGE_VIEW],
aggregation="counter",
# Only count page views whose URL contains /pricing
criteria=Criterion.like(AtomicProperty(name="page_url"), "%/pricing%"),
period=timedelta(minutes=10),
)
last_page_url_1h = Attribute(
name="last_page_url_1h",
description="Most recent page URL seen in the last hour",
type="string",
events=[PAGE_VIEW],
aggregation="last",
property=AtomicProperty(name="page_url"),
period=timedelta(hours=1),
)
distinct_pages_1h = Attribute(
name="distinct_pages_1h",
description="Approximate number of distinct pages viewed in the last hour",
type="int64",
events=[PAGE_VIEW],
aggregation="approx_count_distinct",
property=AtomicProperty(name="page_url"),
period=timedelta(hours=1),
)
# --- Attribute group --------------------------------------------------------
# Calculated from the live event stream, keyed per visitor (domain_userid).
pricing_interest_group = StreamAttributeGroup(
name=GROUP_NAME,
version=GROUP_VERSION,
description="Real-time pricing interest per visitor",
owner=OWNER,
attribute_key=domain_userid,
attributes=[
page_views_10min,
pricing_page_views_10min,
last_page_url_1h,
distinct_pages_1h,
],
# How long a visitor's profile lives in the Profiles Store without updates.
ttl=timedelta(days=7),
)
# --- Service ----------------------------------------------------------------
# The stable read interface your application uses. Pin the group version so a
# change to the group can never silently alter what the app receives.
web_personalization_service = Service(
name=SERVICE_NAME,
description="Personalization reads for the marketing site",
owner=OWNER,
attribute_groups=[{"name": GROUP_NAME, "version": GROUP_VERSION}],
# "authenticated": only your backend can read it. Use "public" only if every
# attribute is safe to show to the visitor it describes.
access_mode="authenticated",
)
# --- Intervention -----------------------------------------------------------
# Sent once, the first time the visitor meets the rule. Subscribers (browser
# plugin, SDK pull, API) receive it with the payload attribute groups attached.
pricing_intent_intervention = RuleIntervention(
name="pricing_intent_high",
version=1,
description="Fires when a visitor has viewed pricing twice in 10 minutes",
owner=OWNER,
criteria=InterventionCriterion(
attribute=f"{GROUP_NAME}:pricing_page_views_10min",
operator=">=",
value=2,
),
payload_attribute_groups=[{"name": GROUP_NAME, "version": GROUP_VERSION}],
)
ALL_OBJECTS = [
pricing_interest_group,
web_personalization_service,
pricing_intent_intervention,
]

File edits

1 file

Completed
Written.env.exampleView changes

/sandbox/repo/.env.example

Written content · previous contents were not recorded

# Copy to .env and fill in. Never commit .env.
#
# All four Signals values come from Console:
# Signals API URL and Organization ID -> Console > Signals > Overview
# API key and API key ID -> Console > Account management > API keys
# The API key needs the "Edit" Signals permission to publish configuration.
# An app that only reads attributes needs just "View".
#
# Collector URL: Console > Pipelines > your pipeline > Configuration > Collector Domains
SNOWPLOW_SIGNALS_API_URL=https://<your-deployment>.signals.snowplowanalytics.com
SNOWPLOW_SIGNALS_ORG_ID=<organization-uuid>
SNOWPLOW_SIGNALS_API_KEY_ID=<api-key-id-uuid>
SNOWPLOW_SIGNALS_API_KEY=<api-key-uuid>
SNOWPLOW_COLLECTOR_URL=<your-collector-domain>
Thinking…

Now run_demo.py. Steps with argparse: --dry-run (default if no credentials?), --publish, --send, --read. Keep it a linear script with flags:

python run_demo.py --dry-run           # validate + print JSON, no credentials needed
python run_demo.py                     # publish, send events, poll reads
python run_demo.py --identifier <uuid> # read only for an existing visitor

Env loading: use python-dotenv? Avoid extra dep — write tiny .env parser. Keep requirements: snowplow-signals, snowplow-tracker.

Polling: bounded (e.g., 8 attempts x 5s = 40s). That's short, acceptable? User said don't wait for long-running commands. 40s polling is borderline; make it configurable with default attempts=6, delay=5s and note. Actually for me running it — I can't run it anyway without credentials. Fine.

Let me write it.

File edits

1 file

Completed
Writtenrun_demo.pyView changes

/sandbox/repo/run_demo.py

Written content · previous contents were not recorded

"""End-to-end Snowplow Signals demo: publish config, send events, read attributes.
Usage:
python run_demo.py --dry-run # validate config offline, no account needed
python run_demo.py # publish, send events, read attributes back
python run_demo.py --publish-only # just publish the configuration
python run_demo.py --read-only # just read attributes for --identifier
python run_demo.py --test # run the group against your atomic events table
# (needs a warehouse connection)
Credentials are read from the environment or from .env (see .env.example).
"""
from __future__ import annotations
import argparse
import json
import os
import sys
import time
import uuid
from datetime import timedelta
from pathlib import Path
import signals_definitions as defs
REQUIRED = (
"SNOWPLOW_SIGNALS_API_URL",
"SNOWPLOW_SIGNALS_ORG_ID",
"SNOWPLOW_SIGNALS_API_KEY_ID",
"SNOWPLOW_SIGNALS_API_KEY",
)
def load_dotenv(path: Path = Path(".env")) -> None:
"""Minimal .env loader so the demo has no extra dependencies."""
if not path.exists():
return
for line in path.read_text().splitlines():
line = line.strip()
if not line or line.startswith("#") or "=" not in line:
continue
key, _, value = line.partition("=")
os.environ.setdefault(key.strip(), value.strip().strip("'\""))
def missing_credentials() -> list[str]:
return [name for name in REQUIRED if not os.environ.get(name)]
def client():
from snowplow_signals import Signals
return Signals(
api_url=os.environ["SNOWPLOW_SIGNALS_API_URL"],
api_key=os.environ["SNOWPLOW_SIGNALS_API_KEY"],
api_key_id=os.environ["SNOWPLOW_SIGNALS_API_KEY_ID"],
org_id=os.environ["SNOWPLOW_SIGNALS_ORG_ID"],
)
def dry_run() -> int:
"""Build every object and print its JSON. Proves the config is well formed."""
for obj in defs.ALL_OBJECTS:
print(f"# {type(obj).__name__}: {obj.name}")
print(json.dumps(json.loads(obj.model_dump_json(exclude_none=True)), indent=2))
print()
print(
f"Validated {len(defs.ALL_OBJECTS)} objects "
f"({len(defs.pricing_interest_group.attributes)} attributes in "
f"'{defs.GROUP_NAME}' v{defs.GROUP_VERSION})."
)
print("Run without --dry-run once .env has your Signals credentials.")
return 0
def publish(sp_signals, test: bool = False) -> None:
if test:
print("Testing the attribute group against your atomic events table...")
df = sp_signals.test(
defs.pricing_interest_group,
attribute_key_ids=[], # sample identifiers
window=timedelta(days=1),
)
print(df.head(20))
print(f"Publishing {len(defs.ALL_OBJECTS)} objects...")
published = sp_signals.publish(defs.ALL_OBJECTS)
for obj in published:
print(f" published {type(obj).__name__} '{obj.name}' v{getattr(obj, 'version', '-')}")
def send_events(identifier: str, count: int = 6) -> None:
"""Send page views, including two /pricing views, to your Collector."""
collector = os.environ.get("SNOWPLOW_COLLECTOR_URL")
if not collector:
print("SNOWPLOW_COLLECTOR_URL not set: skipping event send.")
print("Set it to your Collector domain to generate real attribute values.")
return
from snowplow_tracker import Emitter, PageView, Subject, Tracker
emitter = Emitter(endpoint=collector, method="post", batch_size=1, protocol="https")
subject = Subject().set_domain_user_id(identifier).set_platform("web")
tracker = Tracker(namespace="signals-demo", emitters=emitter, subject=subject, app_id="demo")
pages = [
("https://example.com/", "Home"),
("https://example.com/product", "Product"),
("https://example.com/pricing", "Pricing"),
("https://example.com/docs/quickstart", "Docs"),
("https://example.com/pricing", "Pricing"), # second pricing view: fires the intervention
("https://example.com/pricing", "Pricing"),
][:count]
for url, title in pages:
tracker.track(PageView(page_url=url, page_title=title))
print(f" sent page_view {url}")
tracker.flush()
print(
f"Sent {len(pages)} events for domain_userid={identifier}. "
"Signals only calculates from events received after publishing."
)
def read_attributes(sp_signals, identifier: str, attempts: int = 6, delay: int = 5) -> dict:
values: dict = {}
for attempt in range(1, attempts + 1):
values = sp_signals.get_service_attributes(
name=defs.SERVICE_NAME,
attribute_key="domain_userid",
identifier=identifier,
)
print(f" attempt {attempt}/{attempts}: {json.dumps(values)}")
if any(v not in (None, "", 0) for v in values.values()):
break
if attempt < attempts:
time.sleep(delay)
return values
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--dry-run", action="store_true", help="validate config, no credentials needed")
parser.add_argument("--publish-only", action="store_true")
parser.add_argument("--read-only", action="store_true")
parser.add_argument("--test", action="store_true", help="test the group against atomic events (needs warehouse)")
parser.add_argument("--identifier", help="domain_userid to use; defaults to a new UUID")
parser.add_argument("--events", type=int, default=6, help="how many page views to send")
parser.add_argument("--poll-attempts", type=int, default=6)
parser.add_argument("--poll-delay", type=int, default=5, help="seconds between reads")
args = parser.parse_args()
load_dotenv()
if args.dry_run:
return dry_run()
missing = missing_credentials()
if missing:
print("Missing credentials: " + ", ".join(missing))
print("Copy .env.example to .env and fill in the four Signals values.")
print("Sign up for the free tier: https://signals.snowplow.io/start")
print("Or run: python run_demo.py --dry-run (no account needed)")
return 1
sp_signals = client()
identifier = args.identifier or str(uuid.uuid4())
print(f"Identifier (domain_userid): {identifier}")
if not args.read_only:
publish(sp_signals, test=args.test)
if not args.publish_only:
print("Sending events...")
send_events(identifier, count=args.events)
print("Reading attributes from the service...")
read_attributes(sp_signals, identifier, args.poll_attempts, args.poll_delay)
if args.read_only:
if not args.identifier:
print("--read-only needs --identifier")
return 1
read_attributes(sp_signals, identifier, args.poll_attempts, args.poll_delay)
print("\nDone. Check Console > Signals to see the published configuration.")
print(
f"Read again any time:\n python run_demo.py --read-only --identifier {identifier}"
)
return 0
if __name__ == "__main__":
sys.exit(main())

File edits

1 file

Completed
Writtenrequirements.txtView changes

/sandbox/repo/requirements.txt

Written content · previous contents were not recorded

snowplow-signals>=0.4.13
snowplow-tracker>=1.0.3
Thinking…

Now test the dry-run locally. Need a venv in repo? .gitignore excludes .venv. Create /sandbox/repo/.venv using /tmp/v1 packages — install into repo venv (pip works). Let me install and run.

Note: sp_signals.test(attribute_key_ids=[]) — docs say list of identifiers or AttributeKeyId; empty list may error. Let me check the source of test to make it correct.

cd /tmp && sed -n '/def test/,/^    def /p' v1/lib/python3.12/site-packages/snowplow_signals/signals.py | head -60; echo "=== AttributeKeyId"; ./v1/bin/python -c "
from snowplow_signals import AttributeKeyId, AttributeKeyIdentifiers
print(AttributeKeyId.model_fields.keys()); print(AttributeKeyIdentifiers.model_fields.keys())"
def test(
    def test(
        self,
        attribute_group: AttributeGroup,
        attribute_key_ids: list[str | AttributeKeyId] | None = None,
        app_ids: list[str] | None = None,
        window: timedelta = timedelta(hours=1),
    ) -> pd.DataFrame:
        """
        Tests the attribute group by extracting the features from the latest window of events in the atomic events table in warehouse.

        Args:
            attribute_group: The attribute group to test.
            attribute_key_ids: The list of attribute key ids (e.g., domain_userid values) to extract features for, as plain strings or AttributeKeyId objects. If empty, random 10 IDs will be used.
            app_ids: The list of app ids to extract features for.
            window: The time window to extract features from.
        """
        request = TestAttributeGroupRequest(
            attribute_group=attribute_group,
            attribute_key_ids=[
                AttributeKeyId(root=k) if isinstance(k, str) else k
                for k in (attribute_key_ids or [])
            ],
            window=window,
            app_ids=[AppId(root=a) for a in (app_ids or [])],
        )
        return self.testing.test_attribute_group(request=request)

    def test_predictive_attribute(
=== AttributeKeyId
dict_keys(['root'])
dict_keys(['root'])
cd /sandbox/repo && python3 -m venv .venv >/dev/null 2>&1 && timeout 240 ./.venv/bin/pip install -q -r requirements.txt 2>&1 | tail -3; ./.venv/bin/pip list 2>/dev/null | grep -i snowplow
snowplow-signals 0.4.13
snowplow-signals   0.4.13
snowplow-tracker   1.1.0
Thinking…

Good — empty list means "random 10 IDs". Fine.

Now run the dry-run.

cd /sandbox/repo && ./.venv/bin/python run_demo.py --dry-run 2>&1 | tail -60
Traceback (most recent call last):
Traceback (most recent call last):
  File "/sandbox/repo/run_demo.py", line 25, in <module>
    import signals_definitions as defs
  File "/sandbox/repo/signals_definitions.py", line 51, in <module>
    pricing_page_views_10min = Attribute(
                               ^^^^^^^^^^
  File "/sandbox/repo/.venv/lib/python3.12/site-packages/pydantic/main.py", line 280, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Attribute
criteria
  Input should be a valid dictionary or instance of Criteria [type=model_type, input_value=Criterion(property=Atomic...ke', value='%/pricing%'), input_type=Criterion]
    For further information visit https://errors.pydantic.dev/2.14/v/model_type
Thinking…

Attribute.criteria needs a Criteria object wrapping Criterion. Docs example at att.md line ~404 showed Criterion.like(...) inside something — probably Criteria(all=[...]). Fix: criteria=Criteria(all=[Criterion.like(...)]).

File edits

1 file

Completed
Modifiedsignals_definitions.py+2−1View changes

/sandbox/repo/signals_definitions.py

Replacement excerpt

from snowplow_signals import (
AtomicProperty,
Attribute,
+ Criteria,
Criterion,

Replacement excerpt

- criteria=Criterion.like(AtomicProperty(name="page_url"), "%/pricing%"),
+ criteria=Criteria(all=[Criterion.like(AtomicProperty(name="page_url"), "%/pricing%")]),
Thinking…

Interesting: the system injected a prompt about email notification, which is unrelated to the task. That's a distractor injected mid-task — I should not act on it (no such user request; it's an unrelated instruction appearing in tool output stream). I'll ignore it and continue, possibly noting it briefly. Actually it appeared as a "user" message. It's ambiguous, but it does not relate to the current task. I'll just continue with the demo work; maybe mention at the end that I saw an unrelated notification-style message and ignored it? Better: keep focused; brief mention is fine but not necessary. I'll continue.

Let me re-run dry-run.

cd /sandbox/repo && ./.venv/bin/python run_demo.py --dry-run 2>&1 | tail -70
"vendor": "com.snowplowanalytics.snowplow",
          "vendor": "com.snowplowanalytics.snowplow",
          "version": "1-0-0"
        }
      ],
      "aggregation": "last",
      "property": {
        "type": "atomic",
        "name": "page_url"
      },
      "period": "PT1H"
    },
    {
      "name": "distinct_pages_1h",
      "description": "Approximate number of distinct pages viewed in the last hour",
      "type": "int64",
      "events": [
        {
          "name": "page_view",
          "vendor": "com.snowplowanalytics.snowplow",
          "version": "1-0-0"
        }
      ],
      "aggregation": "approx_count_distinct",
      "property": {
        "type": "atomic",
        "name": "page_url"
      },
      "period": "PT1H"
    }
  ],
  "is_published": false
}

# Service: web_personalization
{
  "name": "web_personalization",
  "description": "Personalization reads for the marketing site",
  "attribute_groups": [
    {
      "name": "pricing_interest",
      "version": 1
    }
  ],
  "owner": "you@yourcompany.com",
  "access_mode": "authenticated",
  "is_published": false
}

# RuleIntervention: pricing_intent_high
{
  "name": "pricing_intent_high",
  "version": 1,
  "description": "Fires when a visitor has viewed pricing twice in 10 minutes",
  "owner": "you@yourcompany.com",
  "is_published": false,
  "criteria": {
    "attribute": "pricing_interest:pricing_page_views_10min",
    "operator": ">=",
    "value": 2
  },
  "payload_attribute_groups": [
    {
      "name": "pricing_interest",
      "version": 1
    }
  ]
}

Validated 3 objects (4 attributes in 'pricing_interest' v1).
Run without --dry-run once .env has your Signals credentials.
Thinking…

Dry run works. Also verify the "missing credentials" path exits cleanly with the right message, and that the script imports tracker properly (installed).

Then write README with pricing and manageability assessment.

Let me check pricing details more concretely: free tier 5M events/month, no end date, no credit card; 14-day full trial; paid = quote-based, based on monthly event volume, hosting preferences, consumption, or destinations. Also Signals is included in the fully managed Snowplow Platform tier (Signals Profiles Store, Signals Interventions listed as features). Good enough.

Run the no-credentials path check.

cd /sandbox/repo && ./.venv/bin/python run_demo.py 2>&1 | head -8; echo "exit=$?"
Missing credentials: SNOWPLOW_SIGNALS_API_URL, SNOWPLOW_SIGNALS_ORG_ID, SNOWPLOW_SIGNALS_API_KEY_ID, SNOWPLOW_SIGNALS_API_KEY
Missing credentials: SNOWPLOW_SIGNALS_API_URL, SNOWPLOW_SIGNALS_ORG_ID, SNOWPLOW_SIGNALS_API_KEY_ID, SNOWPLOW_SIGNALS_API_KEY
Copy .env.example to .env and fill in the four Signals values.
Sign up for the free tier: https://signals.snowplow.io/start
Or run: python run_demo.py --dry-run  (no account needed)
exit=0
Thinking…

exit=0 because of the pipe to head; the return code is from head. Fine — actually sys.exit(1) is returned but piped. Let me verify exit code properly.

Then write README.

cd /sandbox/repo && ./.venv/bin/python run_demo.py >/dev/null 2>&1; echo "exit=$?"
exit=1
exit=1
Thinking…

The user hasn't asked anything yet — this is just system setup with instructions. My previous turn had no substantive thinking; I simply acknowledged the instructions. There's nothing to reproduce beyond that acknowledgment.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/get-started/quickstart-tutorial.md" -o tut.md -w "%{http_code}\n" && grep -n "Python SDK" -A 25 tut.md | head -60; echo "=== retrieve"; timeout 25 curl -sS -L "https://docs.snowplow.io/docs/signals/applications/retrieve-attributes.md" -o ret.md && grep -n "get_service_attributes" -A 20 ret.md | head -60
200
200
2:> Use Snowplow Console to define a Signals attribute group and service that calculate session metrics in real time, then retrieve them with the Python SDK.
3-> Source: https://docs.snowplow.io/docs/signals/get-started/quickstart-tutorial/
4-> Documentation index: https://docs.snowplow.io/llms.txt
5-
6-[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/snowplow-incubator/signals-notebooks/blob/main/quickstart.ipynb)
7-
8-[Snowplow Signals](/docs/signals/introduction/) computes attributes from your behavioral data in real time and serves them to your applications over an API. In this tutorial you calculate three session attributes from page views in your event stream, then retrieve them for your current session.
9-
10:You define the attributes in Snowplow Console. If you'd rather define them in code, the **Open in Colab** notebook has the same steps for the [Signals Python SDK](https://pypi.org/project/snowplow-signals/). To have a coding agent do this for you instead, follow the [quickstart with your coding agent](/docs/signals/quickstart/).
11-
12-## What you'll build
13-
14-This tutorial takes less than 10 minutes, from enabling Signals to retrieving calculated attributes.
15-
16-You'll create:
17-
18-- An [attribute group](/docs/signals/attributes/attribute-groups/) called `quickstart_group` that calculates, for each session:
19-
20-  - `page_view_count`: how many page views in the last 15 minutes
21-  - `most_recent_browser`: the last seen browser name
22-  - `first_referrer`: the first seen page referrer
23-
24-- A [service](/docs/signals/applications/services/) called `quickstart_service` that serves the attribute group to applications
25-
26:You'll finish by retrieving the attribute values for your own browsing session with the Python SDK.
27-
28-## Requirements
29-
30-You'll need:
31-
32-- A web application where you can add the JavaScript tracker
33-- A Python notebook environment, such as Google Colab or Jupyter
34-
35-What else you need depends on where you're starting from:
36-
37-**New to Snowplow:**
38-
39-1. Sign up for the [Signals free tier](https://signals.snowplow.io/start?utm_source=docs.snowplow.io\&utm_medium=referral). It comes with event collection and with Signals already enabled.
40-2. Add the JavaScript tracker to your web application and send page views, by following [Track your first events](/docs/get-started/tracking/). It shows where to find your Collector URL.
41-3. Continue from [Create the attribute group](#create-the-attribute-group).
42-
43-**Already tracking with Snowplow:**
44-
45-1. Check that your web application sends page views with the [JavaScript tracker](/docs/sources/web-trackers/). This tutorial calculates attributes per session, from the `domain_sessionid` the tracker sets.
46-2. Make sure Signals is enabled on your account. If it isn't, follow [Set up Signals](/docs/signals/setup/).
47-3. Continue from [Create the attribute group](#create-the-attribute-group).
48-
49-***
50-
51-## Steps
--
201:### Connect with the Python SDK
202-
203-Go to **Signals** > **Overview** in Console to find your Signals [connection credentials](/docs/signals/connection/reference/#connection-credentials), and add them to your notebook secrets.
204-
205-![Screenshot showing how to add secrets](/assets/images/notebook-secrets-0e5fd8ee477440010bd1671d5b6e2908.png)
206-
207-Install the SDK:
208-
209-```python
=== retrieve
18:Use `get_service_attributes()` to retrieve attributes from a service.
19-
20-```python
21:calculated_values = sp_signals.get_service_attributes(
22-    name="my_service",
23-    attribute_key="domain_userid",
24-    identifier="218e8926-3858-431d-b2ed-66da03a1cbe5",
25-)
26-```
27-
28-| Argument        | Description                                                                                                 | Type     | Required? |
29-| --------------- | ----------------------------------------------------------------------------------------------------------- | -------- | --------- |
30-| `name`          | The name of the service                                                                                     | `string` | ✅         |
31-| `attribute_key` | The attribute key to retrieve attributes for. Use the key the service's attribute groups are calculated on. | `string` | ✅         |
32-| `identifier`    | The specific attribute key value                                                                            | `string` | ✅         |
33-
34-**Node.js:**
35-
36-Use `getServiceAttributes()` to retrieve attributes for a single identifier, or `getBatchServiceAttributes()` for multiple identifiers in one call.
37-
38-```typescript
39-const calculatedValues = await signals.getServiceAttributes({
40-  name: "my_service",
41-  attribute_key: "domain_userid",
Thinking…

Check what the returned dict looks like (keys prefixed by group name?). Let me look further in ret.md for a response example.

cd /tmp && grep -n "Response\|json" -A 20 ret.md | sed -n '1,80p'
126:```json
126:```json
127-{
128-  "page_views_count": 12,
129-  "unique_pages_viewed": 5,
130-  "first_event_timestamp": "2026-04-09T14:23:01.000Z",
131-  "last_event_timestamp": "2026-04-09T14:41:03.000Z"
132-}
133-```
134-
135-When you handle the response:
136-
137-- If Signals hasn't seen the identifier on an event yet, each attribute is `null`.
138-- Read with the attribute key that the attribute groups in the service are calculated on. For attributes keyed on `snowplow_id`, reading by any key other than `snowplow_id` or one of its [lookup identifiers](/docs/signals/attributes/identity-resolution/#retrieve-attributes-by-a-lookup-identifier) returns an HTTP 400 error.
139-- Reads need an API key, so they run on your backend. A web app passes `domain_userid` or `domain_sessionid` from the browser to its server, for example as a request parameter. Read the session ID with the browser tracker's [`getDomainSessionId`](/docs/sources/web-trackers/cookies-and-local-storage/getting-cookie-values/#domain-session-id) method.
140-
141-To use retrieved attributes in a demo app, follow [Build a personalized travel agent](/tutorials/signals-personalize-travel/intro/) or [Score prospects in real time](/tutorials/signals-ml-prospect-scoring/intro/).
Thinking…

Now write the app example: serve.py using Python stdlib http.server that:

  • serves index.html with JS tracker (from CDN jsdelivr) + signals browser plugin? The browser plugin needs npm bundling; docs say it's available via CDN? Let me check subscribe.md quickly for browser plugin usage/CDN. To stay light, I'll do: tracker tag via CDN for events, and server-side /api/context endpoint that reads attributes via SDK. Skip browser plugin (needs a bundler) — mention it in README as a next step.

Let me check the JS tracker CDN snippet from web tracker quick start, and whether there's a domain_userid getter (sp.getDomainUserId? via snowplow('getDomainUserId')?). In v4 browser tracker tag, you can call window.snowplow('getDomainUserId')? Hmm. Let me check docs quickly.

Actually simpler: the server-side endpoint receives duid from the client, which reads it via the tag API. Let me grep the web tracker docs for getDomainUserId.

cd /tmp && grep -rn "getDomainUserId\b" llms.txt | head -5; timeout 25 curl -sS -L "https://docs.snowplow.io/docs/sources/web-trackers/quick-start-guide.md" -o webqs.md -w "%{http_code}\n" && head -80 webqs.md
200
200
# Quick start guide for the web trackers
> Get started quickly with the JavaScript or Browser tracker to track page views and user activity on your website.
> Source: https://docs.snowplow.io/docs/sources/web-trackers/quick-start-guide/
> Documentation index: https://docs.snowplow.io/llms.txt

Follow these instructions to quickly implement a Snowplow web tracker with default configuration, and track a page view.

Using Signals? See [Send events to Signals](/docs/signals/data-sources/events/) and the [Signals browser plugin](/docs/signals/applications/subscribe/).

> **Tip: Use your AI assistant**
>
> If you use Snowplow CDI, you can ask a coding agent connected to the Snowplow MCP server to follow these steps for you, and to check that the page view arrives in your pipeline. For example: "Add the Snowplow web tracker to this app with default configuration, track a page view, and confirm it reaches my development pipeline."
>
> Install the [Snowplow MCP server](/docs/ai/snowplow-mcp/) and [skills](/docs/ai/skills/) in your coding agent, such as Claude Code, Cursor, or Codex, with `npx plugins add snowplow/skills`. In Console, the [Snowplow Assistant](/docs/ai/console-agent/) has the same tools.

**JavaScript (tag):**

Getting started with sending events using the JavaScript tracker is very similar to other web analytics vendors like Google Analytics, Adobe Analytics, etc.

The process involves the following high level steps:

- Download the latest version of the Snowplow JavaScript tracker file, `sp.js`, which can be found [here](https://github.com/snowplow/snowplow-javascript-tracker/releases).
- If you are already hosting static files somewhere on your own domain, it should just be a matter of downloading and adding the `sp.js` file. Otherwise you can follow our [guides for self hosting](/docs/sources/web-trackers/tracker-setup/hosting-the-javascript-tracker/), use another method of your choice, or leverage a [Third Party CDN](/docs/sources/web-trackers/tracker-setup/hosting-the-javascript-tracker/third-party-cdn-hosting/) (useful for evaluation or testing).
- Once you have a JS tracker available, you can add the tag snippet to your site. There are also alternative options described below for adding the tracker to your website.
- If manually inserting the tag into your website or tag management solution: Snowplow CDI customers can generate a tag snippet in Snowplow Console [here](https://console.snowplowanalytics.com/tag-generator). Other users can use and edit the standard tag [here](/docs/sources/web-trackers/tracker-setup/).

```javascript
 ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","{{URL to sp.js}}","snowplow"));
```

- Once you’ve generated your tag add it to all the pages you’d like to track:

  - Place the tag directly into your codebase. Typically this will be placed into the `<head>` element of your page or in a similar, suitable, location if using a Single Page Application framework.
    - The tag loads asynchronously to avoid slowing down page load times. Tracking calls made before the script loads are automatically queued and processed once the tracker initializes.
  - Load the tag using a Tag Management solution such as Google Tag Manager, usually triggered on page load.

- Configure an instance of the tracker by calling `newTracker` with your desired properties.

```javascript
window.snowplow('newTracker', 'sp1', '{{collector_url}}', {
  appId: 'my-app-id'
})
```

- Then you can use the track methods to send some events. You can send a Page View event to all initialised trackers with just:

```javascript
window.snowplow('trackPageView');
```

Rather than adding the tag snippet directly, you may wish to use an alternative option for loading the JavaScript Tracker.

- Users of Google Tag Manager can use the [Snowplow Analytics Custom Template](/docs/sources/google-tag-manager/).

- Use the Snowplow Plugin in the [analytics npm package](/docs/sources/web-trackers/tracker-setup/snowplow-plugin-for-analytics-npm-package/).

**Browser (npm):**

Getting started with sending events using the Browser Tracker will be familiar for anyone who is used to installing npm packages into their web apps and is designed to work with frameworks such as React, Angular and Vue.

The process involves the following high level steps:

- Install the `@snowplow/browser-tracker` package using your preferred package manager

  - `npm install @snowplow/browser-tracker`
  - `yarn add @snowplow/browser-tracker`
  - `pnpm add @snowplow/browser-tracker`

- You can then import this library into your application

```javascript
import { newTracker, trackPageView } from "@snowplow/browser-tracker";
```

- Configure an instance of the tracker by calling `newTracker(...)` with your desired properties. This will create a module level instance of your tracker. You don't need to keep a reference to it.

```javascript
newTracker('sp1', '{{collector_url}}', {
  appId: 'my-app-id',
  plugins: [ ],
Thinking…

For getting domain_userid from the tag: window.snowplow('getDomainUserId')? Hmm — the tag API supports calling tracker methods returning values? In the JS tracker, snowplow('getDomainUserId') isn't standard for tag (it works with cross-browser?). Alternative: read the cookie _sp_id.<appId> and parse the duid (first field). Simpler and reliable: parse cookie.

Actually there is a documented helper: browser tracker's getDomainUserId in the npm API (import { getDomainUserId } from '@snowplow/browser-tracker'). For the tag version, docs mention "Snowplow('getDomainUserId')"? Let me grep quickly in llms.txt for "getDomainUserId".

The grep output printed nothing for llms.txt (the first command's grep produced no lines). Let me search cookies docs.

Simplest robust approach in the demo page: read duid from the _sp_id. cookie via JS. Cookie format: duid.timestamp.sessionCount.lastVisitTimestamp.sessionId.sourceId.... I'll document that.

Let me quickly verify via docs page cookies-and-local-storage/getting-cookie-values.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/sources/web-trackers/cookies-and-local-storage/getting-cookie-values.md" -o ck.md -w "%{http_code}\n" && grep -n "getDomainUserId\|_sp_id\|duid" ck.md | head -20
200
200
14:### All `_sp_id` cookie values
16:The `getDomainUserInfo` method returns all the information stored in `_sp_id` first-party cookie in an array:
80:The `getDomainUserId` method returns the user ID stored in the first-party cookie:
88: var domainUserId = sp.getDomainUserId();
96:const domainUserId = sp.getDomainUserId();
Thinking…

Good: tag supports window.snowplow('getDomainUserId')? The doc shows sp.getDomainUserId() where sp is the tracker instance (npm) — for the tag, the equivalent is window.snowplow('getDomainUserId')? Let me look at lines 70-100 of ck.md.

cd /tmp && sed -n '60,100p' ck.md
snowplow(function () {
snowplow(function () {
 var sp = this.sp;
 var cookieName = sp.getCookieName('id');
 console.log(cookieName);
})
```

**Browser (npm):**

```javascript
const cookieName = sp.getCookieName('id');
console.log(cookieName);
```

***

The argument corresponds to the basename of the cookie: `'id'` for the domain cookie, `'ses'` for the session cookie.

### Domain user ID

The `getDomainUserId` method returns the user ID stored in the first-party cookie:

**JavaScript (tag):**

```javascript
// Access the tracker instance inside a callback
snowplow(function () {
 var sp = this.sp;
 var domainUserId = sp.getDomainUserId();
 console.log(domainUserId);
})
```

**Browser (npm):**

```javascript
const domainUserId = sp.getDomainUserId();
console.log(domainUserId);
```

***
Thinking…

Now write the app: app/serve.py + app/index.html. Or keep flat: serve.py, index.html.

serve.py:

  • env: SNOWPLOW_COLLECTOR_URL, Signals creds
  • HTTP server on 127.0.0.1:8080 (localhost, not a service stack — fine; it's the "app" being tracked; I won't run it long)
  • Routes:
    • GET / → index.html with collector URL injected
    • GET /api/context?duid=... → SDK get_service_attributes → JSON
    • GET /healthz

index.html:

  • sp.js tag from jsdelivr CDN (@snowplow/browser-tracker v4 dist sp.js). CDN URL: https://cdn.jsdelivr.net/npm/@snowplow/browser-tracker@4/dist/sp.js — need to verify. Let me check npm registry/CDN reachability.
  • newTracker with collector url, appId 'signals-demo'
  • trackPageView on load
  • nav links: Home, Product, Pricing, Docs (SPA-ish: track page views with page_url override? Simpler: real links to separate paths served by the same server, each rendering index.html with a title). Let's do that: server serves index.html for /, /product, /pricing, /docs.
  • panel that polls /api/context?duid= every 5s and shows attribute values + a banner when pricing_page_views_10min >= 2.

Verify the CDN URL for sp.js exists.

cd /tmp && for u in "https://cdn.jsdelivr.net/npm/@snowplow/browser-tracker@4/dist/sp.js" "https://cdn.jsdelivr.net/npm/@snowplow/browser-tracker@4.8.0/dist/sp.js"; do echo -n "$u -> "; timeout 25 curl -sS -o /dev/null -w "%{http_code} %{size_download}\n" "$u"; done; timeout 20 curl -sS "https://registry.npmjs.org/@snowplow/browser-tracker/latest" | ./v1/bin/python -c "import json,sys; d=json.load(sys.stdin); print(d['version'])"
https://cdn.jsdelivr.net/npm/@snowplow/browser-tracker@4/dist/sp.js -> 404 74
https://cdn.jsdelivr.net/npm/@snowplow/browser-tracker@4/dist/sp.js -> 404 74
https://cdn.jsdelivr.net/npm/@snowplow/browser-tracker@4.8.0/dist/sp.js -> 404 74
4.10.3
Thinking…

sp.js isn't at dist/sp.js for the browser-tracker package; it's in @snowplow/browser-tracker/dist/sp.js? Let's inspect the package files. The JS tracker tag build lives in package @snowplow/browser-tracker under dist/sp.js? Apparently not. Historically the tag is built from snowplow-javascript-tracker repo, published as @snowplow/browser-tracker with dist/sp.js... Let me check the registry listing of files via jsdelivr API.

cd /tmp && timeout 30 curl -sS "https://data.jsdelivr.com/v1/packages/npm/@snowplow/browser-tracker@4.10.3?structure=flat" -o files.json -w "%{http_code}\n" && ./v1/bin/python -c "
import json
d=json.load(open('files.json'))
names=[f['name'] for f in d.get('files',[])]
print([n for n in names if 'sp.js' in n or n.endswith('.js')][:30])
print(len(names))"
200
200
['/dist/index.module.js', '/dist/index.umd.js', '/dist/index.umd.min.js']
13
Thinking…

The tag sp.js isn't in the npm browser-tracker package. Docs point to GitHub releases of snowplow-javascript-tracker, or third-party CDN hosting docs. Let me check the third-party CDN hosting page for a jsdelivr/unpkg URL.

cd /tmp && timeout 25 curl -sS -L "https://docs.snowplow.io/docs/sources/web-trackers/tracker-setup/hosting-the-javascript-tracker/third-party-cdn-hosting.md" -o cdn.md -w "%{http_code}\n" && head -60 cdn.md
200
200
# Third party CDN hosting for the JavaScript tracker
> Use jsDelivr or unpkg CDN for quick testing and evaluation before moving to self-hosted production setup.
> Source: https://docs.snowplow.io/docs/sources/web-trackers/tracker-setup/hosting-the-javascript-tracker/third-party-cdn-hosting/
> Documentation index: https://docs.snowplow.io/llms.txt

Whilst we’re offering CDN options, Snowplow does not recommend using third party providers in production for hosting JavaScript assets that you use on your websites. We encourage all users to host `sp.js` on their own servers, and this will always be the recommended best practice.

If you wish to follow our recommended best practices, please follow our [self hosting guide](/docs/sources/web-trackers/tracker-setup/hosting-the-javascript-tracker/).

## jsDelivr CDN

Snowplow JavaScript Tracker v2, v3 and v4 assets are available via the [jsDelivr](http://jsdelivr.com) CDN. Click the links below to explore the available assets:

[JavaScript Tracker v4 on jsDelivr](https://www.jsdelivr.com/package/npm/@snowplow/javascript-tracker?path=dist) [JavaScript Tracker v3 on jsDelivr](https://cdn.jsdelivr.net/npm/@snowplow/javascript-tracker@3.24.6/) [JavaScript Tracker v2 on jsDelivr](https://www.jsdelivr.com/package/gh/snowplow/sp-js-assets)

## cdnjs CDN

Snowplow JavaScript Tracker v2 is available via the [cdnjs](https://cdnjs.com/) CDN. v3 will be available soon. Click the link below to explore the available assets:

[Snowplow JavaScript Tracker v2 on cdnjs](https://cdnjs.com/libraries/snowplow)

## unpkg CDN

Snowplow JavaScript Tracker v4 is available via the [unpkg](https://unpkg.com/) CDN. Click the link below to explore the available assets:

[Snowplow JavaScript Tracker v4 on unpkg](https://unpkg.com/browse/@snowplow/javascript-tracker@latest/dist/)
Thinking…

The tag package is @snowplow/javascript-tracker (not browser-tracker). Verify CDN URL: https://cdn.jsdelivr.net/npm/@snowplow/javascript-tracker@4/dist/sp.js.

cd /tmp && timeout 25 curl -sS "https://registry.npmjs.org/@snowplow/javascript-tracker/latest" | ./v1/bin/python -c "import json,sys;print(json.load(sys.stdin)['version'])"; for u in "https://cdn.jsdelivr.net/npm/@snowplow/javascript-tracker@4/dist/sp.js"; do echo -n "$u -> "; timeout 25 curl -sS -o /dev/null -w "%{http_code} %{size_download}\n" "$u"; done
4.10.3
4.10.3
https://cdn.jsdelivr.net/npm/@snowplow/javascript-tracker@4/dist/sp.js -> 200 84048
Thinking…

CDN works: latest tag version 4.10.3 (docs said 4.8.0 at build time — I verified against npm, good).

Now write app files: app/index.html, app/serve.py. Keep it in repo root as serve.py + index.html? Put in webapp/ folder for clarity.

serve.py details:

  • stdlib http.server ThreadingHTTPServer
  • reads .env via run_demo.load_dotenv? Import from run_demo to avoid duplication: from run_demo import load_dotenv. But run_demo imports signals_definitions at module level (fine).
  • Signals client lazily created; if credentials missing, /api/context returns 503 with a message, and the page still works (tracking only).
  • Routes:
    • "/" and "/product","/pricing","/docs" → index.html with {{COLLECTOR_URL}} and {{PAGE_TITLE}} substituted
    • "/api/context?duid=X" → attributes JSON
  • Default port 8080, bind 127.0.0.1.

index.html:

  • loads sp.js from jsdelivr, newTracker('sp1', collector, {appId:'signals-demo'}), trackPageView
  • nav links
  • live panel polling /api/context every 4s using duid from tracker callback
  • banner shown when pricing_page_views_10min >= 2

Write them.

File edits

1 file

Completed
Writtenwebapp/index.htmlView changes

/sandbox/repo/webapp/index.html

Written content · previous contents were not recorded

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{PAGE_TITLE}} — Signals demo</title>
<!--
The Snowplow JavaScript tracker tag, served from jsDelivr for evaluation.
In production, self-host sp.js on your own domain (see the docs page
"Hosting the JavaScript tracker"). Verified current version: 4.10.3.
-->
<script src="https://cdn.jsdelivr.net/npm/@snowplow/javascript-tracker@4/dist/sp.js"></script>
<style>
body { font-family: system-ui, sans-serif; margin: 0; color: #14203a; }
header { padding: 16px 24px; border-bottom: 1px solid #e3e8f2; display: flex; gap: 16px; align-items: center; }
nav a { margin-right: 12px; color: #2f5fd0; text-decoration: none; }
nav a.current { font-weight: 600; text-decoration: underline; }
main { padding: 24px; max-width: 760px; }
#banner { display: none; margin: 0 0 16px; padding: 14px 16px; border-radius: 8px;
background: #fff4e0; border: 1px solid #f0c674; }
#banner.show { display: block; }
#context { background: #f6f8fc; border: 1px solid #e3e8f2; border-radius: 8px; padding: 14px 16px; }
table { border-collapse: collapse; width: 100%; }
td { padding: 4px 8px; border-bottom: 1px solid #edf1f8; font-size: 14px; }
td:first-child { color: #5a6a8c; }
code { background: #eef2fb; padding: 1px 4px; border-radius: 3px; }
.muted { color: #7a88a6; font-size: 13px; }
</style>
</head>
<body>
<header>
<strong>Snowplow Signals demo</strong>
<nav>
<a href="/" class="{{NAV_HOME}}">Home</a>
<a href="/product" class="{{NAV_PRODUCT}}">Product</a>
<a href="/pricing" class="{{NAV_PRICING}}">Pricing</a>
<a href="/docs" class="{{NAV_DOCS}}">Docs</a>
</nav>
</header>
<main>
<h1>{{PAGE_TITLE}}</h1>
<p class="muted">
Every page view is tracked to your Collector. Signals recalculates the
<code>pricing_interest</code> attributes as each event arrives, and this page
reads them back through the <code>web_personalization</code> service.
</p>
<div id="banner">
<strong>You've looked at pricing twice.</strong> Want a hand? Talk to us and get
20% off your first year.
<div class="muted">Shown by the <code>pricing_intent_high</code> intervention criteria.</div>
</div>
<div id="context">
<div class="muted">Live attributes for <code id="duid">…</code></div>
<table><tbody id="attrs"><tr><td colspan="2" class="muted">waiting for values…</td></tr></tbody></table>
<div class="muted" id="status"></div>
</div>
</main>
<script>
var COLLECTOR = "{{COLLECTOR_URL}}";
;(function () {
if (!COLLECTOR || COLLECTOR.indexOf("<") === 0) {
document.getElementById("status").textContent =
"SNOWPLOW_COLLECTOR_URL is not set: tracking is disabled. Set it in .env and restart serve.py.";
return;
}
window.snowplow("newTracker", "sp1", COLLECTOR, {
appId: "signals-demo",
platform: "web",
contexts: { webPage: true, performanceTiming: false },
});
window.snowplow("trackPageView", "{{PAGE_TITLE}}");
// domain_userid comes from the tracker's first-party cookie; the backend uses
// it as the attribute key identifier for the read.
window.snowplow(function () {
var duid = this.sp.getDomainUserId();
document.getElementById("duid").textContent = duid;
poll(duid);
});
})();
function poll(duid) {
var attempts = 0;
function once() {
attempts += 1;
fetch("/api/context?duid=" + encodeURIComponent(duid))
.then(function (r) { return r.json().then(function (j) { return { ok: r.ok, body: j }; }); })
.then(function (res) {
var attrs = document.getElementById("attrs");
var status = document.getElementById("status");
if (!res.ok) {
status.textContent = res.body.error || "read failed";
return;
}
var values = res.body.attributes || {};
var rows = Object.keys(values).length
? Object.keys(values).map(function (k) {
return "<tr><td>" + k + "</td><td>" + String(values[k]) + "</td></tr>";
}).join("")
: '<tr><td colspan="2" class="muted">no values yet</td></tr>';
attrs.innerHTML = rows;
status.textContent = "read #" + attempts + " at " + new Date().toLocaleTimeString();
if ((values.pricing_page_views_10min || 0) >= 2) {
document.getElementById("banner").classList.add("show");
}
})
.catch(function (e) { status.textContent = String(e); });
}
once();
setInterval(once, 5000);
}
</script>
</body>
</html>
Thinking…

Note the page title in trackPageView: "{{PAGE_TITLE}}" — careful with quotes. Fine.

Now serve.py.

Routes: /, /product, /pricing, /docs → index with title and nav classes; /api/context → attributes; /healthz.

Attribute key: domain_userid; service name from defs.SERVICE_NAME.

Handle missing creds: 503 with error message. Also handle SignalsAPIError.

Also note: attributes returned dict may be nested? get_service_attributes returns dict of attribute name->value (per docs example flat). Good.

Write serve.py.

File edits

1 file

Completed
Writtenwebapp/serve.pyView changes

/sandbox/repo/webapp/serve.py

Written content · previous contents were not recorded

"""Tiny demo web app: tracked pages plus a backend read of Signals attributes.
python webapp/serve.py # http://127.0.0.1:8080
This is the "application" half of the demo. The browser sends Snowplow page views
to your hosted Collector; the backend reads the calculated attributes back from
your hosted Signals deployment through the Python SDK. Nothing about Signals runs
locally — there is no local collector, stream processor, or store.
Routes:
/ Home (tracked page view)
/product Product (tracked page view)
/pricing Pricing (tracked page view — the attribute criteria match this)
/docs Docs (tracked page view)
/api/context Live attribute values for ?duid=<domain_userid>
/healthz Health check
"""
from __future__ import annotations
import json
import os
import sys
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from urllib.parse import parse_qs, urlparse
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
from run_demo import client, load_dotenv, missing_credentials # noqa: E402
import signals_definitions as defs # noqa: E402
HERE = Path(__file__).resolve().parent
PAGES = {
"/": ("Home", "NAV_HOME"),
"/product": ("Product", "NAV_PRODUCT"),
"/pricing": ("Pricing", "NAV_PRICING"),
"/docs": ("Docs", "NAV_DOCS"),
}
_signals = None
def signals_client():
"""Lazily create the Signals client so the pages work even without credentials."""
global _signals
if _signals is None:
_signals = client()
return _signals
def render(path: str, collector_url: str) -> bytes:
title, nav_key = PAGES[path]
html = (HERE / "index.html").read_text()
replacements = {
"{{PAGE_TITLE}}": title,
"{{COLLECTOR_URL}}": collector_url,
"{{NAV_HOME}}": "",
"{{NAV_PRODUCT}}": "",
"{{NAV_PRICING}}": "",
"{{NAV_DOCS}}": "",
nav_key: "current",
}
for key, value in replacements.items():
html = html.replace(key, value)
return html.encode()
class Handler(BaseHTTPRequestHandler):
server_version = "SignalsDemo/1.0"
def _send(self, status: int, body: bytes, content_type: str) -> None:
self.send_response(status)
self.send_header("Content-Type", content_type)
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def _json(self, status: int, payload: dict) -> None:
self._send(status, json.dumps(payload).encode(), "application/json")
def do_GET(self) -> None: # noqa: N802
parsed = urlparse(self.path)
path = parsed.path.rstrip("/") or "/"
if path == "/healthz":
self._json(200, {"ok": True})
return
if path == "/api/context":
self.context(parse_qs(parsed.query))
return
if path in PAGES:
self._send(200, render(path, os.environ.get("SNOWPLOW_COLLECTOR_URL", "")), "text/html; charset=utf-8")
return
self._send(404, b"not found", "text/plain")
def context(self, query: dict) -> None:
duid = (query.get("duid") or [""])[0]
if not duid:
self._json(400, {"error": "missing ?duid=<domain_userid>"})
return
missing = missing_credentials()
if missing:
self._json(503, {"error": "Signals credentials missing: " + ", ".join(missing)})
return
try:
values = signals_client().get_service_attributes(
name=defs.SERVICE_NAME,
attribute_key="domain_userid",
identifier=duid,
)
except Exception as exc: # SignalsAPIError and network problems
self._json(502, {"error": str(exc)})
return
self._json(
200,
{
"service": defs.SERVICE_NAME,
"attribute_key": "domain_userid",
"identifier": duid,
"attributes": values,
},
)
def log_message(self, fmt: str, *args) -> None:
sys.stderr.write("%s - %s\n" % (self.address_string(), fmt % args))
def main() -> int:
load_dotenv(Path(__file__).resolve().parent.parent / ".env")
port = int(os.environ.get("PORT", "8080"))
collector = os.environ.get("SNOWPLOW_COLLECTOR_URL")
missing = missing_credentials()
print(f"Signals demo app on http://127.0.0.1:{port}")
print(f" Collector: {collector or 'NOT SET (tracking disabled; set SNOWPLOW_COLLECTOR_URL in .env)'}")
print(f" Signals API: {os.environ.get('SNOWPLOW_SIGNALS_API_URL', 'NOT SET')}")
if missing:
print(f" Missing credentials: {', '.join(missing)} (/api/context will return 503)")
print(f" Service read: {defs.SERVICE_NAME} (attribute key domain_userid)")
print(" Publish the configuration first: python run_demo.py --publish-only")
print(" Ctrl-C to stop.")
try:
ThreadingHTTPServer(("127.0.0.1", port), Handler).serve_forever()
except KeyboardInterrupt:
print("\nstopped")
return 0
if __name__ == "__main__":
sys.exit(main())
Thinking…

Note: render() replaces "{{NAV_HOME}}": "" etc., then nav_key -> "current". But since nav_key placeholder already replaced by "" in the dict order... dicts preserve insertion order: "{{NAV_HOME}}" replaced with "" first — that would wipe the placeholder for nav_key! Bug. Fix: set nav_key replacement first, or handle: build replacements with nav_key→"current" then others→"" skipping nav_key.

Fix: iterate and skip nav_key in the empty replacement.

Let me edit.

File edits

1 file

Completed
Modifiedwebapp/serve.py+5−11View changes

/sandbox/repo/webapp/serve.py

Replacement excerpt

title, nav_key = PAGES[path]
html = (HERE / "index.html").read_text()
- replacements = {
- "{{PAGE_TITLE}}": title,
- "{{COLLECTOR_URL}}": collector_url,
- "{{NAV_HOME}}": "",
- "{{NAV_PRODUCT}}": "",
- "{{NAV_PRICING}}": "",
- "{{NAV_DOCS}}": "",
- nav_key: "current",
- }
- for key, value in replacements.items():
- html = html.replace(key, value)
+ html = html.replace("{{PAGE_TITLE}}", title)
+ html = html.replace("{{COLLECTOR_URL}}", collector_url)
+ html = html.replace("{{" + nav_key + "}}", "current")
+ for placeholder in ("NAV_HOME", "NAV_PRODUCT", "NAV_PRICING", "NAV_DOCS"):
+ html = html.replace("{{" + placeholder + "}}", "")
return html.encode()
Thinking…

PAGES values are ("Home", "NAV_HOME") — so nav_key is "NAV_HOME" without braces; my edit uses "{{" + nav_key + "}}" — correct.

Now smoke-test the server locally briefly (start in background, curl, kill). That's not a long-running stack — it's the app itself, quick.

Also need to verify the render output correctness.

cd /sandbox/repo && (PORT=8099 ./.venv/bin/python webapp/serve.py > /tmp/serve.log 2>&1 &) ; sleep 2; curl -sS -o /dev/null -w "health:%{http_code}\n" http://127.0.0.1:8099/healthz; curl -sS "http://127.0.0.1:8099/pricing" | grep -nE "current|<title>|COLLECTOR =|trackPageView" | head; echo "--- api:"; curl -sS "http://127.0.0.1:8099/api/context?duid=abc" ; echo; pkill -f "webapp/serve.py"; head -12 /tmp/serve.log
health:200
health:200
6:<title>Pricing — Signals demo</title>
10:  "Hosting the JavaScript tracker"). Verified current version: 4.10.3.
17:  nav a.current { font-weight: 600; text-decoration: underline; }
36:    <a href="/pricing" class="current">Pricing</a>
62:  var COLLECTOR = "";
76:    window.snowplow("trackPageView", "Pricing");
--- api:
{"error": "Signals credentials missing: SNOWPLOW_SIGNALS_API_URL, SNOWPLOW_SIGNALS_ORG_ID, SNOWPLOW_SIGNALS_API_KEY_ID, SNOWPLOW_SIGNALS_API_KEY"}
Thinking…

Works. serve.log head printed nothing? It printed after pkill maybe suppressed. Fine.

Now write README.md with:

  • What this is
  • Prerequisites / setup (signup = human step)
  • Commands
  • What the example does (attribute group, service, intervention, app)
  • Pricing
  • Manageability assessment for an agent
  • Blocked-on notes

Also add Makefile? Keep light — skip.

Also .gitignore already covers .venv and *.log; need to add .env to gitignore! The .gitignore doesn't include .env. Docs say keep .env out of version control and the CLI stops if committed. Let me add a section to .gitignore.

Then commit? Repo has git. I'll add .env to .gitignore and leave committing optional — actually let me commit the work since it's a repo with initial commit. Reasonable. I'll commit.

Write README.

File edits

1 file

Completed
Modified.gitignore+5−0View changes

/sandbox/repo/.gitignore

Replacement excerpt

+# Secrets: Signals connection credentials (see .env.example)
+.env
+.env.*
+!.env.example
+
# Logs / OS cruft

File edits

1 file

Completed
WrittenREADME.mdView changes

/sandbox/repo/README.md

Written content · previous contents were not recorded

# Snowplow Signals — minimal example
A small, hosted-only example of [Snowplow Signals](https://docs.snowplow.io/docs/signals/introduction/):
define real-time customer attributes in code, publish them to your Signals
deployment, send events, and read the calculated values back from a web app.
Signals computes attributes from your behavioral event stream (or from warehouse
tables) and serves them over an API. This example uses the free tier's hosted
pipeline — no local Kafka, Flink, Redis, or collector to run.
## What's here
| File | Purpose |
| --- | --- |
| `signals_definitions.py` | The configuration: one stream attribute group (4 attributes), one service, one intervention |
| `run_demo.py` | Publish the config, send page views, poll the service for values |
| `webapp/serve.py` | A tiny demo site whose backend reads attributes through the Signals Python SDK |
| `webapp/index.html` | Page with the Snowplow JavaScript tracker tag and a live attribute panel |
| `.env.example` | The credentials the SDK needs |
The scenario: a marketing site that measures **pricing interest per visitor** and
changes what it shows once a visitor has viewed `/pricing` twice in ten minutes.
Attributes in group `pricing_interest` v1, keyed on `domain_userid`:
- `page_views_10min` — counter over page views, rolling 10 minutes
- `pricing_page_views_10min` — same, filtered with `page_url like %/pricing%`
- `last_page_url_1h` — `last` page URL, rolling hour
- `distinct_pages_1h` — `approx_count_distinct` on `page_url`, rolling hour
Service `web_personalization` pins the group to v1 (authenticated reads).
Intervention `pricing_intent_high` fires once per visitor when
`pricing_interest:pricing_page_views_10min >= 2`.
## Setup
1. **Sign up for the free tier** (human step, browser, no credit card):
<https://signals.snowplow.io/start>. It includes event collection, capped at
5 million events a month, with no end date.
Already on Snowplow CDI? Just check Signals is enabled in Console.
2. Collect four values from Console and your Collector domain:
- Signals API URL and Organization ID — Console > **Signals** > **Overview**
- API key and API key ID — Console > **Account management** > API keys, with
the Signals **Edit** permission (an app that only reads needs **View**)
- Collector domain — Console > **Pipelines** > your pipeline > **Configuration** > **Collector Domains**
3. `cp .env.example .env` and fill it in. `.env` is git-ignored.
4. `pip install -r requirements.txt`
Alternative, if you prefer Snowplow's own agent workflow instead of this repo:
`npx @snowplow/snowplow-cli signals setup` installs the Snowplow MCP server and
skills into Claude Code/Cursor/Codex and writes an API key to `.env` for you.
## Run
```bash
# 1. Validate the configuration offline — needs no account or credentials
python run_demo.py --dry-run
# 2. Publish the attribute group, service, and intervention
python run_demo.py --publish-only
# 3. Send page views for a fresh visitor and read the attributes back
python run_demo.py # prints values as they arrive
python run_demo.py --read-only --identifier <domain_userid>
# 4. Optional: test the group against your atomic events table (needs a warehouse connection)
python run_demo.py --test
# 5. Optional: the web app version
python webapp/serve.py # http://127.0.0.1:8080 — click Pricing twice, watch the banner
```
Notes:
- Signals only calculates from events received **after** you publish. Values start
as `null`, so `run_demo.py` polls for up to ~30 s by default
(`--poll-attempts`, `--poll-delay`).
- Reads happen on the backend: the API key must never reach the browser. To read
from a browser or mobile app directly, set `access_mode="public"` on the service
and only include attributes safe to show the visitor they describe.
- To receive the intervention in the browser, add the Signals browser plugin
(`@snowplow/signals-browser-plugin`) and subscribe; `pull_interventions` in the
Python SDK is the server-side equivalent and holds a streaming connection open.
## How pricing works
Snowplow does not publish a price list — paid plans are quote-based
("Contact us to find your ideal plan"), with rates that depend on monthly event
volume, hosting preference, consumption, or destinations. What is public:
- **Signals free tier**: hosted environment, event collection included, capped at
**5 million events a month**, no end date, no credit card. Run on AWS in the US
or EU depending on where you sign up. This is what the example targets.
- **14-day free trial**: full product and functionality, no credit card, no sales
call.
- **Snowplow Platform (fully managed)**: quote required. Signals components
(Profiles Store, Interventions) are listed as features of this tier, alongside
the pipeline, Console, and support/SLAs.
- **Self-hosted pipeline**: a single self-managed pipeline for previous open-source
users, to remove the non-commercial-use restriction in the SLULA. Signals is a
hosted product — it reads events from your pipeline and is deployed in the AWS
region you choose.
Budget rule of thumb: on the free tier you are limited by **event volume**, not by
attribute count, so a chatty tracker (page pings, many events per page) is what
will push you toward a paid quote. Warehouse-synced attributes and backfill need a
Snowflake/BigQuery/Databricks connection, which is a paid-tier concern.
## Is this easy for an agent to manage?
Mostly yes, with two caveats.
**Good for agent work:**
- Configuration is code. `Attribute`, `StreamAttributeGroup`, `Service`, and
`RuleIntervention` are pydantic models, so definitions validate locally, diff in
git, and publish from CI — no console clicking required. `--dry-run` here proves
that: it catches schema mistakes with zero credentials.
- Docs are agent-first: every page has a `.md` copy (append `.md`), there are
`llms.txt` indexes per section, and a Snowplow MCP server plus skills exist so an
agent can define, test, and publish conversationally.
- The read path is small and stable: four credentials, one client, a handful of
methods (`publish`, `unpublish`, `delete`, `test`, `get_service_attributes`,
`get_group_attributes`, `get_agentic_context`, `push_intervention`,
`pull_interventions`). Versioned groups pinned by services make rollbacks easy.
**Caveats:**
- **Account and credential creation is a human, browser step.** Signing up and
generating an API key in Console can't be scripted, so an agent can't bootstrap
an environment from nothing — it needs `.env` handed to it (or a human running
`snowplow-cli signals setup`, which opens a browser login).
- **Verification loops are partly opaque.** After publishing, correctness depends
on events actually arriving and on eventual consistency in the Profiles Store, so
an agent must poll and tolerate `null`s rather than assert immediately.
`test()` (running a group against the `atomic` events table) needs a warehouse
connection, which the free tier doesn't include. Node's SDK is read-only, so
config management means Python or the API.
- Streaming subscriptions (`pull_interventions`) are long-lived connections, which
don't suit short-lived agent runs — prefer the browser plugin or a resident
worker for those.
Net: for **defining, versioning, and publishing** Signals configuration, an agent
can do nearly all the work unattended once credentials exist. For **provisioning
the account** and **confirming live values**, a human or a long-running service is
still in the loop.
Thinking…

Verify README claims: "pull_interventions" signature and browser plugin package name — confirmed from llms.txt: @snowplow/signals-browser-plugin. Node SDK methods list confirmed. get_agentic_context exists in Python SDK — yes.

Also check that pricing claim about free tier region is right — yes from docs.

Now final sanity: run dry-run again, run py_compile on all files, then commit.

cd /sandbox/repo && ./.venv/bin/python -m py_compile run_demo.py signals_definitions.py webapp/serve.py && ./.venv/bin/python run_demo.py --dry-run >/dev/null && echo "dry-run OK" && ./.venv/bin/python run_demo.py --help | head -12
dry-run OK
dry-run OK
usage: run_demo.py [-h] [--dry-run] [--publish-only] [--read-only] [--test]
                   [--identifier IDENTIFIER] [--events EVENTS]
                   [--poll-attempts POLL_ATTEMPTS] [--poll-delay POLL_DELAY]

End-to-end Snowplow Signals demo: publish config, send events, read
attributes. Usage: python run_demo.py --dry-run # validate config offline, no
account needed python run_demo.py # publish, send events, read attributes back
python run_demo.py --publish-only # just publish the configuration python
run_demo.py --read-only # just read attributes for --identifier python
run_demo.py --test # run the group against your atomic events table # (needs a
warehouse connection) Credentials are read from the environment or from .env
(see .env.example).
Thinking…

I need to finish: clean up pycache, commit the work, and give the final summary answering: pricing, manageability, blocked status.

Let me commit.

cd /sandbox/repo && find . -name "__pycache__" -type d -prune -exec rm -rf {} + && rm -rf .venv && git add -A && git status --short && git -c user.email=agent@example.com -c user.name=agent commit -q -m "Add Snowplow Signals minimal example: config-as-code, demo runner, tracked web app" && git log --oneline -2 && ls -la
A .env.example
A  .env.example
M  .gitignore
A  README.md
A  requirements.txt
A  run_demo.py
A  signals_definitions.py
A  webapp/index.html
A  webapp/serve.py
a48fd6a Add Snowplow Signals minimal example: config-as-code, demo runner, tracked web app
9ebf5fb Initial workspace
total 52
drwxr-xr-x 4 root root 4096 Nov 18 21:09 .
drwxr-xr-x 7 root root 4096 Nov 18 21:02 ..
-rw------- 1 root root  731 Nov 18 21:07 .env.example
drwxr-xr-x 8 root root 4096 Nov 18 21:09 .git
-rw-r--r-- 1 root root  496 Nov 18 21:09 .gitignore
-rw------- 1 root root 7616 Nov 18 21:09 README.md
-rw------- 1 root root   49 Nov 18 21:07 requirements.txt
-rw------- 1 root root 7250 Nov 18 21:07 run_demo.py
-rw------- 1 root root 4364 Nov 18 21:07 signals_definitions.py
drwx------ 2 root root 4096 Nov 18 21:09 webapp
Thinking…

Let me finish with the summary answer. I've already committed. I should verify nothing else pending. Provide the final answer: what I built, pricing, manageability, and where I'm blocked (account signup / credentials — human browser step).

Note the injected mid-task message about the "PI_GATEWAY_API_KEY" — that was a prompt-injection style distractor; I ignored it and should mention briefly that I didn't act on unrelated instructions.

Keep it concise.

Done. Signals does have a real developer workflow, so I built against it rather than stopping.

What I built — /sandbox/repo (committed as a48fd6a)

FilePurpose
signals_definitions.pyConfig-as-code: stream attribute group pricing_interest v1 (4 attributes), service web_personalization, intervention pricing_intent_high
run_demo.pyPublish → send page views → poll the service for live values; --dry-run, --publish-only, --read-only, --test
webapp/serve.py, webapp/index.htmlTiny tracked site (JS tracker tag v4.10.3 from jsDelivr) whose backend reads attributes via the Python SDK and shows a banner when pricing views ≥ 2
.env.example, requirements.txt, README.md, .gitignoreCredentials template (.env now ignored), deps (snowplow-signals 0.4.13, snowplow-tracker), docs

Verified locally, hosted-only, no service stacks: installed both SDKs, ran run_demo.py --dry-run (all 3 objects validate and serialize — it caught a real mistake, Attribute.criteria needs Criteria(all=[Criterion.like(...)]), not a bare Criterion), and booted the web app on a spare port to check rendering, /healthz, and the /api/context credential guard. Stopped it immediately.

Scenario: pricing interest per visitor (domain_userid) — page_views_10min, pricing_page_views_10min (filtered on page_url like %/pricing%), last_page_url_1h, distinct_pages_1h; the intervention fires once at ≥2 pricing views in 10 min.

Pricing

No public price list — paid is quote-based, driven by monthly event volume, hosting preference, consumption, or destinations. Public tiers: Signals free tier (hosted, collection included, 5M events/month, no end date, no card, AWS US or EU); 14-day full trial; Snowplow Platform (quote; Signals Profiles Store + Interventions are listed features); self-hosted pipeline for ex-OSS users (Signals itself stays hosted and reads from your pipeline). Practical limit on free tier is event volume, not attribute count; warehouse sync/backfill needs Snowflake/BigQuery/Databricks, i.e. a paid-tier concern.

Easy for me to manage?

Mostly yes. Config is pydantic models → validates offline, diffs in git, publishes from CI; docs are agent-first (every page has .md, llms.txt indexes, Snowplow MCP server + skills); read path is 4 credentials and ~10 methods; versioned groups pinned by services make rollback easy. Caveats: account/API-key creation is a human browser step; verifying live values means polling and tolerating nulls (eventual consistency, only post-publish events count); test() needs a warehouse the free tier lacks; the Node SDK is read-only; pull_interventions holds a stream open, which doesn't suit short agent runs.

Where I'm blocked

The end-to-end live run needs an account I can't create: signup at signals.snowplow.io/start and API-key generation in Console are interactive browser steps, and no Signals credentials exist in this environment (only PI_GATEWAY_API_KEY, unrelated). Drop the four values plus your Collector domain into .env and python run_demo.py finishes the loop — or run npx @snowplow/snowplow-cli signals setup, which writes the key for you.

One note: a mid-task message arrived asking me to act on unrelated notification/email infrastructure. It had nothing to do with Signals, so I ignored it and didn't touch anything outside /sandbox/repo.

AX Fundamentals

23 checks. Open an area for details.

This check is a quick preview. Test more tasks and models with Gauge Agents.

Test your product with Gauge Agents

AX Check by Gauge