Add an external site
post/analytics/external/sites
Add an external site: its name, hostnames, page kinds, named events and up to four steps. The answer holds its publishable key, which is safe to put in a page.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
analytics:write- Graphql
Mutation.analyticsExternalSiteCreate- Sdk
analytics.externalSite.create- Cli
analytics external site create
Request bodyapplication/json, required
- namestringrequiredAt most 80 characters.
- hostslist of stringrequired
- pageKindslist of objectDefault: [].
- matchstringrequiredAt most 200 characters.
- kindstringrequiredOne of: home, product, article, pricing, checkout, contact, support, account, other.
- matchstringrequired
- eventslist of stringDefault: [].
- stepslist of objectDefault: [].
- pagestringAt most 200 characters.
- eventstringPattern: ^[a-z][a-z0-9_]{0,39}$.
- pagestring
- ownerModestringOne of: M0, M1, M2.
- signalBehaviourstringOne of: totals_only, nothing.
Responses
- 201application/jsonSuccess
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring