AI Agents (Abilities API and MCP)
The Pixel Manager can be fully operated by an AI agent. Everything you can do in the Pixel Manager admin, an agent such as Claude, Cursor or VS Code Copilot can do too: set up pixels, connect your Google and Meta accounts, check the setup, read diagnostics and logs, restore backups, and manage SweetCode Cloud.
Version 1.57.0 of the Pixel Manager. Since version 1.70.0 every admin action is available as an ability. The abilities are included in both the free and the Pro version.
The Pixel Manager registers its actions as abilities with the WordPress Abilities API. The WordPress MCP Adapter plugin makes them available to AI clients. To connect your AI client, follow the setup in AI Agents and MCP. This page explains what the agent can do with the Pixel Manager once it is connected.
How It Works
- The agent has exactly your permissions. Every ability uses the same permission check as the Pixel Manager admin: the agent's WordPress user needs the
manage_woocommerceormanage_optionscapability. Shop managers can do everything administrators can do in the Pixel Manager, through an agent too. - Same validation as the admin. IDs and tokens are checked with the same format rules as the settings screen. An invalid value is refused with the reason, and nothing is written for it.
- Every save is backed up. Each settings change creates an automatic backup, the same backups you see on the Support page. Ask the agent to undo a change and it restores the backup taken before it.
- Secrets stay secret. API tokens and keys are never returned. The agent only sees whether a secret is set.
- Pro settings need a Pro license. All settings are listed, but on a site without an active Pro license the Pro settings are marked as not writable and refused.
- The user stays in charge of logins. Connecting a Google or Meta account needs you to sign in. The agent gives you the link, you sign in in your browser, and the agent continues afterwards.
All abilities start with pmw/ and belong to the category pmw-tracking.
Getting Started
Once your AI client is connected, simply ask in plain language. A good first question:
Check my Pixel Manager setup and tell me what's missing.
The agent then calls pmw/get-setup-status, which returns which pixels are active, which required settings are missing, which advanced features are available but not yet enabled, and a prioritized recommendation for the next step.
More examples of what you can ask:
- "Set up Google Ads conversion tracking. Use my existing purchase conversion action."
- "Add my TikTok pixel ID C1234567890 and turn on Advanced Matching."
- "Which settings did you change in the last hour? Undo them."
- "Show me the tracking accuracy per payment gateway for the last 30 days."
- "SweetCode Cloud shows failing destinations. What's wrong?"
- "Read the Pixel Manager logs and tell me why the Meta Conversions API fails."
- "Which optimization opportunities do I still have?"
- "Create a debug report for SweetCode support."
Available Abilities
Setup and Settings
| Ability | What it does |
|---|---|
pmw/get-setup-status | Setup checklist: active pixels, missing required settings, available advanced features and recommended next steps. The best starting point for a guided setup. |
pmw/get-tracking-status | Which pixels are active, their category (marketing, statistics, optimization) and whether they track in the browser, server-side or both. |
pmw/get-settings-schema | Catalog of every setting: dot-notation path, type, default, where to find the value, whether it is required, advanced, Pro or secret. |
pmw/get-settings | Current value of every setting. Secrets are shown only as set or not set. |
pmw/update-settings | Changes one or more settings by path, for example {"google.ads.conversion_id": "123456789"}. Reports per setting whether it was updated, unchanged, invalid, unknown or forbidden. |
pmw/configure-pixel | Sets up one pixel in a single call, for example google_ads with conversion_id and conversion_label, and returns that pixel's setup status. |
pmw/get-plugin-info | Plugin version, free or Pro, distribution channel and environment compatibility. |
Backups, Import and Export
| Ability | What it does |
|---|---|
pmw/list-settings-backups | Lists the automatic settings backups, newest first. |
pmw/get-settings-backup | Shows the settings stored in one backup, to compare before restoring. |
pmw/export-settings | The complete settings tree, like the export on the Support page. Secrets are removed. |
pmw/restore-settings-backup | Restores a backup, like the Restore button on the Support page. |
pmw/import-settings | Replaces all settings with a settings file you provided. |
Account Connections
The Google and Meta connections use the SweetCode connection service, the same way as the setup wizards in the admin.
| Ability | What it does |
|---|---|
pmw/get-google-connection-status | Whether a Google account is connected and which permissions (GA4, Google Ads, Data Manager) are granted. |
pmw/start-google-connection | Returns the Google sign-in link for you to open. |
pmw/disconnect-google | Disconnects the Google account. Browser tracking keeps running. |
pmw/list-google-ads-accounts | Lists the Google Ads accounts you can access. |
pmw/list-google-ads-conversion-actions | Lists the conversion actions of a Google Ads account. |
pmw/connect-google-ads-conversion | Sets up Google Ads conversion tracking with an existing or a new conversion action, like the last step of the Google Ads wizard. |
pmw/get-google-data-manager-permission | Whether the Data Manager permission for server-side conversion uploads is granted. |
pmw/list-ga4-accounts | Lists your Google Analytics accounts and GA4 properties. |
pmw/create-ga4-property | Creates a GA4 property with the shop's time zone and currency. |
pmw/list-ga4-streams | Lists the web data streams of a GA4 property. |
pmw/connect-ga4-stream | Sets up GA4 tracking with an existing or a new web data stream. |
pmw/get-meta-connection-status | Whether a Meta business account is connected. |
pmw/start-meta-connection | Returns the Facebook Login for Business link for you to open. |
pmw/disconnect-meta | Disconnects the Meta business account. The pixel ID stays. |
pmw/list-meta-pixels | Lists the Meta pixels (datasets) of the connected business account. |
pmw/connect-meta-pixel | Verifies a pixel with Meta and saves it, like the last step of the Meta wizard. |
SweetCode Cloud
| Ability | What it does |
|---|---|
pmw/get-ssp-status | Connection state, proxy hostname, last sync, plan, usage, quota and failing destinations. |
pmw/get-ssp-diagnostics | The SweetCode Cloud diagnostic report for support. |
pmw/test-ssp-connection | Checks whether the proxy hostname is reachable from your server. |
pmw/connect-ssp | Connects the shop with the sync token from the SweetCode Cloud portal. |
pmw/sync-ssp-config | Pushes the current tracking configuration to SweetCode Cloud. |
pmw/set-ssp-enabled | Turns routing through SweetCode Cloud on or off, keeping the connection. |
pmw/update-ssp-setting | Sets what happens to server-side events while SweetCode Cloud is unreachable. |
pmw/disconnect-ssp | Disconnects the shop from SweetCode Cloud. |
Diagnostics and Logs
| Ability | What it does |
|---|---|
pmw/get-debug-info | The full debug report from the Support page. |
pmw/get-gateway-accuracy | Daily tracking accuracy per payment gateway, the data behind the Diagnostics chart. |
pmw/get-first-event-status | Whether the storefront confirmed that the pixels load and whether the first order was tracked. |
pmw/get-logs | The Pixel Manager log files, newest entries first. Logs fill only while the logger is on. |
pmw/get-google-data-manager-status | State and last result of the Google Ads Data Manager conversion upload. |
pmw/get-google-data-manager-diagnostics | Data Manager identifier coverage and recent orders, with a report for support. |
pmw/test-google-data-manager-upload | Sends the latest order as a validate-only test upload. No conversion is recorded. |
pmw/update-ga4-data-api-credentials | Stores the Google service account key for the GA4 Data API. |
pmw/get-order-attribution | The GA4 attribution (source, medium, campaign) of one order. |
Opportunities, Notices and Lifetime Value
| Ability | What it does |
|---|---|
pmw/list-opportunities | The Opportunities for your shop, sorted by impact. |
pmw/dismiss-opportunity | Hides an opportunity card. |
pmw/restore-opportunity | Shows a dismissed opportunity card again. |
pmw/get-admin-notices | State of the onboarding checklist and other admin notices. |
pmw/acknowledge-notice | Answers an admin notice the way you would in the admin. |
pmw/get-ltv-recalculation-status | Whether a lifetime value recalculation is running (Pro). |
pmw/run-ltv-recalculation | Recalculates the customer lifetime value over the whole order history (Pro). |
pmw/stop-ltv-recalculation | Cancels a running lifetime value recalculation (Pro). |
Each ability describes its inputs and outputs in detail, and the agent reads these descriptions itself. You don't need to know the ability names to use them.
Actions That Need Your Confirmation
Some abilities change things outside the plugin settings or can't be undone. Their descriptions instruct the agent to ask you first, and most MCP clients also ask for your approval before each call. These are:
- Restoring a backup or importing settings, which replaces all settings.
- Disconnecting Google, Meta or SweetCode Cloud. Reconnecting needs you to sign in or enter the sync token again.
- Creating a GA4 property, a GA4 data stream or a Google Ads conversion action, which changes your Google accounts.
- Recalculating the lifetime value, which loads the server for a while on large shops.
Read-Only Mode
To let agents read and diagnose but never change anything, add this filter. The write abilities are then not registered at all:
add_filter( 'pmw_abilities_allow_write', '__return_false' );
Related
- AI Agents and MCP: connecting Claude, Cursor, VS Code and other clients
- Settings Reference: every setting by the name shown in the plugin
- PHP Filters