Linux 软件免费装
Banner图

CMLS - Customer Match List for Google Ads & Meta Ads

开发者 rwky
更新时间 2026年7月18日 06:21
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce google ads meta ads customer match cmls

下载

1.1.1 1.1.2

详情介绍:

Build Google Ads Customer Match lists from your WooCommerce orders: one CSV file per billing country, updated automatically on a schedule. Each country file is downloadable via a private and secure (tokenized) URL — ideal for marketing teams that run per-country campaigns and want clean, single-market audience lists. The values are hashed with the same SHA-256 normalization used by both Google Ads Customer Match and Meta Ads Custom Audiences, so the same file can also be uploaded manually to Meta Ads Manager (see FAQ). Why this export? Not all purchases are captured by Google Ads tracking; periodic uploads of Customer Match Lists help targeting and campaign performance. Even Google's automatic conversion-based customer lists (auto-enabled for eligible accounts from August 2026) only contain tag-tracked conversions — this plugin exports from the order database itself, so ad-blocked, consent-declined, phone and historical orders are included too (see FAQ). Why per-country files? Marketing teams optimize Google Ads campaigns per country. Mixing a German audience into a Romanian campaign's match list pollutes the targeting. This plugin keeps each market in its own file. How it works
  1. A one-time backfill walks every completed WooCommerce order, splits them by billing country, hashes the customer fields and writes one CSV per country.
  2. A scheduled job (1, 6, 12, or 24 hours) picks up new completed orders since the last run and appends them to the right country file. Orders that turn completed late (delayed payment confirmation, manual completion) are appended the moment they complete, so they are never missed.
  3. Each country file is downloadable from a secret URL that you hand to your marketing team. They can paste it into Google Ads Data Manager → HTTPS connector and Google fetches the latest list on its schedule OR do one-time manual upload.
Features Admin Dashboard Settings WooCommerce → Marketing → Customer Match List. From there you can: WP-CLI

安装:

  1. Upload the plugin folder to wp-content/plugins/customer-match-list-google-ads (or install from the WordPress.org repository).
  2. Activate CMLS - Customer Match List for Google Ads & Meta Ads. WooCommerce must already be active.
  3. Go to WooCommerce → Marketing → Customer Match List.
  4. Pick an update interval (1, 6, 12, or 24 hours).
  5. Run the backfill:
  6. From the admin — pick a date range under "Backfill", click "Start backfill", and watch the progress card. You can close the tab; it keeps running.
  7. From the shellwp cmls backfill --days=540 (or any range that suits you).
  8. After the first backfill finishes, the "Download URLs" table shows one URL per country. Copy each URL and paste it into Google Ads Data Manager → HTTPS connector for the corresponding country's Customer Match list.

升级注意事项:

1.1.1 Naming and documentation release; no functional changes. 1.1.0 Feed URLs changed to end in .csv and hashing normalization was corrected — run "Delete all files & reset dedup", then re-run the backfill.

常见问题:

Why one file per country?

Marketing teams optimize Google Ads campaigns per country. Mixing audiences degrades match-rate signals and wastes budget on irrelevant impressions. Each country file is independent and can be wired into its own Customer Match list. Google's Data Manager pulls each URL on its own schedule, so you can refresh some markets without affecting others.

How do I plug a URL into Google Ads?

In Google Ads → Tools and SettingsAudience ManagerYour data sources, set up a Customer Match audience and choose the HTTPS data source. Paste the country-specific URL from the plugin's admin page. Google Ads fetches the file on its own cadence; our plugin keeps the file fresh per the schedule you picked.

Google says it's turning on "conversion-based customer lists" — do I still need this plugin?

