Docs

Update an analytics connection

Rename a connection or validate replacement custom credentials. Only team owners can update connections. Existing settings remain unchanged if validation fails.

PATCH
/projects/{projectId}/analytics/connections/{connectionId}

Authorization

Authorization
header
string
required

Enter the team access token with the Bearer prefix, e.g. "Bearer team_access_token"

Path Parameters

projectId
string
required

The owning Chunkify project ID.

connectionId
string
required

The saved analytics connection ID.

Bodyapplication/json

Analytics connection settings.

allowed_origins
string[]

AllowedOrigins lists additional website origins permitted to ingest events for a hosted connection. Shared installation origins remain allowed. An empty list clears project-specific origins. Custom servers manage origins on their own infrastructure.

default_for_dashboard
boolean

DefaultForDashboard selects this ready connection for Chunkify dashboard players, public previews, the playground and newly generated snippets. Requires a public ingest key. Setting true replaces the previous default atomically. Setting false disables dashboard tracking if no default remains; another connection is not selected automatically. Existing external players keep their own configuration.

endpoint
string

Endpoint specifies a replacement custom server base URL. Supply read_key together with it.

name
string

Name identifies this connection in the dashboard.

public_ingest_key
string

PublicIngestKey optionally enables preview tracking for a custom connection. Supply the public ingestion key for the same analytics project as read_key. It is returned in connection reads and used in browser code. Omit for hosted connections. An empty string disables preview tracking. A replacement endpoint clears the saved public key unless a replacement is supplied.

Pattern:
^(ck_public_[a-f0-9]{64})?$
read_key
string

ReadKey replaces the custom connection credential after validation. Its value is never returned.

Responses

application/json
data
object
required
status
"success"
string
required

Success.