Rivier/ Reference/ analytics

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

  • namestringrequired
    At most 80 characters.
  • hostslist of stringrequired
  • pageKindslist of object
    Default: [].
    • matchstringrequired
      At most 200 characters.
    • kindstringrequired
      One of: home, product, article, pricing, checkout, contact, support, account, other.
  • eventslist of string
    Default: [].
  • stepslist of object
    Default: [].
    • pagestring
      At most 200 characters.
    • eventstring
      Pattern: ^[a-z][a-z0-9_]{0,39}$.
  • ownerModestring
    One of: M0, M1, M2.
  • signalBehaviourstring
    One of: totals_only, nothing.

Responses

  • 201application/json
    Success
    • 400application/json
      The request was malformed
      • errorstringrequired
      • messagestring
    • 401application/json
      No valid credential
      • errorstringrequired
      • messagestring
    • 403application/json
      The credential lacks the scope, origin or address
      • errorstringrequired
      • messagestring
    • 429application/json
      Over the key's rate limit; see Retry-After
      • errorstringrequired
      • messagestring

    This page as Markdown