cloudflare · Cloudflare Workers Docs
Workers Write to Analytics Engine
A guide for implementing custom event tracking by configuring Wrangler bindings, structuring data points with blobs and doubles, and querying results via the SQL API.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Write to Analytics Engine
A guide for implementing custom event tracking by configuring Wrangler bindings, structuring data points with blobs and doubles, and querying results via the SQL API.
When To Use
Use when you need to implement high-cardinality time-series event tracking, such as building usage-based billing or monitoring per-customer service health within a Cloudflare Worker.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-examples-analytics-engine-write-to-workflow-guide.md | A markdown guide demonstrating how to configure bindings and write custom data points to the Cloudflare Workers Analytics Engine. | Questions about a markdown guide demonstrating how to configure bindings and write custom data points to the Cloudflare Workers Analy... |
examples/workers-examples-analytics-engine-write-to-cloudflare-workers-analytics-.text | A text-based example demonstrating how to write data to a Cloudflare Analytics Engine dataset from a Worker. | Exact payloads, commands, or snippets shown in A text-based example demonstrating how to write data to a Cloudflare Analytics Engine dataset from a Worker. |
examples/workers-examples-analytics-engine-write-to-cloudflare-workers-analytics--2.text | A configuration snippet showing how to define an analytics engine binding and dataset within a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A configuration snippet showing how to define an analytics engine binding and dataset within a Cloudflare Workers env... |
examples/workers-examples-analytics-engine-write-to-cloudflare-workers-analytics--3.text | A JavaScript example demonstrating how to use the writeDataPoint method within a Cloudflare Worker to send custom events to the Analytics Engine. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to use the writeDataPoint method within a Cloudflare Worker to send custom eve... |
examples/workers-examples-analytics-engine-write-to-cloudflare-workers-analytics--4.text | A TypeScript example demonstrating how to use the Analytics Engine dataset to write data points within a Cloudflare Worker fetch handler. | Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to use the Analytics Engine dataset to write data points within a Cloudflare W... |
examples/workers-examples-analytics-engine-write-to-cloudflare-workers-analytics--5.text | A curl command demonstrating how to query the Cloudflare Analytics Engine using SQL via the API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to query the Cloudflare Analytics Engine using SQL via the API. |
What This Skill Covers
- Write custom analytics events to Workers Analytics Engine.
- Main sections:
Configure the binding,Write data points,Data point structure,Query your data,Related resources.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/examples/analytics-engine
