Update a custom metric on your GA4 property
google-analytics.x.analyticsadmin-properties-custommetrics-patchcustomMetrics.patch — Updates a CustomMetric on a property.
- Preço
- freePelo preço de tabela
- Taxa de sucesso
- —Ainda não há dados da taxa de sucessoÚltimos 30 dias · 0 chamadas
- Latência p50
- ——
- Última verificação
- —Ainda não verificado
PATCHhttps://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-custommetrics-patchBeta- Usa a cota da plataforma
- Resposta síncrona
- Lê dados públicos
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de caminho | ||||
name | string | Obrigatório | Identifier. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric} | |
| Parâmetros de consulta | ||||
updateMask | string | Opcional | Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. | |
- Parâmetros de caminho
namestringObrigatórioIdentifier. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}
- Parâmetros de consulta
updateMaskstringOpcionalRequired. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
Beta
curl -X PATCH 'https://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-custommetrics-patch' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"PATCH",
"https://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-custommetrics-patch",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/google-analytics.x.analyticsadmin-properties-custommetrics-patch", {
method: "PATCH",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Esta API de gateway está em Beta; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a free, incluindo a taxa de serviço.