Yes — they complement each other. In 2026 Google began automatically enrolling accounts that use both Enhanced Conversions and Customer Match into conversion-based customer lists (enrollment emails went out from June 2026; data processing starts August 18, 2026). Those lists are built solely from what the Google Ads tag captures on your site from that point on: customers using ad blockers or declining your consent banner never enter them, and neither do phone, imported, or historical orders. This plugin builds Customer Match lists from the WooCommerce order database instead — every completed order, including full order history via backfill, split into one file per country, with a mailing-address fallback when an order has no email or phone. Keep both: attach the automatic conversion-based lists and the per-country lists this plugin feeds, and Google deduplicates matched customers on its side.

Does the file work with Meta (Facebook) Ads?

Yes. Meta Ads Custom Audiences use the same SHA-256 hashing of normalized (trimmed, lowercased) values, so a country CSV can be uploaded to Meta Ads Manager as a customer list — map the columns in Meta's upload screen. Note that Meta does not pull files from URLs; the pull-from-URL workflow is Google-specific, so on Meta use manual upload.

How long does the backfill take?

Roughly 10 seconds per 150,000–200,000 orders on typical hardware. The query path is direct SQL against wc_orders + wc_order_addresses (HPOS). For 1M+ orders the CLI is still the most reliable option because no PHP/web timeout applies; the admin Action-Scheduler-backed runner also handles 1M+ but each batch must complete within the host's PHP limit and if it does not then it won't finish.

What happens to orders with no billing country?

In theory it's impossible as billing and shipping is country based; but in case this ever happens they are skipped. There is no correct file to route them to, and Google's per-country Customer Match campaigns can't use them anyway. The same applies to orders with an invalid country code.

What about orders with no email?

They get written. Google Customer Match accepts a row with any one of: email, phone, or full mailing address (first name + last name + zip). The plugin includes a row as long as one of those identifiers is present alongside a valid country. Deduplication is still single-column: it uses email when available, otherwise phone, otherwise the mailing address. Google handles cross-identifier deduplication on its side after matching to a Google account — so a customer who orders once with email + phone and again with only their phone will appear as two rows in the CSV but as one user in your Customer Match audience.

Will the same customer appear in multiple country files?

Yes — but only if they actually ordered from multiple countries!

I ran the backfill twice — why didn't it write more rows the second time?

This is by design, as every (email, country) pair is recorded the first time it's seen and never re-written. To regenerate from scratch (for example after toggling debug mode or changing normalization), use WooCommerce → Marketing → Customer Match List → Danger zone → Delete all files & reset dedup or wp cmls delete-file, then run the backfill again.

I get a 401 "REST API has been restricted to authenticated users" when I open the URL

Some security plugins ("Admin and Site Enhancements" / ASE has this option, Disable REST API, etc.) block all unauthenticated REST traffic. This plugin does not attempt to override those policies — that would be hostile to the security setting you deliberately chose. If you hit this error, whitelist the plugin's feed prefix in your security plugin's exclusion list: /wp-json/cmls/v1/feed/. Google Ads (and any other configured consumer) needs unauthenticated GET access to that prefix — the tokenized URL is the sole authentication mechanism.

Phone numbers — how reliable is the normalization without libphonenumber?

