Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

How to Ingest Website Analytics into Cloudflare’s Data Platform

Cloudflare-observed traffic, custom Worker metrics, and durable clickstream storage use different products. Here’s how to choose and configure the right route.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the route based on what you want to collect and where it needs to go: use Cloudflare account or zone analytics for traffic Cloudflare already observes, Workers Analytics Engine for custom metrics emitted by a Worker, or Basin Pipelines for a buffered event stream that lands in R2. These are separate products and workflows, not interchangeable ingestion settings.

How do I send website analytics to Cloudflare?

Start with the source and destination. Cloudflare’s account and zone analytics, including the GraphQL Analytics API, expose data Cloudflare collects about requests and its products. They are not a general endpoint for sending arbitrary browser events into a warehouse. For custom events from code running on Cloudflare Workers, use Workers Analytics Engine (WAE). For a durable, transformed event stream with files or tables in object storage, use Basin Pipelines.

What you need Route What it does
Cloudflare-observed traffic and product metrics Account or zone analytics, or GraphQL Analytics API Provides Cloudflare-collected performance, security, reliability, and traffic data; it is not arbitrary event ingestion. Cloudflare Analytics overview.
Custom metrics emitted by Worker code Workers Analytics Engine Writes data points from a Worker and supports SQL queries; high-volume data may be sampled. WAE quickstart.
Buffered clickstream events and durable analytical outputs Basin Pipelines Accepts events over HTTP or from a Worker, applies SQL transformations, and writes to R2 as Iceberg tables or Parquet/JSON files. Basin Pipelines documentation.

The route matters because the data models differ: Cloudflare-collected analytics are not the same as events your application chooses to emit, and a Worker analytics dataset is not itself a durable object-storage pipeline.

How to send custom Worker metrics to Workers Analytics Engine

WAE is intended for custom analytics written by Worker code. The setup consists of a Wrangler binding, an explicit data-point schema, and SQL queries against the resulting dataset.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Define a dataset binding in Wrangler

Add an analytics_engine_datasets binding to your Wrangler configuration, specifying a binding name for use in code and a dataset name. The dataset is created automatically on the first write after the binding is defined; there is no need to create it manually in the dashboard. See Cloudflare’s WAE quickstart for the configuration format.

2. Write points with a stable field order

From the Worker, call env.<BINDING>.writeDataPoint(). Its arrays have distinct roles: blobs hold string dimensions, doubles hold numeric values, and indexes holds one string sampling key. Keep the order of fields consistent across writes so later SQL queries interpret each position correctly.

Cloudflare’s example records request path and response status as blobs, request duration as a double, and hostname as the index. Treat this as an example schema, not a requirement for every site. Choose dimensions based on the questions you intend to answer, and avoid casually writing personal or sensitive identifiers into analytics fields.

The current quickstart requires one index. Providing multiple indexes causes the point not to be recorded. The write call returns immediately; the Worker runtime handles the write in the background. See the quickstart for current API details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Query the dataset using the WAE SQL API

Send a POST request with SQL in its body to /accounts/<account_id>/analytics_engine/sql, using a bearer token. Cloudflare’s token instructions call for the Account → Account Analytics → Read permission. The API also supports a FORMAT query option to select the response format. Endpoint and request details are in the Workers Analytics Engine SQL API documentation.

4. Account for sampling in aggregates

WAE may sample high-volume index values on write or read. The SQL API exposes _sample_interval; aggregate calculations may need to use it rather than treating each returned row as one original event. Cloudflare’s examples use SUM(_sample_interval) for a count and weighted formulas for sums and averages. The index is a sampling key, so choose it with your intended grouping and analysis in mind. See the SQL API documentation for the documented formulas.

How do I ingest clickstream data into Cloudflare R2?

Use Basin Pipelines when the goal is to ingest events, buffer them, validate or transform them with SQL, and deliver durable analytical outputs to R2. The documented destinations include Iceberg tables in Basin Catalog and Parquet or JSON files. Cloudflare names clickstream as one of the relevant workloads. The pipeline can receive events through an HTTP endpoint or a Worker binding; see the Basin Pipelines documentation for setup and supported sinks.

As of Cloudflare’s documentation updated October 1, 2026, Basin Pipelines is Generally Available, formerly called Cloudflare Pipelines, and available on Workers Paid plans. Existing resources and configurations continue to work. Older references may still use the former name or describe an earlier availability status.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the current limits and plan details in Cloudflare’s documentation when estimating a deployment. The information cited here does not establish specific quotas, throughput ceilings, latency guarantees, retention periods, or prices.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Should I use Workers Analytics Engine or Cloudflare Pipelines?

Choose WAE when Worker code should emit custom metrics and you want to query them as analytics data. Choose Basin Pipelines when events need a buffered path, SQL processing, and durable R2 outputs. “Cloudflare Pipelines” is the former name readers may encounter; the current product name is Basin Pipelines.

Consideration Workers Analytics Engine Basin Pipelines
Best fit Custom metrics written by a Worker and queried with SQL. Buffered event ingestion, SQL transformation, and durable R2 outputs.
Ingestion Worker binding and writeDataPoint(). HTTP endpoint or Worker binding.
Data handling Ordered blob, numeric, and index fields; high-volume values may be sampled. SQL validation, filtering, transformation, and enrichment are documented pipeline functions.
Output/query emphasis Query the dataset through the WAE SQL API. Deliver Iceberg tables or Parquet/JSON files to R2.
Availability detail See Cloudflare’s current WAE documentation for applicable account details. Cloudflare’s October 1, 2026 documentation says Generally Available on Workers Paid plans.

Do not confuse the two Cloudflare SQL APIs

The Workers Analytics Engine SQL API is hosted at /accounts/<account_id>/analytics_engine/sql. The account Analytics SQL API is a different interface and dialect; WAE datasets appear there under events.analyticsEngine.<DATASET_NAME> and use accountTag scope. Use the interface that matches the query examples and authentication model you intend to follow rather than assuming the two SQL endpoints are interchangeable. See Cloudflare’s WAE SQL API documentation and datasets documentation.

Where Cloudflare’s built-in analytics fit

If the question is about requests Cloudflare already sees—such as traffic, performance, security, or reliability—start with account or zone analytics, or use the GraphQL Analytics API where programmatic access is needed. That data is valuable for measuring Cloudflare-served activity, but it does not replace application instrumentation when you need custom browser events or business-specific fields. The Analytics overview distinguishes account and zone analytics, the GraphQL Analytics API, Analytics Engine, and SQL API.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.