Prerequisites
- A Siteline website key
- An existing Azure CDN or Front Door profile
- Azure CLI configured for the target subscription
- Node.js 18+ and npm
Azure CDN diagnostic logs are batched hourly. Expect a 5–60 minute delay between a CDN request and the pageview appearing in Siteline.
Setup
How it works
This integration uses Diagnostic Settings, Blob Storage, Event Grid, and Azure Functions:- Azure CDN or Front Door writes hourly log batches to Blob Storage via Diagnostic Settings.
- Blob Storage emits
BlobCreatedevents to Event Grid. - Event Grid triggers the Azure Function processor.
- The Function downloads and decompresses the log blob.
- The Function parses records, normalizes fields across all CDN SKUs (Standard Microsoft, Standard/Premium Verizon, Front Door Standard/Premium), and sends pageview events to Siteline with 10 concurrent requests and 3 retries.
dlq container) for inspection.
Configuration
All settings are defined ininfra/main.bicepparam and can be edited directly before running setup.
Your Siteline website key. Used to authenticate requests to the Siteline API.
The full Azure resource ID of the target CDN or Front Door profile.
Azure deployment region. Defaults to
eastus.Storage account name. Defaults to
sitelineazurecdnlogs. Must be globally unique.Function App name. Defaults to
siteline-azure-cdn-processor.Blob container name for CDN logs. Defaults to
cdn-logs.Siteline intake endpoint. Defaults to
https://api.siteline.ai/v1/intake/pageview.Enables verbose logging in the Function App. Defaults to
false.Deploying updates
After initial setup, redeploy function code with:Troubleshooting
az: command not found
az: command not found
Install the Azure CLI and ensure it is available on your
PATH.No CDN profiles found
No CDN profiles found
Verify you are logged into the correct Azure subscription. You can also enter the CDN profile resource ID manually when prompted.
Storage account name already taken
Storage account name already taken
Storage account names are globally unique. Edit
storageAccountName in infra/main.bicepparam with a unique name and rerun setup.RBAC permission error during setup
RBAC permission error during setup
Role assignments can take 1–2 minutes to propagate. Wait briefly and rerun
npm run setup — Bicep deployments are idempotent.LocationNotAvailableForResourceGroup with Global region
LocationNotAvailableForResourceGroup with Global region
The setup wizard auto-resolves this. If it persists, specify a concrete region like
eastus in the location parameter.No pageviews appearing in Siteline
No pageviews appearing in Siteline
Diagnostic logs are batched hourly — wait up to 60 minutes after initial setup. If pageviews still don’t appear, check the
dlq blob container for failed events.How do I change configuration after setup?
How do I change configuration after setup?
Edit parameters directly in
infra/main.bicepparam and rerun npm run setup. The Bicep deployment is idempotent and will update resources in place.