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.

Autenticación

Envía tu clave de API como bearer token en la cabecera Authorization.

Consulta Autenticación para saber cómo crear una clave de API y definir sus permisos.

Parámetros de ruta

idOrSlugstringobligatorio

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

sourceIdstringobligatorio

The script ID returned on creation.

Cuerpoapplication/json

namestringopcional
domainsstring[]opcional
trackPageViewsbooleanopcional
trackClicksbooleanopcional
trackScrollsbooleanopcional
trackFormSubmissionsbooleanopcional

Respuesta

The updated script

idstringobligatorio

The script's data-clakta-id.

namestringobligatorio
domainsstring[]obligatorio
typeenum<string>obligatorio

Valores admitidos:webiosandroid

trackPageViewsbooleanobligatorio
trackClicksbooleanobligatorio
trackScrollsbooleanobligatorio
trackFormSubmissionsbooleanobligatorio
lastEventAtdate-time | nullobligatorio
createdAtdate-timeobligatorio
updatedAtdate-timeobligatorio