---
title: "Build Google Ads tracking fix prompt"
method: POST
path: "/api/apps/{app_id}/google-ads/tracking-scan/build-bootstrap-prompt"
---

# Build Google Ads tracking fix prompt

`POST /api/apps/{app_id}/google-ads/tracking-scan/build-bootstrap-prompt`

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates the app's Google Ads conversion goals if it does not have them, then returns an instruction that tells the AI how to install conversion tracking in the app.

Send the returned `composer_prompt` to [Send chat message](/api-reference/send-chat-message) and the AI does the wiring for you. Publish the app afterwards, because Google Ads only records conversions from the published app. Pair it with [Scan Google Ads conversion tracking](/api-reference/scan-google-ads-conversion-tracking) to see what needs fixing first.

This call changes the Google Ads account. Any goal missing from the standard set is created on it, covering `PURCHASE`, `ADD_TO_CART`, `BEGIN_CHECKOUT`, `SIGNUP`, `SUBMIT_LEAD_FORM`, `CONTACT`, `REQUEST_QUOTE`, `BOOK_APPOINTMENT`, `SUBSCRIBE_PAID`, and `PHONE_CALL_LEAD`. Creating a goal is not reversible through this API. Read [List Google Ads conversion actions](/api-reference/list-google-ads-conversion-actions) first if you want to know what the account already has.

Send `wire_events` as `true` to get a prompt that also wires each of the account's enabled [conversion mappings](/api-reference/list-google-ads-conversion-mappings), instead of only installing the base tag. On an account that has enabled mappings, that path waits for Google to publish the tag for each mapped goal and retries the read up to four times about a second apart, so the request can take several seconds.

<Note>Only `wire_events` is supported in the body. The builder UI sends a snapshot of the app's source alongside it, which is internal and not part of this API.</Note>

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>

## Path parameters

- `app_id` string, required — ID of the app whose Google Ads conversion tracking you want to manage.

## Request body

- object
  - `wire_events` boolean — Whether the prompt should also wire the account's enabled conversion mappings (`true`) or only install the base tag (`false`).

## Response `200`

The prompt to send to the AI.

- TrackingFixPromptResponse — A ready-made instruction for the AI to install conversion tracking.
  - `composer_prompt` string, required — The instruction to send to [Send chat message](/api-reference/send-chat-message). It ends with a reminder to publish, because Google Ads only records conversions from the published app. The value is an empty string when `skipped_reason` is set.
  - `conversion_id` string, nullable — The gtag conversion ID baked into the prompt, or an empty string when the prompt tells the AI to look each one up instead of carrying a concrete ID. Absent when `skipped_reason` is set.
  - `actions_created_or_existing` integer, nullable — How many conversion goals the account has after this call, counting the ones it already had. Absent when `skipped_reason` is set.
  - `wired_mappings` integer, nullable — How many of the account's conversion mappings the prompt carries wiring guidance for. When you send `wire_events` and the account has no enabled mapping, this reports the number of conversion categories the prompt offers instead, so read any value above `0` as a sign that the prompt carries wiring guidance rather than as a mapping count. Absent when `skipped_reason` is set.
  - `skipped_reason` string, nullable — Why no prompt was produced. The only value is `no_google_ads_account`, which means the app has no Google Ads account that can carry conversion tracking. The field is absent whenever a prompt was produced.

## Other responses

- `401` — Missing or invalid credentials.
- `403` — You don't have access to this app, the app does not exist, or you used a workspace API key. A missing app and an app you cannot reach are deliberately the same answer.
- `422` — Validation Error

---

[API](https://skmtc.dev/base44/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/base44/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/base44/base44-app-management-api/revisions/173e4e9c63c2/schema)
