---
title: "Get Google Ads tracking script"
method: GET
path: "/api/apps/{app_id}/google-ads/tracking-script"
---

# Get Google Ads tracking script

`GET /api/apps/{app_id}/google-ads/tracking-script`

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

Returns the gtag snippet that reports the app's conversions to Google Ads.

The snippet loads Google's tag, sets consent to denied for every purpose until the app grants it, captures the click ID from the landing URL into a first-party cookie once ad storage is granted, and reports a page view on each in-app route change. It carries the conversion ID of the first goal on the account whose tag Google has published, which covers every goal on that account.

Place the snippet once in the app's HTML rather than per page. Firing an individual conversion is separate. The app calls `gtag('event', 'conversion', ...)` at the moment the conversion happens, or you report it from the server with [Upload Google Ads conversions](/api-reference/upload-google-ads-conversions).

<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.

## Response `200`

The snippet to place in the app.

- TrackingScriptResponse — The gtag snippet that reports the app's conversions to Google Ads.
  - `script` string, nullable, required — The gtag snippet, wrapped in a `<script>` tag and ready to place in the app's HTML, or `null` when no goal on the account has a published tag yet. [Build Google Ads tracking fix prompt](/api-reference/build-google-ads-tracking-fix-prompt) creates the goals, and Google takes a few minutes to publish each tag, so a `null` straight after setup means you should read this again shortly.

## 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.

## Changes

- **2026-09-02** `6ad855bf424f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/google-ads/tracking-script/get.md)

---

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