Overview

EdgeTag ships with dozens of pre-built channels (Meta CAPI, Google Ads, Klaviyo, TikTok, and many more) that cover the destinations most customers need. But sooner or later, you run into something that isn't in the catalog — an in-house analytics tool you want to forward events to, a bespoke identity stitching rule, a per-channel payload tweak, a first-party API endpoint you want to expose on your own domain, or a nightly export to your warehouse.

Playground is for exactly those cases. It lets you write the same kind of code our built-in channels run — on the EdgeTag edge (Cloudflare Workers) and in the browser — without leaving the UI. An AI agent turns natural-language prompts into code, a simulation runtime replays sample events through your code before you deploy, and saves your changes, publishing them instantly to your own EdgeTag infrastructure.

Two options

Playground has two options. Pick based on what you're trying to do.

Destination — build a new integration from scratch. Send events to a third-party API, expose a custom first-party endpoint on your domain, persist data in your own D1 database, and run a cron job. Destination gives you HTTP requests, identity-graph access, infrastructure bindings, and scheduled tasks.

Destinationchevron-right

Transformation — reshape the events already flowing through your existing channels. Drop events you don't want to forward, enrich payloads with extra fields, rename events conditionally, or fan out additional events. Transformations run as a plugin before every channel and are pure event transforms — no HTTP, no storage.

Transformationchevron-right
circle-info

Rule of thumb: if you're creating a new endpoint or integration, use a Destination. If you're modifying events going to existing channels, use a Transformation.

What you can build

A few things customers have built with Playground:

  • A custom pixel for an in-house attribution tool

  • A warehouse webhook that mirrors every Purchase into BigQuery via a forwarding service

  • Cross-domain ID stitching that reads a cookie on one domain and writes it on another

  • A SHA-256 PII hashing policy is applied uniformly across every outgoing event

  • Dropping PageView events from going to paid-media channels, while keeping them in analytics

  • Conditional event fan-out (e.g., emit Purchase_Facebook when the user's last paid-media click was on Facebook)

  • A first-party /api/subscribe endpoint backed by D1

  • A nightly export that dumps yesterday's events to R2 as CSV

How it works

Playground is a chat-based code environment. The typical flow:

1

Describe what you want

Tell the agent in plain English what the integration should do. It generates the code for the relevant files and explains the choices it made.

2

Edit in the code editor

Every file is editable directly; the agent's output is a starting point, not a lock-in.

3

Simulate

Pick a sample event (Purchase, PageView, AddToCart) and run your code in an isolated sandbox. Every HTTP request, log line, and return value is captured so you can verify the behavior before anything reaches production.

4

Save

Once you're happy, saving deploys your code to your EdgeTag edge. There is no separate publish step.

Playground chat, code editor, and simulation output

Last updated

Was this helpful?