Distribution types
Every distribution has a type. It describes the shape of what you publish, and it gates analytics: which conversion goals can exist, whether a funnel can include the distribution, and how strictly personal data is handled.
The values are site, page, embed_script, embed_iframe and data. Omitted, the type is site.
On create and update the JSON field is content_kind. Ask an agent for the type; send content_kind when you call the API.
Type is independent of template (static-site, embed-script, strict-security) and of distribution_type (currently always static). A template chooses headers and cache defaults. It does not set the type — an embed-script template still defaults to type site unless you set embed_script yourself.
The types
| Type | Use for |
|---|---|
site | A multi-page HTML site. Default. |
page | A single HTML page. |
embed_script | A script visitors load on someone else's hostname. |
embed_iframe | An iframe visitors load on someone else's hostname. |
data | Machine-consumed files (JSON, feeds). No human session. |
Goals
An incompatible goal is rejected instead of sitting empty.
| Goal | site | page | embed_script | embed_iframe | data |
|---|---|---|---|---|---|
pageview | yes | yes | no | no | no |
custom_event | yes | yes | yes | yes | no |
form_submission | yes | yes | yes | yes | no |
outbound_link | yes | yes | allowed | allowed | no |
file_download | yes | yes | allowed | allowed | no |
not_found | yes | yes | allowed | allowed | no |
On an embed, outbound link, download and not-found goals are allowed but are not the default suggestion.
data accepts no goals. Request counts for those distributions stay in the Logs page in the console, or edge_log_list.
Funnels
Any type except data can be a funnel step. A funnel that includes a data member is rejected.
Cross-distribution journeys — an embed followed by a thank-you page on a site — belong in a group. See Build a funnel.
Embeds and personal data
For embed_script and embed_iframe, the visitor is on a third-party host. PII handling is capped at redact; allow is not available for those types.
Embeds also record the host they were loaded from (embed_host) from the request origin.
Set it
Create a static distribution with the slug acme-chat, the embed-script
template, and type embed_script.edge distributions create --slug acme-chat --template embed-script --content-kind embed_scriptcurl -s -X POST https://api.edge.deca-dev.com/v1/distributions \
-H "Authorization: Bearer $EDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slug": "acme-chat",
"distribution_type": "static",
"template": "embed-script",
"content_kind": "embed_script"
}'The agent runs edge_distribution_create. Changing type later is a distribution update that sets config.content_kind.