Build Google Ads tracking fix prompt
Changed on<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 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 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 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, 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.
If you write the app's code yourself instead of through the chat, read tracking_snippet and conversions rather than parsing the prompt. Install tracking_snippet once, then fire each entry's send_to where its action succeeds, and publish.
<Note>The conversion ID belongs to the app's Google Ads account, and only a launch creates that account. Before the first launch this call returns skipped_reason set to no_google_ads_account and a next_step. Launch first. Campaigns launched before tracking is verified start paused. Then call this again, install the snippet and the conversion calls, and publish. The campaigns resume on their own once the published app carries one of the returned send_to values.</Note>
<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>
Request
- Base URLhttps://app.base44.com
- URLhttps://app.base44.com/api/apps/{app_id}/google-ads/tracking-scan/build-bootstrap-prompt
- AuthHTTP bearer
Path parameters
ID of the app whose Google Ads conversion tracking you want to manage.
Request body
Example request
{
"wire_events": true
}Response
The prompt to send to the AI.
Example response
{
"composer_prompt": "Wire up Google Ads conversion tracking for this app.\n\nCall get_capability_guide(\"google_ads\") first, then follow it.",
"conversion_id": "AW-123456789",
"actions_created_or_existing": 10,
"wired_mappings": 3,
"skipped_reason": "no_google_ads_account",
"next_step": "Create the Google Ads account first with POST /accounts/ensure-for-tracking (no campaign, nothing charged), then call this again.",
"tracking_snippet": "if (typeof document !== 'undefined' && !window.__gads_loaded) {\n window.__gads_loaded = true;\n ...\n window.gtag('config', 'AW-123456789', { send_page_view: false });\n}",
"conversions": [
{
"mapping_id": "68b1c0d4e7b91d003c45a1f7",
"conversion_type": "PURCHASE",
"entity_name": "Order",
"trigger_action": "create",
"send_to": "AW-123456789/AbCdEfGhIj",
"example_call": "window.gtag('event', 'conversion', { send_to: 'AW-123456789/AbCdEfGhIj' });"
}
]
}Changes
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info
- info
the endpoint scheme security
PersonalAccessTokenAuthwas added to the API
- info