The GetTerms plugin helps you implement cookie consent management and embed legal policies directly into your WordPress site. It connects with your GetTerms account to provide compliant, auto-updating documents and a fully configurable cookie consent banner.
GetTerms in the WordPress admin menu.<head> tag.<head> the recommendation is to manually embed the GetTerms script above all other scripts, and not use auto-embedUse the following shortcodes to display your policy documents:
[getterms_privacy_en], [getterms_terms_en], [getterms_aup_en][getterms_privacy_fr], [getterms_terms_fr], [getterms_aup_fr]WordPress loads styles and scripts in two steps:
1) Registration + enqueue (what you do in PHP)
– You register a script/style and enqueue it using WordPress functions.
– Common hooks:
– wp_enqueue_scripts (front end): enqueue scripts/styles for the theme and plugins.
– admin_enqueue_scripts (wp-admin): enqueue for specific admin screens.
– login_enqueue_scripts (login screen): enqueue for wp-login.php.
2) Output (what WordPress prints into the page)
– WordPress prints the enqueued styles and scripts into the HTML at the proper places, using theme hooks:
– wp_head: prints styles and any head scripts (e.g., those with $in_footer = false).
– wp_footer: prints scripts that were enqueued for the footer (those with $in_footer = true).
In practice, you should enqueue on the correct action, and let WordPress output them on wp_head/wp_footer. Example:
Register and enqueue a script
function myplugin_enqueue_assets() {
wp_register_script(
‘myplugin-frontend’,
plugins_url(‘dist/myplugin.js’, FILE),
array(‘jquery’),
‘1.0.0’,
true // load in footer
);
wp_enqueue_script(‘myplugin-frontend’);
}
add_action(‘wp_enqueue_scripts’, ‘myplugin_enqueue_assets’);
What gets printed where
$in_footer = true, the script tag is printed near the end of the page when the theme calls wp_footer().$in_footer = false (default), it will be printed in the <head> when the theme calls wp_head().How this plugin uses these hooks
– For the Cookie Consent Widget, you can choose between:
– Auto-embed: The plugin hooks into wp_head very early to print the consent script as high as possible in the <head> for best consent enforcement. This is intentional because consent tools must run before other scripts.
– Manual embed: You paste the provided <script> tag directly into your theme (ideally above other scripts in the head) if you need strict ordering or have custom setups.
– For admin pages and settings, the plugin uses admin_enqueue_scripts to load its admin bundle only on our settings page to keep the rest of wp-admin lightweight.
Troubleshooting and best practices
– Always load third-party tracking scripts after consent scripts have run. If you must hard-code tags, put the GetTerms script above them in the head.
– Never echo <script> tags directly in templates unless you must. Prefer wp_enqueue_script to let WP handle dependencies, versions, and placement.
– Make sure your theme calls wp_head() before </head> and wp_footer() before </body>. Most themes already do; if not, scripts will not appear.
The plugin communicates with the GetTerms content network (https://app.getterms.io, https://gettermscmp.com, https://gettermscdn.com) to deliver policy content and manage cookie consent. The following data is transmitted:
All data is anonymized where applicable and stored in compliance with GDPR data sovereignty standards.
For more information, refer to our:
– Privacy Policy
– Terms of Service
This plugin relies on external services operated by GetTerms to function. It reaches out to these services to display the Cookie Consent Widget, record consent choices, and embed automatically updating legal documents. Below we explain what each service is used for, what data is sent, and when.
Services used (all operated by GetTerms Pty Ltd):
– https://app.getterms.io — Application/API used for account authentication, compliance pack configuration, and policy retrieval.
– https://gettermscmp.com — Cookie Consent Widget service that renders the banner and manages user consent interactions.
– https://gettermscdn.com — Content Delivery Network for static assets and the document/embed runtime used to display policies.
What data is sent and when
– When you save settings in the WordPress admin (Settings GetTerms):
– Authentication token (provided by you) is sent to app.getterms.io to verify your account and fetch your Compliance Pack configuration.
– Your site’s domain is sent to app.getterms.io to validate authorization and deliver domain‑specific settings.
– When a page loads with the Cookie Consent Widget enabled (auto‑embed or manual embed):
– The page will request widget resources from gettermscmp.com and gettermscdn.com.
– Anonymous consent state and user choices (e.g., accepted/rejected categories) are transmitted to gettermscmp.com when visitors interact with the banner, for the purpose of storing and enforcing consent. No personally identifiable information is required for this.
– When a page renders a policy via a shortcode (e.g., Privacy Policy, Terms):
– The embed runtime from gettermscdn.com requests the latest policy content from app.getterms.io and/or the CDN, along with the configured language.
– When technical errors occur:
– Non‑personal error details may be sent to the above services to help diagnose and resolve issues.
Terms of Service and Privacy Policy
– All of the above domains are operated by GetTerms and governed by the same legal documents:
– Terms of Service: https://getterms.io/our-terms-of-service
– Privacy Policy: https://getterms.io/our-privacy-policy
We disclose these external connections for transparency and to help you assess compliance obligations for your site.
The full human‑readable, non‑minified source code for the compiled JavaScript/CSS is publicly available in our GitHub repository. This satisfies the WordPress.org guideline requiring publicly accessible sources for generated assets.
Public source repository (first‑party):
src/getterms.js, vite.config.mjs, package.jsonCompiled files shipped with the plugin (in this ZIP):
dist/getterms.bundle.jsThird‑party libraries used in the bundle (public sources):
Note: The distributed plugin package does not include the src/ directory. For review or contributions, please use the public repository linked above.
This plugin uses modern build tooling for asset management:
src/ to dist/.Build config: vite.config.mjs
Build steps to reproduce the distributed assets:
.nvmrc for the recommended version).npm installnpm run builddist/.No private repositories are required to build; all source files needed are available in the public repository.
For help, email [email protected]
This plugin is licensed under the GPLv2 or later.