SEOPress Free lets you ask visitors for consent before loading the analytics tracking configured through SEOPress. The cookie bar provides acceptance, refusal and, optionally, a way to change the choice later.
Enable the cookie bar
- Go to SEO, Analytics and enable the Analytics module.
- Configure the trackers you want to use, then open the Cookie bar / GDPR tab.
- Enable Request user consent for analytics tracking.
- For an explicit opt-in, leave Display and automatically accept user consent on page load disabled. This separate option starts tracking without waiting for an Accept click; displaying a banner is not the same as obtaining consent.
- Enable Allow users to change their cookie preferences if you want a preferences button to remain available.
- Save changes and clear your website cache.
Customize the message and appearance
Edit the consent message and the Accept, Decline and Cookie preferences button labels. Existing installations may still use “Close” as the refusal label. The refusal action does not become acceptance when its label changes.
You can use links and basic formatting in the message. Select your privacy policy page in WordPress settings, then use [seopress_privacy_page] as the destination of a link to that page.
Choose the banner position, alignment, width, colors and backdrop. The recommended insertion point is after the opening body tag. Your theme must support wp_body_open; if it does not, choose the footer insertion point and test again.
What the consent choice controls
The integration covers Google Analytics, Matomo, Microsoft Clarity and custom tracking code added through SEOPress. It does not automatically control scripts inserted by your theme, another plugin or an independently configured tag manager. Check those integrations separately.
When GA4 and the cookie bar are enabled, SEOPress manages Google Consent Mode v2 signals for analytics_storage, ad_storage, ad_user_data and ad_personalization. The default is denied; acceptance and refusal update the consent choice. Consent Mode communicates that choice to Google and does not itself collect the visitor’s consent.
This is one accept-or-decline choice, not a preference center with separate switches for every tracker. Enabling a setting does not, by itself, establish legal compliance for your entire website.
Expiry, preferences and excluded roles
Cookie expiration (days) sets how long the choice is remembered; the default is 30 days. When the choice cookie is no longer present, an eligible visitor can be asked again. Clearing browser cookies also removes the saved choice.
The preferences button reopens the banner so a visitor can choose again. Revoking consent does not undo data already sent or guarantee that every third-party script already running on the page stops. Also test the next page load and the behavior of your custom scripts.
Under Analytics, Advanced, review excluded user roles. Test while logged out or with a role that is not excluded, otherwise the banner or tracking may be absent by design.
Verify your setup
- Open a fresh private browser session. Before clicking a button, inspect tracking requests and the consent state with your browser’s developer tools or Google Tag Assistant.
- Click Accept, then navigate to another page. Verify that the intended trackers run and the saved choice is respected.
- Repeat in a separate fresh session and click Decline. Verify that analytics is not authorized.
- Reopen preferences, change the choice, then reload and test again.
- Repeat with your cache and JavaScript optimization enabled. If results differ, clear the cache and isolate the optimization setting responsible.
If the banner is missing, check the module switch, the consent option, excluded roles, existing consent cookies and the theme’s insertion hook.
Consent on cached pages
SEOPress 10.3 resolves each visitor’s saved choice in their browser. The same cached page can therefore be served to visitors who have accepted, declined or not answered yet. With explicit opt-in enabled, SEOPress keeps its tracking payload inactive until consent is available, then loads the authorized tracking code. A returning visitor’s choice is read again on the next page.
JavaScript delay, combining, minification or consent tools from other plugins can still affect execution order. After an update or a settings change, purge the page cache and any CDN cache. If the bar or trackers fail, temporarily disable JavaScript optimization, retest and exclude only the conflicting consent/tracking scripts from the responsible optimization.
Test that one visitor’s choice does not affect another
- Enable the page cache and explicit opt-in; leave automatic acceptance disabled.
- In browser A, start with no saved choice, load a page, accept and revisit it so the cache is populated.
- In a separate browser B with no saved choice, open the same URL. The banner must still ask for a decision. Decline and check that B does not inherit A’s permission.
- Return to A and confirm its acceptance is retained. Reverse the order: prime the cache from a declining visitor and then visit from an accepting browser.
- Use the preferences button to change a choice and check both the current page and a subsequent navigation.
The presence of tracking configuration in the page source does not prove that it has executed. Inspect network requests and the trackers’ consent state as well. A custom script already executed on a page needs its own handling for consent withdrawal.