Skip to main content

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.

Available Since

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_woocommerce or manage_options capability. 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​

AbilityWhat it does
pmw/get-setup-statusSetup checklist: active pixels, missing required settings, available advanced features and recommended next steps. The best starting point for a guided setup.
pmw/get-tracking-statusWhich pixels are active, their category (marketing, statistics, optimization) and whether they track in the browser, server-side or both.
pmw/get-settings-schemaCatalog of every setting: dot-notation path, type, default, where to find the value, whether it is required, advanced, Pro or secret.
pmw/get-settingsCurrent value of every setting. Secrets are shown only as set or not set.
pmw/update-settingsChanges 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-pixelSets 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-infoPlugin version, free or Pro, distribution channel and environment compatibility.

Backups, Import and Export​

AbilityWhat it does
pmw/list-settings-backupsLists the automatic settings backups, newest first.
pmw/get-settings-backupShows the settings stored in one backup, to compare before restoring.
pmw/export-settingsThe complete settings tree, like the export on the Support page. Secrets are removed.
pmw/restore-settings-backupRestores a backup, like the Restore button on the Support page.
pmw/import-settingsReplaces 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.

AbilityWhat it does
pmw/get-google-connection-statusWhether a Google account is connected and which permissions (GA4, Google Ads, Data Manager) are granted.
pmw/start-google-connectionReturns the Google sign-in link for you to open.
pmw/disconnect-googleDisconnects the Google account. Browser tracking keeps running.
pmw/list-google-ads-accountsLists the Google Ads accounts you can access.
pmw/list-google-ads-conversion-actionsLists the conversion actions of a Google Ads account.
pmw/connect-google-ads-conversionSets 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-permissionWhether the Data Manager permission for server-side conversion uploads is granted.
pmw/list-ga4-accountsLists your Google Analytics accounts and GA4 properties.
pmw/create-ga4-propertyCreates a GA4 property with the shop's time zone and currency.
pmw/list-ga4-streamsLists the web data streams of a GA4 property.
pmw/connect-ga4-streamSets up GA4 tracking with an existing or a new web data stream.
pmw/get-meta-connection-statusWhether a Meta business account is connected.
pmw/start-meta-connectionReturns the Facebook Login for Business link for you to open.
pmw/disconnect-metaDisconnects the Meta business account. The pixel ID stays.
pmw/list-meta-pixelsLists the Meta pixels (datasets) of the connected business account.
pmw/connect-meta-pixelVerifies a pixel with Meta and saves it, like the last step of the Meta wizard.

SweetCode Cloud​

AbilityWhat it does
pmw/get-ssp-statusConnection state, proxy hostname, last sync, plan, usage, quota and failing destinations.
pmw/get-ssp-diagnosticsThe SweetCode Cloud diagnostic report for support.
pmw/test-ssp-connectionChecks whether the proxy hostname is reachable from your server.
pmw/connect-sspConnects the shop with the sync token from the SweetCode Cloud portal.
pmw/sync-ssp-configPushes the current tracking configuration to SweetCode Cloud.
pmw/set-ssp-enabledTurns routing through SweetCode Cloud on or off, keeping the connection.
pmw/update-ssp-settingSets what happens to server-side events while SweetCode Cloud is unreachable.
pmw/disconnect-sspDisconnects the shop from SweetCode Cloud.

Diagnostics and Logs​

AbilityWhat it does
pmw/get-debug-infoThe full debug report from the Support page.
pmw/get-gateway-accuracyDaily tracking accuracy per payment gateway, the data behind the Diagnostics chart.
pmw/get-first-event-statusWhether the storefront confirmed that the pixels load and whether the first order was tracked.
pmw/get-logsThe Pixel Manager log files, newest entries first. Logs fill only while the logger is on.
pmw/get-google-data-manager-statusState and last result of the Google Ads Data Manager conversion upload.
pmw/get-google-data-manager-diagnosticsData Manager identifier coverage and recent orders, with a report for support.
pmw/test-google-data-manager-uploadSends the latest order as a validate-only test upload. No conversion is recorded.
pmw/update-ga4-data-api-credentialsStores the Google service account key for the GA4 Data API.
pmw/get-order-attributionThe GA4 attribution (source, medium, campaign) of one order.

Opportunities, Notices and Lifetime Value​

AbilityWhat it does
pmw/list-opportunitiesThe Opportunities for your shop, sorted by impact.
pmw/dismiss-opportunityHides an opportunity card.
pmw/restore-opportunityShows a dismissed opportunity card again.
pmw/get-admin-noticesState of the onboarding checklist and other admin notices.
pmw/acknowledge-noticeAnswers an admin notice the way you would in the admin.
pmw/get-ltv-recalculation-statusWhether a lifetime value recalculation is running (Pro).
pmw/run-ltv-recalculationRecalculates the customer lifetime value over the whole order history (Pro).
pmw/stop-ltv-recalculationCancels 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' );

Make more money from your ads with high-precision tracking