跳到内容

SaaSAudit

v0.1.3

mbsaas · 2026年11月26日 上架

Automatically blocks tracking cookies, scripts, embedded videos, and maps on your site until visitors explicitly give their consent.

正在使用
10 以下
评分
暂无
累计下载
0
最近更新
2026年11月26日
需要 WordPress 5.8+已测试到 7.1.5PHP 7.4+

贡献者

截图

Banner & appearance: choose the banner layout, your logo and the floating icon visitors use to reopen their choices.
Banner & appearance: choose the banner layout, your logo and the floating icon visitors use to reopen their choices.
Cookies & Services: every cookie, pixel and third-party tracker found on your site, with its category and a plain-language description.
Cookies & Services: every cookie, pixel and third-party tracker found on your site, with its category and a plain-language description.
Analytics: how visitors respond to your banner, by country and by service.
Analytics: how visitors respond to your banner, by country and by service.

Browsers naturally start downloading tracking scripts, custom fonts, and video players the millisecond a page loads—long before any cookie banner can stop them.

The SaaSAudit plugin helps block supported trackers, fonts and embeds until a visitor consents, by intercepting and rewriting those elements on their way out of WordPress, without breaking your layout. How the plugin is configured, and what the privacy laws that apply to your site require, remain your responsibility: the plugin is a technical tool, not legal advice, and it does not guarantee compliance with any law.

Key Features:

  • True Pre-Consent Blocking: Holds back heavy or tracking elements (like YouTube, Vimeo, Google Maps, and Google Fonts) until the visitor clicks “Agree”.
  • Instant Script Injection: Places your official SaaSAudit script at the absolute top of your website’s <head> tag.
  • Full Caching Support: Compatible with page-caching plugins. It rewrites page data before the cache captures it, keeping cached content private.
  • Universal Compatibility: Plugs directly into the WP Consent API to broadcast visitor choices (functional, preferences, statistics, marketing) to your other installed plugins.
  • Respects Privacy Signals: Automatically honours global browser settings like Global Privacy Control (GPC).

External services

This integration relies explicitly on the SaaSAudit Consent Management cloud infrastructure to display banners and log user records securely. It requires an active account to function. The plugin communicates with the following external endpoints:

