Skip to content

snowplow-industry-solutions/agentic-app-tracking-tutorial

Repository files navigation

Snowplow Agentic App Tracking Demo

A travel booking chatbot that demonstrates how to instrument AI-powered applications with Snowplow behavioral data tracking across three architectural layers: client-side, server-side, and agent self-tracking.

This repository is the companion code for the Snowplow Agentic Tracking Accelerator tutorial. Each git tag represents a stage in the tutorial, progressively adding tracking from zero to full implementation.

Tags

Tag Description
v0.0-starter Fully functional travel chatbot with zero Snowplow tracking
v0.1-client-tracking Browser-side Snowplow tracking for user interactions
v0.2-server-tracking Server-side tracking for agent orchestration and tool execution
v0.3-agentic-tracking Agent self-tracking tools — complete implementation

Tech Stack

  • Frontend: Next.js, React 19, TypeScript, Tailwind CSS
  • AI: Multi-provider support via Vercel AI SDK (Anthropic, OpenAI, Google)
  • Tracking: Snowplow Browser Tracker + Node Tracker (added progressively)
  • Validation: Snowplow Micro (Docker) for local event validation

Prerequisites

  • Node.js 18+
  • At least one LLM API key (Anthropic, OpenAI, or Google)
  • Docker (required from v0.1 onwards for Snowplow Micro)

Quick Start

# Clone and checkout a tag
git clone https://github.com/snowplow-industry-solutions/agentic-app-tracking-tutorial.git
cd agentic-app-tracking-tutorial
git checkout v0.1-client-tracking  # or any tag

# Install dependencies
npm install

# Create your environment file
cp .env.example .env.local
# Edit .env.local with your API key(s)

# Start with Snowplow Micro (v0.1+)
npm run start:dev

# Or start without tracking (v0.0-starter)
npm run dev

Open http://localhost:3000 to use the travel assistant.

Running with Snowplow Micro

From v0.1-client-tracking onwards, the app uses Snowplow Micro for local event validation. Docker is required.

# Start Micro + Next.js together
npm run start:dev

This launches Snowplow Micro on port 9090 and Next.js on port 3000. The LiveTrackingPanel in the app UI shows events in real-time.

Useful Micro endpoints

Endpoint Description
http://localhost:9090/micro/good Successfully validated events
http://localhost:9090/micro/bad Events that failed schema validation
http://localhost:9090/micro/all All received events
http://localhost:9090/micro/reset Clear all stored events

How It Works

The app is an AI-powered travel assistant that can:

  • Search for flights between cities
  • Book flights for passengers
  • Check calendar availability

Users can select between multiple AI providers (Anthropic Claude, OpenAI GPT, Google Gemini) via a dropdown in the UI. The model selection persists across sessions.

License

Apache-2.0

About

Companion repo for a Snowplow Docs tutorial on building an agentic app with tracking.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages