Display real-time Cloudflare analytics for your website on your Stream Deck.
- Real-time Analytics: View Cloudflare statistics directly on your Stream Deck
- Multiple Metrics: Choose from:
- Total Requests (24h)
- Bandwidth Usage
- Threats Blocked
- Unique Visitors
- Cache Hit Ratio
- Auto-refresh: Configurable refresh intervals (1-60 minutes)
- Dynamic Font Sizing: Automatically adjusts text size for large metrics
- Easy Setup: Simple configuration through Stream Deck UI
- Cross-Platform: Works on Windows and macOS
- Stream Deck software version 6.4 or higher
- Node.js version 20 or higher
- Cloudflare account with API access
- Stream Deck CLI (
npm install -g @elgato/cli)
Windows:
.\install.ps1macOS:
chmod +x install.sh
./install.shThe installation script will:
- Check for Node.js 20+
- Install dependencies
- Build the plugin
- Copy to Stream Deck plugins directory
- Provide next steps
cd streamdeck-plugins/cloudflare-analytics
npm installnpm run buildThe plugin will be automatically installed to:
- Windows:
%APPDATA%\Elgato\StreamDeck\Plugins\ - macOS:
~/Library/Application Support/com.elgato.StreamDeck/Plugins/
Or use the Stream Deck CLI:
streamdeck linkRestart the Stream Deck application to load the plugin.
- Go to Cloudflare Dashboard
- Click "Create Token"
- Use the "Read Analytics" template or create a custom token with:
- Permissions:
Zone > Analytics > Read - Zone Resources: Include your zone
- Permissions:
- Copy the generated token
- Go to your Cloudflare Dashboard
- Select your domain
- Scroll down on the Overview page
- Copy the Zone ID from the right sidebar
- Drag the "Cloudflare Stats" action to a Stream Deck button
- Click the button to open settings
- Enter your:
- API Token: Your Cloudflare API token
- Zone ID: Your zone ID
- Display Metric: Choose which metric to display
- Refresh Interval: How often to update (default: 5 minutes)
For development with auto-reload:
npm run watchThis will automatically rebuild and restart the plugin when you make changes.
cloudflare-analytics/
├── src/
│ ├── plugin.ts # Main plugin entry point
│ ├── cloudflare-api.ts # Cloudflare API integration
│ └── actions/
│ └── stats-action.ts # Stream Deck action implementation
├── com.milanese.cloudflare-analytics.sdPlugin/
│ ├── manifest.json # Plugin manifest
│ ├── bin/ # Compiled output
│ ├── imgs/ # Plugin icons
│ └── ui/
│ └── property-inspector.html # Settings UI
├── package.json
├── tsconfig.json
└── rollup.config.mjs
- Total Requests: Total HTTP requests in the last 24 hours
- Bandwidth: Total data transferred (formatted as B/KB/MB/GB)
- Threats Blocked: Number of threats stopped by Cloudflare
- Unique Visitors: Number of unique IP addresses
- Cache Hit Ratio: Percentage of requests served from cache
- Ensure Stream Deck software is version 6.4+
- Restart Stream Deck application
- Check that the plugin is in the correct directory
- Verify your API token has Analytics:Read permission
- Confirm the Zone ID is correct
- Check that the API token hasn't expired
- Check your internet connection
- Verify API token is still valid
- Ensure Cloudflare API is accessible
MIT License - See LICENSE file for details
Peter Milanese