get_tracking_snippet
Generate the gtag.js HTML tracking snippet to add Google Analytics 4 tracking to your website. Paste the output directly into your site's HTML.
Instructions
Generate the gtag.js HTML tracking snippet ready to paste into your website.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"measurement_id": "<measurement_id>"
},
"name": "get_tracking_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| measurement_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |