Get Snippet
GET /repos/{repo_id}/snippet
Get the JavaScript tracking snippet for a connected repository.
If the repo already has a write key stored, returns the snippet immediately.
Otherwise, pass stream_id (from GET /streams) to select which stream to use.
The selected write key is stored on the repo for future lookups.
Authorizations
Parameters
Path Parameters
Repository ID
Repository ID
Query Parameters
Header Parameters
Responses
200
Successful Response
object
object
True when the organization has several streams and none could be identified as its main website. The write key is the first stream’s (unchanged legacy default); pick the right one from available_streams and call again with stream_id.
The organization’s streams to choose from. Filled only when action_required is true.
object
Domains associated with this stream
Whether the stream lists allowed domains. False means its public write key is accepted from any website (see warning).
Stream ID used to select this stream
True for the stream GET /snippet uses when no stream_id is given: the only stream, or the one whose domain matches the organization’s website. False on every stream when that choice is ambiguous; pass stream_id explicitly then.
User-friendly stream name (e.g. ‘graph8.com’, ‘heyreach-graph8’)
Full configuration object for gtm/config.json
object
Ready-to-use React component import for @graph8/nextjs
Vanilla JS script tag for non-React apps
object
Whether there are more pages
Items per page
Current page number (1-indexed)
Total number of items
422
Validation Error