Set conversion goals
set_goalsSet conversion goals for a landing page. Goals define what counts as a "conversion" — the primary actions you want visitors to take. You can set multiple goals per page.
Conversion rate is calculated from unique visitors who completed at least one configured goal. Each goal is still tracked separately in analytics, and improvement suggestions adapt to goal types.
Examples:
User says "カフェの予約ページを作って" → goals: [{ goalType: "cta_click", label: "予約サイトへ" }]
User says "資料請求と LINE 登録ができるページ" → goals: [ { goalType: "form_submission", label: "資料請求フォーム" }, { goalType: "cta_click", label: "LINE登録" } ]
IMPORTANT: Always call this after create_site when the page purpose is clear. If the user mentions forms, inquiries, signups → include form_submission goal. If the user mentions external links, bookings, LINE, phone, EC store → include cta_click goal. Calling this replaces all existing goals for the page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goals | Yes | List of conversion goals (1-5) | |
| siteId | Yes | The ID of the page to set goals for |