Skip to main content

Automation Demo

Experience real-time analytics automation with our Python-powered demo. Watch as Plausible Analytics milestones automatically trigger rich Slack notifications, complete with growth insights and actionable recommendations.

🎬

Live Demo Video

Watch the automation in action - coming soon!

🚀 Quick Start

Run the Demo

# Navigate to the automation directory
cd automation
# Install dependencies
pip install -r requirements.txt
# Run in demo mode (no API keys needed)
python automation_demo.py --demo

✨ Key Features

📊 Real-Time Analytics

Monitors Plausible Analytics API for visitor metrics, pageviews, and engagement data with configurable check intervals.

🏆 Milestone Detection

Automatically detects when key metrics reach predefined thresholds and triggers celebration notifications.

💬 Rich Slack Notifications

Sends beautifully formatted Slack messages with blocks, emojis, and actionable insights for your team.

🔧 Demo Mode

Run the full automation without API keys - perfect for demos, testing, and development.

📁 Code Structure

📄
automation_demo.py
Main automation engine with Plausible API client, Slack notifier, and milestone detector
⚙️
milestones.json
Configurable achievement thresholds and celebration messages
📋
requirements.txt
Python dependencies for the automation stack
🔧
scripts/setup_slack.py
Helper script for Slack app configuration and testing

📊 Sample Demo Output

============================================================
🎯 PLAUSIBLE ANALYTICS AUTOMATION DEMO
============================================================
Duration: 10 minutes
Check Interval: 30 seconds
Demo Mode: ✅ Enabled
============================================================
📊 Cycle 1 - 2025-10-16T05:36:11.284493
Visitors: 51
Pageviews: 117
Bounce Rate: 42.0%
Avg Duration: 180s
🏆 Milestone achieved: 🎯 Bounce Rate Optimization (0.42 >= 0.35)
📤 1 notification(s) sent
============================================================
🎬 DEMO COMPLETED
============================================================

⚙️ Production Setup

1. Plausible Analytics Setup

  1. Get your API key from Plausible Analytics settings
  2. Note your site ID (found in the URL when viewing your site)
  3. Add these to your environment variables

2. Slack App Setup

  1. Create a new Slack app at api.slack.com
  2. Add chat:write bot scope
  3. Install to your workspace and copy the Bot User OAuth Token
  4. Run python scripts/setup_slack.py to test the connection

3. Environment Variables

PLAUSIBLE_API_KEY=your_api_key_here
PLAUSIBLE_SITE_ID=your_site_id_here
SLACK_BOT_TOKEN=xoxb-your-slack-token

📥 Download the Code

Get the complete automation codebase with all scripts, configurations, and documentation.