Onboard a new site end to end
site_onboardSet up a new site in Google Analytics 4 end to end: create the property and web stream, add gtag tracking, define key events, and verify data flow. Re-running resumes safely without duplicates.
Instructions
Full flow for a new site: create GA4 property, create web stream, generate the site (or tag an existing folder) with gtag, configure key events/custom definitions, and verify data flow. Safe to call again with the same siteName: it resumes and never duplicates the property.
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": {
"siteName": "<siteName>",
"siteUrl": "<siteUrl>"
},
"name": "site_onboard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | Pages to generate. The first page (or slug 'index') becomes index.html. | |
| siteUrl | Yes | Public URL where the site will live. | |
| siteName | Yes | ||
| timeZone | No | America/Lima | |
| accountId | No | ||
| keyEvents | No | Event names to mark as key events (conversions). | |
| outputDir | No | Where to generate the site. Default: /app/sites-output/<slug>. | |
| propertyId | No | Reuse an existing property instead of creating one. | |
| description | No | ||
| currencyCode | No | USD | |
| customMetrics | No | ||
| sendTestEvent | No | Send a Measurement Protocol test event to confirm GA receives data. | |
| existingSiteDir | No | Tag this existing folder instead of generating a site. | |
| customDimensions | No | ||
| industryCategory | No |