Send your page views from Cloudflare worker to InfluxDB.
- Your site need to be setup behind Cloudflare CDN.
- You need to setup InfluxDB with external access (make sure you have set authentication)
- Make sure InfluxDB is hosted under supported port for Workers. Best option is 80 or 443.
- Install wrangler package
npm i @cloudflare/wrangler -g
- Copy example files
cp .env.example .env
cp wrangler.toml.example wrangler.toml
- Deploy your worker to a site with wrangler
wrangler publish --env production
- (Optional) If you're using Grafana with InfluxDB, then you can import example Dashboard from first screen.