AddSynapse: draft a measurement code (Analytics, Pixel…)
plan_tracking_codeAddSynapse: Prepare a DRAFT that adds, changes or removes a measurement code on every public page. Give ONLY the provider and the ID the user gave you (for example {"provider": "ga4", "id": "G-ABC123XYZ9"}): never write, paste or ask for tracking code — the site builds the provider's official code itself. Providers: ga4 (Google Analytics 4, G-…), gtm (Google Tag Manager, GTM-…), google_ads (Google Ads, AW-…), meta (Meta / Facebook Pixel, digits), clarity (Microsoft Clarity project id), tiktok (TikTok Pixel id). Any other provider is not supported yet. Cookie consent: with a cookie banner plugin the code follows the visitor's choice (Google Consent Mode v2 starts «denied»); without one the draft says so — tell the user. Read the warnings: another plugin or the theme may already add the same code (visits counted twice) — tell the user before they approve. Changes nothing by itself: nothing changes until the user presses Approve on the draft card; Undo removes it exactly. Before calling it, say in plain words what will change and get the user's agreement.
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": {
"codes": "<codes>"
},
"name": "plan_tracking_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Which connected site: its address or site_id from addsynapse_list_sites. Omit when the account has only one site. | |
| codes | Yes | one entry per provider |