1. SaaSAudit API (https://consent.saasaudit.ai)

  • What it is: the SaaSAudit Consent Management service your account lives on. The plugin needs it to confirm your site is connected and to read the banner you designed.
  • When (from your site’s server, in PHP): when you connect the site, change a setting in the console, open the plugin’s settings page or press the check button; once a day while the site is connected (a safety net, so blocking rules found by a scan reach your site); and when SaaSAudit signals that a setting changed. Also when a page is built: the plugin asks for your banner settings (which consent model applies in which region) — your published banner settings — keeps the answer for five minutes (one minute if the request fails), so it is at most one small request per five minutes, never one per visitor.
  • Data sent: your site’s address, the Tenant ID and Site ID you entered when connecting, a one-time value used to confirm that you control the site’s address, and your site’s script token. No visitor data.
  • When (from the visitor’s browser): the consent script calls the same API to read the banner, to record a visitor’s choice and to count visits. Each request is listed under “Data transmitted by the client-side banner script” below.
  • Provider and legal terms: SaaSAudit.
    • Terms of Service: https://www.saasaudit.ai/legal/terms-of-service-policy
    • Privacy Policy: https://www.saasaudit.ai/legal/privacy-policy

2. SaaSAudit content delivery network (https://cdn.saasaudit.ai)

  • What it is: serves data only, never code: the descriptions of embedded services (small JSON files) that the consent dialogs show. All executable JavaScript, the consent script (cmp.js) and its c/ chunks, is bundled in this plugin and served from your own site; the plugin never loads or downloads JavaScript from the SaaSAudit CDN or any other remote server, and the script changes only when you update the plugin.
  • When: in the visitor’s browser, only when a visitor asks for more information about a service in the consent dialog.
  • Data sent: the request for one description file. Like any request, it exposes the visitor’s IP address to the server; nothing else is sent.
  • Provider and legal terms: SaaSAudit.
    • Terms of Service: https://www.saasaudit.ai/legal/terms-of-service-policy
    • Privacy Policy: https://www.saasaudit.ai/legal/privacy-policy

3. Hosted cookie declaration table (https://consent.saasaudit.ai/api/v1/cookie-policy/<your site's script token>, optionally followed by ?theme=light, dark or transparent)

  • What it is: your published cookie list, shown on a page of your site. Used only if you add the optional [saasaudit_cookie_policy] shortcode.
  • When: the shortcode prints an <iframe> pointing at that address, and the visitor’s browser requests it directly when the page is viewed. The plugin itself, in PHP, makes no request for it.
  • Data sent: the request exposes the visitor’s IP address to the API server, like any request. The page it returns loads nothing else and sets no cookie; it contains one small inline script that only tells your page how tall the table is, so the frame can fit it.
  • Provider and legal terms: SaaSAudit.
    • Terms of Service: https://www.saasaudit.ai/legal/terms-of-service-policy
    • Privacy Policy: https://www.saasaudit.ai/legal/privacy-policy

Other host names in the plugin’s code. The consent script reads Google Tag Manager script tags that are already on your page: when a visitor withdraws consent, it takes the Google Analytics measurement ID from such a tag (a googletagmanager.com address) to set the ga-disable-<ID> switch. This reads the page only and makes no request. The preference dialog also contains ordinary links to Google’s privacy pages (policies.google.com and business.safety.google, the latter for Google Business Data Responsibility) for sites that use Google services. The address www.w3.org/2000/svg is the standard name of the SVG format, used when the script draws its icons; it is a label, not a request. All other host names, in cmp.js, c/ and rules.php, are listed in the FAQ entry “Which host names does the plugin recognise?”.

Data Collection & Transparency

Data sent by this PHP plugin to the API:

  • The base site URL string (e.g., https://example.com).
  • The Tenant ID and Site ID you entered when connecting, so SaaSAudit can confirm they belong to this site.
  • A secure, temporary authorization value used exclusively to confirm domain ownership.
  • Your site’s script token, with the request for your banner settings.

Data returned from the API:

  • Active registration status, unique script installation tokens, your account’s name and plan (shown on the settings page after you connect), and your console’s Google Consent Mode preferences. No visitor metrics or personal information are sent or stored in this exchange.

Data transmitted by the client-side banner script (inside the browser):

  • The banner script runs in the visitor’s browser and calls the SaaSAudit API (https://consent.saasaudit.ai) in these cases. Like any request, each call exposes the visitor’s IP address to the API server; the sections below say what the service stores.
    • Reading your banner settings (GET /api/v1/domains/banner-config): when a page loads. Sends your site’s script token. Needed to show the banner you designed.
    • Finding the visitor’s country (GET /api/v1/domains/visitor-region): requested on every page load, at the same time as the banner settings, because the answer is needed before the page can be shown the right banner. It sends nothing but the request itself; the answer, the visitor’s country and state as told by SaaSAudit’s network provider, is returned to the browser. The browser uses it only when your banner’s rules depend on the region (a region-based or opt-out consent model, or the teen protections) and ignores it otherwise.
    • Install check (POST /api/v1/domains/beacon): at most once every 30 minutes per browser session. Sends your script token, whether the script loaded asynchronously, whether automatic blocking is on, and how many scripts ran before it. Needed to show in your console that the script is installed and to explain trackers that load early.
    • Session count (POST /api/v1/domains/session-beacon): when a new visit starts, at most once every 30 minutes per browser. Sends your script token and a random session ID, whatever the visitor’s consent. Needed to count sessions for your analytics and plan. Kept for 12 months.
    • Consent decision (POST /api/v1/domains/consent-decision): each time the visitor makes or changes a choice. Sends your script token, the choices, a random consent ID and whether a Global Privacy Control signal was detected; a choice made with the “Do Not Sell or Share” link, or applied automatically from a Global Privacy Control signal, is marked as such in the request address. The service adds an anonymous record containing the visitor’s country, a truncated IP address (the last part is removed, never the full address), and a browser/device classification. The full IP address is never logged or stored. Kept for the period in your subscription configuration (12 months by default). Needed as your record of consent.
    • Per-service decision (POST /api/v1/domains/service-consent): when the visitor allows or withdraws one embedded service, such as a video player. Sends your script token, the service’s name and whether it was allowed.
  • The newest build of the consent script is named in the banner settings; when it differs from the copy bundled in the plugin, the plugin’s settings page shows a notice asking you to update the plugin. Nothing is downloaded. The preference and information dialogs and the revisit icon are part of the plugin; only the service description files (data) are read from the SaaSAudit CDN when a visitor asks for them.
  • The plugin itself, in PHP, sends none of the visitor data above.
  • The plugin makes no request to any other third party. Embeds and scripts that are already on your pages (a video player, an analytics tag) are held back until the visitor allows them, and are then loaded by the visitor’s browser from their own provider as your page already asked; the links to those providers’ privacy policies shown in the preference dialog are ordinary links, not requests.

Lists of service names: rules.php, cmp.js and its c/ chunks contain lists of host names of well-known embeds and trackers (for example video players, maps, analytics and advertising tags). They are only compared with the scripts and embeds that your own pages already load, to hold those back until the visitor allows them. The plugin and the script make no request to those hosts and load nothing from them; they are not external services of this plugin.

Credit link: the plugin never shows a “Powered by SaaSAudit” credit or link on your site, and has no setting to turn one on. It injects no hidden tracking URLs or advertising tags into your content.

For more information, please review our terms:

By installing and configuring this plugin, you authorize these secure network requests to be processed. If you do not consent to these validation lookups, please remove the plugin files from your environment.

Public REST endpoints

The plugin adds two public REST routes under /wp-json/saasaudit/v1/, because SaaSAudit’s servers call them from outside your site:

  • GET /proof: returns a one-time value that SaaSAudit issued itself, only for the two minutes after a domain check starts; otherwise it answers 404 (and asks caches not to store the answer). It exposes nothing about your site or visitors.
  • POST /refresh: SaaSAudit’s signal that a setting changed in your console. It takes no input and carries no visitor data; it carries only the time, a one-time value and a signature made with a key SaaSAudit gave this site once the site proved it controls its address, and a request without a valid, recent, unused signature is refused. A valid one only makes the plugin run its normal connection check, which still has to prove that the site controls its address. It runs at most one check every two minutes (a signal that arrives sooner queues a single later check), so repeated calls cannot cause extra work.

Source Code

The plugin’s own code is plain, human-readable PHP and one small readable script, js/cookie-policy-resizer.js. The one generated PHP file, rules.php (the list of known embeds and trackers), is built from the same service catalog that SaaSAudit’s consent script uses; it is readable and shipped as is.

The plugin also includes a built copy of SaaSAudit’s consent script: cmp.js, with its c/ and assets/ folders. These files are minified JavaScript built from TypeScript. The complete unminified source is included in this plugin, in the source/ folder. The source repository is private, so the source and its build setup ship inside the plugin instead of a link:

  • cmp.js: built from source/cmp-loader/src/loader.ts.
  • c/prefs.*.js (the preference dialog): built from source/cmp-loader/src/chunks/prefs.ts.
  • c/info.*.js (the “More information” dialog): built from source/cmp-loader/src/chunks/info.ts.
  • source/cmp-loader/: the script’s TypeScript (src/), its service descriptions (services/), build scripts, rollup configs, package.json and package-lock.json.
  • source/shared/src/consent-catalog/: the catalogs of known services and trackers the script imports (tracker-rules.ts, embed-widgets.ts, tracker-catalog.ts and others).
  • source/cmp-loader/src/cdn-code.ts: a stub with nothing in it. The script SaaSAudit offers to sites that are not on WordPress can take its own files from a CDN; this plugin’s script is built without that code, so neither it nor its source loads any script from a remote server.
  • source/BUILD.txt: the same build instructions as below.

To rebuild cmp.js and c/*.js you need Node.js 22 (LTS) and npm:

cd source/cmp-loader && npm ci && GITHUB_SHA=<build id> CMP_API_BASE_URL=https://consent.saasaudit.ai npm run build

npm run build runs four steps in order: it builds the chunks (`rollup.chunks.config.mjs`), names each chunk by a hash of its contents (`scripts/hash-chunks.mjs`), builds the main script that lists those chunks (`rollup.config.mjs`), then writes a manifest (`scripts/generate-manifest.js`). That is why `c/prefs.*.js` is not a single separate compile; `source/BUILD.txt` lists the steps.

The result is in source/cmp-loader/dist/: cmp.js and c/*.js are the files shipped in the plugin, byte for byte, when built with the build id of this release. The build id is the commit recorded in the SAASAUDIT_BUNDLED_LOADER constant in rules.php (the script contains its first seven characters; any 40-character hexadecimal value that starts with them gives the same files). Each release of the plugin ships the source of the script it contains.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums