Works with your stack
Cookie consent for SiteGround Optimizer
four lists, one rule
SiteGround Optimizer can minify, combine and load scripts asynchronously, inline scripts included. On SiteGround hosting it also drives the server’s page cache.
By SiteGround · siteground.com · WordPress.org
Is this your product? Tell us if anything here is out of date. Write to us
SiteGround Optimizer
WordPress plugin
- Tested version
- 7.8.6
- How
- Tested automatically around each Cookie Rocks version
- Last test
- 7 November 2026
- Latest version
- 7.8.6 tested
- Active installs
- 1,000,000+
What SiteGround Optimizer adds to your visitors’ browser
No trackers In our test of SiteGround Optimizer 7.8.6 on 7 November 2026, the plugin itself added no tracker and no cookie. What you place in your pages with it, such as a video or a map, still counts.
What matters for consent with SiteGround Optimizer
Minify, combine, async
Each option changes how scripts arrive. The consent script has to stay out of all of them and run first.
Inline scripts combined
SiteGround Optimizer can gather the small scripts written in the page into a file. The consent script at the top of the page has to stay where it is.
The host’s cache
SiteGround keeps pages in a cache on its servers. A banner change reaches visitors once it is purged.
Fonts and lazy loading
SiteGround Optimizer can combine Google Fonts and lazy load images and frames. A frame that loads later still needs consent when it loads.
Cookie Rocks with SiteGround Optimizer
- Adds the banner’s scripts to its exclusions from delay, combining and minifying.
- Clears its page cache when you change something visitors can see.
What our tests found on SiteGround Optimizer
Good to know · SiteGround OptimizerSiteGround Optimizer serves one cached page to everyone, whatever the choice
Its file cache skips only a fixed cookie list (logged-in, carts, comment author) and never stores a response that sets a cookie. A consent cookie is not on that list.
Read in its code, 16 October 2026, SiteGround Optimizer 7.8.4.
Full detail
SiteGround Optimizer's Defer Render-blocking JavaScript adds defer, not async, to enqueued scripts, except handles excluded with sgo_js_async_exclude. Its page rewriting (combination, minification, fonts) and deferral are skipped for logged-in users. Its file cache skips requests carrying a fixed cookie list (sgo_bypass_cookies: logged-in, carts, comment author, wpSGCacheBypass) and never stores a response with Set-Cookie; a consent cookie set in the browser is not on the list, so cached pages stay the same for everyone.
Depends on a setting · SiteGround OptimizerSiteGround Optimizer lazy loading can let videos load before the choice
setting “Lazy load iframes” · by default: off
With iframe lazy loading on, the video address moves to data-src, which a banner reading only src misses. Cookie Rocks 2.5.0 holds the video and starts it after consent, without a reload.
Seen in our tests, 16 October 2026, SiteGround Optimizer.
Full detail
With lazy loading of iframes on, SiteGround Optimizer moves a video's address from src to data-src. A banner that only reads src lets the video load before the choice. Cookie Rocks 2.5.0 holds it and starts it after consent, without a reload.
Good to know · SiteGround OptimizerSiteGround Optimizer sets no cookie, but its font option still contacts Google
Web Fonts Optimization inlines Google's font stylesheet, but font files still load from fonts.gstatic.com. No setting removes the request to Google. No WP Consent API or Consent Mode code.
Read in its code, 16 October 2026, SiteGround Optimizer 7.8.4.
Full detail
SiteGround Optimizer sets no cookie and writes nothing to the visitor's browser storage (storage is used only by its admin app). Its Web Fonts Optimization inlines Google's font stylesheet, but the font files still load from fonts.gstatic.com and it adds preconnect links to fonts.gstatic.com and fonts.googleapis.com; no setting of the plugin removes the request to Google. It has no WP Consent API support and no gtag('consent') call.
Good to know · Cookie Rocks ProCookie Rocks Pro clears page caches when an update changes banner values
It clears the caches of seven known plugins, such as WP Rocket and LiteSpeed Cache, at the first request after the update. Host and CDN caches keep the old pages until they expire.
What to do: After an update that changes banner defaults, clear the host or CDN cache by hand.
Read in its code, 15 October 2026, Cookie Rocks Pro.
Full detail
When an update of Cookie Rocks Pro changes or removes a value it sends to visitors (for example the default accent colour), Pro clears the known page caches (WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, SiteGround Optimizer, WP Fastest Cache, Breeze) at the first request after the update, with no extra database query and nothing more for visitors. An added value clears nothing. Host and CDN caches are not cleared and keep the old pages until they expire.
Good to know · LiteSpeed Cache, W3 Total Cache, SiteGround Optimizer, AutoptimizeCache plugins' JavaScript options keep the Cookie Rocks banner first
With LiteSpeed Cache, W3 Total Cache, SiteGround Optimizer or Autoptimize combining or delaying scripts, the banner script stays first and untouched, and trackers are held until Accept all.
Seen in our tests, 15 October 2026, LiteSpeed Cache, W3 Total Cache, SiteGround Optimizer, Autoptimize 7.9.1, 2.10.7, 7.8.4, 3.1.16.
Full detail
With JavaScript combined, minified or delayed (LiteSpeed Cache including Guest Mode and Load JS Delayed, W3 Total Cache minify in auto mode, SiteGround Optimizer combine and async, Autoptimize aggregate including inline JS), the Cookie Rocks head script stays first and untouched, its engine stays a separate file, and trackers are held until Accept all. Without a LiteSpeed web server, LiteSpeed Cache sets no cookie.
Good to know · SiteGround OptimizerSiteGround Optimizer's script combining keeps the banner and holding working
setting “Combine JavaScript Files ; Defer render-blocking JavaScript”
With minify, combine and async loading on, the Cookie Rocks head script stays first, the banner shows and trackers are held until Accept all. SiteGround's dynamic cache was not tested.
Seen in our tests, 15 October 2026, SiteGround Optimizer 7.8.4.
Full detail
With SiteGround Optimizer's JavaScript minify, combine and asynchronous loading on, the page's scripts are combined; the Cookie Rocks head script stays first and untouched, the engine stays separate, the banner shows and the trackers are held until Accept all. SiteGround's dynamic cache needs a SiteGround server and was not part of the test.
How we test it
Around each version, with its latest release
Around each Cookie Rocks version, a fresh WordPress installs its latest version from WordPress.org next to Cookie Rocks and runs the same checks. A new version joins the next run on its own.
- SiteGround Optimizer 7.8.6, tested on 7 November 2026.
- The banner shows, the trackers of the test page wait for consent and load after it, and Cookie Rocks raises no PHP error.
- Settings of the test: Default settings after activation.
- Last run: SiteGround Optimizer 7.8.6 on 7 November 2026, with WordPress 7.1.3.
Light as a pebble
11.43 kB once, 1.00 kB per page. Measured, not promised.
lighter than the font on this page*
Every kilobyte costs your visitors time and costs you Core Web Vitals. Cookie Rocks adds 11.43 kB to the first page a visitor opens, then 1.00 kB to each page after that, because its files stay in the browser cache. It calls no outside server and never shifts your layout.

11.43 kB First visit, in total
1.00 kB Each next page
7.74 kB JavaScript, first visit
3.48 kB Stylesheet, first visit
0 Requests to other servers
0 Layout shift caused
* The font on this page is Inter, compressed and cut down to the Latin alphabet. It still weighs 26.23 kB.
Page cache
Other plugins of the same kind.
Questions
Will visitors see each other’s choices in a cached page?
No. The choice is read in the browser, after the page arrives, so the cached page is the same for everyone.
And a CDN in front of SiteGround?
A CDN keeps its own copy. If yours is not cleared with the SiteGround cache, clear it by hand after a banner change.
What happens after the 30-day trial?
The banner, your visitors’ choices and your proofs of consent keep working. Without a key, most settings lock, updates and support stop. Take a key at any time and everything opens again.
For SiteGround sites
Keep SiteGround’s speed, add consent.
four lists, one rule
Every feature of the complete plugin for 30 days, no card.
- During the trial: everything, including the full settings and the scans
- After 30 days without a key: the banner, your visitors’ choices and your proofs of consent keep working
- What waits for a key: most settings, updates and support

Get your trial key
Your e-mail and your site. Your key arrives as soon as you confirm your e-mail.