WordPress: Install tracking
wp_install_trackingInstall or remove tracking and verification on a client's WordPress site, by ID. Accepts a GA4 measurement ID (G-…), a Tag Manager container (GTM-…), a Google Ads tag (AW-…), a Search Console verification token (the meta tag from site_verification_token, or its content value), one Google Ads conversion (label + the page path it fires on, e.g. /thank-you/), and CALL TRACKING: phone_clicks=on fires a GA4 phone_click event on every tel: tap (plus an Ads conversion via phone_click_label), and call_conversion_label + phone_number installs Google's website-call number swap. The plugin builds every tag itself — this tool takes IDs ONLY and cannot install arbitrary HTML or script, by design. Send an empty string to remove an ID. Checks the live home page for tags already present so nothing is double-installed. Needs an Administrator connection and Bridge 1.2.1+. Previews (showing the exact tags) unless confirm is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | ||
| ads_id | No | e.g. AW-123456789 (from ads_create_conversion_action's tag); "" removes it | |
| ga4_id | No | e.g. G-ABCD123456; "" removes it | |
| gtm_id | No | e.g. GTM-ABC1234; "" removes it | |
| confirm | No | ||
| phone_clicks | No | "on" fires a GA4 phone_click event whenever a tel: link is tapped (needs ga4_id or ads_id) | |
| phone_number | No | The client's lead phone number as shown on the site, e.g. +1 (425) 555-0100 — used for the website-call number swap | |
| conversion_path | No | Page the conversion fires on, e.g. /thank-you/ | |
| conversion_label | No | Google Ads conversion label — needs ads_id and conversion_path | |
| gsc_verification | No | The meta tag from site_verification_token, or its content value; "" removes it | |
| phone_click_label | No | Ads conversion label to ALSO fire on a tel: tap — from ads_create_conversion_action type WEBPAGE (a click) or AD_CALL; needs ads_id | |
| call_conversion_label | No | Ads WEBSITE_CALL conversion label — Google swaps a tracking number in for ad visitors; needs ads_id and phone_number |