Skip to content

[00] Subset Opt-Out, User guide

SiteGround Speed Optimizer

Last updated

Which SiteGround Speed Optimizer JavaScript settings Subset Opt-Out keeps away from its scripts and the trackers it holds, and the limits.

Subset Opt-Out works with SiteGround’s Speed Optimizer plugin, formerly SiteGround Optimizer, with no exclusions for you to add. It keeps its own scripts, and the trackers it holds, out of Speed Optimizer’s JavaScript settings.

What works

Subset Opt-Out relies on two inline scripts in <head> and one script file. They have to run unchanged, in order, before any tracker. It excludes them from the settings under Speed Optimizer → Frontend → JavaScript (SiteGround’s frontend optimisation guide (opens in a new tab)):

Speed Optimizer settingWhat Subset Opt-Out excludes
Minify JavaScript FilesIts script file, and the scripts of every service it holds, by handle
Defer Render-blocking JavaScriptThe same scripts, by handle
Combine JavaScript FilesIts scripts by handle, path, id and inline code, and the handles and URLs of every service it holds

Held trackers are excluded from combining too. Speed Optimizer’s combine step would otherwise copy a held tracker into a combined file that runs for every visitor.

What needs a setting

Nothing in Speed Optimizer. Clear SiteGround’s cache after you install Subset Opt-Out, and again after you switch a service on or off or add a custom rule. Pages cached before then were built without those changes.

Then test a page as an opted-out visitor, or with Global Privacy Control turned on in your browser. Global Privacy Control shows how to check what’s held.

Known limits

  • A tracker no service matches isn’t held. Speed Optimizer combines it like any other script, and it runs for everyone. Add a custom rule under Subset → Opt-Out for it. Custom rules are excluded from combining as well.
  • Scripts above wp_head run first. A tracker printed before wp_head(), or moved above it, runs before Subset Opt-Out can hold it.
  • Your own exclusions stay. Subset Opt-Out adds to Speed Optimizer’s lists and never removes what you’ve entered.