Get Snippet
GET /repos/{repo_id}/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
repo_id
required
Repository ID
string
Repository ID
Query Parameters
Header Parameters
Responses
200
Successful Response
object
data
required
object
config
Full configuration object for gtm/config.json
object
key
additional properties
any
domains
Array<string>
react_snippet
required
Ready-to-use React component import for @graph8/nextjs
string
script_tag
required
Vanilla JS script tag for non-React apps
string
tracking_host
string
write_key
required
string
pagination
Any of:
null
422
Validation Error
object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string