Tag Manager: Install tracking
gtm_install_trackingInstall tracking on ANY website through its Google Tag Manager container: the Analytics tag (ga4_id), and Google Ads conversions for a form lead (ads_id + conversion_label + the thank-you page path) and for a tap on the phone number (ads_id + phone_click_label). With an Ads conversion it also adds the Conversion Linker; Tag Manager itself adds its Google tag for the Ads account ("Google Ads AW-…") when the conversion tag is created, and the preview says so. The result lists what the workspace holds afterwards (in_workspace). IDs only — never code. Skips what the container already has. Previews unless confirm is true; the tags reach the live site only when publish is true as well. 🔴 The container's own GTM-… snippet must already be on the site (site_check shows whether it is); this tool cannot put it there.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ads_id | No | Google Ads conversion id, AW-… or digits, from ads_list_conversion_actions | |
| ga4_id | No | Analytics measurement id, G-… | |
| confirm | No | Leave false to preview: nothing changes and the preview shows exactly what would happen. Set true only after the user has agreed to this exact change. | |
| publish | No | Create a version and publish it, so the tags go live. Only when the person has said to make it live. | |
| container | Yes | GTM-… public id or container id from gtm_list_containers | |
| conversion_path | No | Thank-you page path the form lands on, e.g. /thank-you/ | |
| conversion_label | No | Conversion label for the form lead (WEBPAGE conversion action) | |
| phone_click_label | No | Conversion label for the phone tap (WEBPAGE conversion action named e.g. Phone click) |