For most countries (RO, DE, UK, FR, ES, US, NL, BE, PT, IT mobile, …) it's correct. The routine accepts +, 00, the country's national trunk 0, and bare national numbers (using the order's billing country to fill in the dialing code). There is a known limitation for Italian landlines: in Italy the leading 0 is part of the national number, not a trunk prefix, so the routine may strip a digit it shouldn't. Italian mobile numbers (3xx) are fine. If you need strict accuracy across all locales, swap CMLS_Writer::normalize_phone() for a libphonenumber-based implementation.

Is WP-Cron reliable enough for the incremental updates?

WordPress's built-in cron is request-triggered: it only fires if someone hits the site. On low-traffic stores it may drift. For predictable runs, configure a real system cron that calls wp-cron.php every minute — standard WordPress practice and recommendation.

Can I disable hashing for debugging?

Yes. use the integrated define CMLS_DISABLE_HASHING in wp-config.php: define( 'CMLS_DISABLE_HASHING', true );

Does this support High-Performance Order Storage (HPOS) / Legacy Postmeta?

Yes. The plugin declares custom_order_tables compatibility and queries wc_orders + wc_order_addresses directly when HPOS is enabled. On classic (postmeta) storage it falls back to wp_posts + wp_postmeta with a single conditional-aggregation query per batch.

Does the plugin send any data outside my server?

The plugin itself makes no outbound HTTP calls — no analytics, no tracking pixels, no telemetry. All processing happens on your WordPress install. However, the whole point of the workflow is that Google Ads (or any other consumer you configure) will pull the CSV from your site at the tokenized URL. Anyone in possession of that URL can retrieve a file containing:

  • SHA-256 hashes of the customer's email, phone, first name, and last name;
  • the customer's billing country and postal code in plaintext.
Treat the tokenized URL as a secret. If it leaks, use Reset Token in the admin (or wp cmls reset-token) to invalidate all existing URLs and rename the files on disk. See the site's Privacy Policy page — this plugin registers suggested policy text via WordPress's Privacy tool.

Where are the files stored?

wp-content/uploads/customer-match-list-google-ads/customer-match-{hash}-{country}.csv. The {hash} is a 16-character hex derived from the secret token, so filenames are not guessable. An index.php placeholder in the directory prevents listing if your host happens to have it enabled and then it notifies the shop owner (when visiting the dashboard).

What about directory listing?

The settings page does a one-second loopback HTTP request to the uploads directory URL (/wp-content/uploads/customer-match-list-google-ads/) when you open it, caches the result for an hour, and shows one of three banners:

  • Green — safe. The server returned 200/401/403/404 with no listing markers (typically because the bundled index.php silence file is served, or because the webserver explicitly blocks directory listings).
  • Red — exposed. The server returned 200 with Index of … or with our CSV filename prefix in the body. Anyone who guesses the directory URL can enumerate your country files. Fix it: Apache → Options -Indexes (or rely on the WordPress-shipped .htaccess); nginx → autoindex off; in the relevant location block.
  • Yellow — could not verify. The loopback request failed within the one-second budget (NAT / split-DNS / firewall blocking PHP self-calls). Open the URL shown in the notice in a private/incognito browser window — if you see a listing, restrict it; otherwise you're fine.
The check is cached for an hour and re-runs immediately if you click Re-check now.

What about Google's 540-day lookback window?

Google Ads Customer Match uses data uploaded within the last 540 days. The plugin doesn't enforce this so you can decide how much history to include. The "Last 540 days" preset in the backfill range dropdown matches that window. Older data is still appended if you ask for it, but Google won't actively use it.

Can I include orders that aren't completed?

Yes. wp cmls backfill --statuses=processing,completed,on-hold for an explicit list, or --all-statuses for everything. The scheduled (incremental) writer is wc-completed only by design — Customer Match doesn't benefit from including pending or cancelled orders.

How is the deduplication table sized?

One row per unique (email_hash, country). At ~110 bytes per row, 1M unique customers across all countries is roughly 100 MB.

Will deactivating WooCommerce break it?

The plugin's admin page shows a notice and stops scheduling cron, but data isn't lost. Re-activate WC and the plugin resumes from the noted order. If you uninstall the plugin then the uninstall.php routine cleans up the option keys, database tables, and any generated files.

GDPR / privacy

The files contain hashed personal information (email, phone, name) and plaintext country + ZIP. Treat the directory and its access URLs as sensitive data! If a customer requests deletion under GDPR / similar:

  1. Delete or anonymize the WooCommerce order(s).
  2. Run Danger zone → Delete all files & reset dedup (or wp cmls delete-file).
  3. Re-run the backfill — the deleted customer is gone from the files.
Targeted per-row deletion isn't supported on purpose: the SHA-256 hashing is one-way and rebuilding from source is fast.

更新日志:

1.1.2 1.1.1 1.1.0 1.0.0