Update a script

patch
https://api.clakta.com/v1/projects/{idOrSlug}/scripts/{sourceId}

Update a tracking script. Requires an API key with `projects.write`. Send only the fields you want to change. Sending `domains: []` allows events from any domain.

Autenticação

Envie sua chave de API como bearer token no cabeçalho Authorization.

Veja Autenticação para saber como criar uma chave de API e definir seus escopos.

Parâmetros de rota

idOrSlugstringobrigatório

The project ID (with the proj_ prefix) or slug.

sourceIdstringobrigatório

The script ID returned on creation.

Corpoapplication/json

namestringopcional
domainsstring[]opcional
trackPageViewsbooleanopcional
trackClicksbooleanopcional
trackScrollsbooleanopcional
trackFormSubmissionsbooleanopcional

Resposta

The updated script

idstringobrigatório

The script's data-clakta-id.

namestringobrigatório
domainsstring[]obrigatório
typeenum<string>obrigatório

Valores aceitos:webiosandroid

trackPageViewsbooleanobrigatório
trackClicksbooleanobrigatório
trackScrollsbooleanobrigatório
trackFormSubmissionsbooleanobrigatório
lastEventAtdate-time | nullobrigatório
createdAtdate-timeobrigatório
updatedAtdate-timeobrigatório