Privacy-Conscious Analytics Loading
What it helps you do
Add Google Analytics, Tag Manager, Facebook Pixel, and other tracking from one place. Tracking loads after the page so it doesn't slow visitors down, and a cookie banner can hold it back until visitors agree.
Where to find it
- Appearance → Customize → Scripts & Embeds
- Analytics & Tracking — provider IDs, load strategy, WooCommerce ecommerce options.
- GDPR Banner — enable the notice, layout, and message text.
- Scripts, Privacy, and Performance usage guide — workflow for pairing tracking with the banner.
Supported ID fields include Google Analytics ID, Google Tag Manager ID, Facebook Pixel ID, LinkedIn Partner ID, StackAdapt ID, Hotjar ID, HubSpot Portal ID (with HubSpot Region), and Piwik PRO Account Address with Piwik PRO Container ID, plus verification fields for Google and Facebook.
How to use it
- Open Customize → Scripts & Embeds → Analytics & Tracking.
- Enter IDs only for the services you use — leave the rest blank.
- Set Tracking Load Strategy to After Page Load (default) or First Interaction if you want scripts to wait for a click or scroll.
- To ask for consent, open GDPR Banner, turn Enable on, and customize the message and button labels.
- Publish the Customizer.
- Visit the site in a private window, accept or decline the banner, and confirm tags fire in your analytics debugger when expected.
Turn off Track Admin Sessions in production so your own browsing is not counted while logged in.
What happens automatically
- Tracking scripts load in the background so they don't hold up the page.
- They start at the point you chose (After Page Load or First Interaction). Clicks and purchases are still recorded once tracking is allowed.
- When the GDPR Banner is on, tracking stays off until the visitor accepts.
- Logged-in administrators are excluded from tracking unless Track Admin Sessions is on.
- With Enhanced Ecommerce Tracking enabled and WooCommerce active, completed orders can send purchase events to Google Analytics or Tag Manager.
Things to know
- The GDPR banner controls the tracking you add in Analytics & Tracking. Code pasted into Custom Embeds loads for everyone, banner or not, so use an ID field when there is one. If you move HubSpot or Piwik PRO from pasted code to its field, remove the pasted code too, or visits are counted twice. It doesn't replace legal advice for your region or industry.
- If a visitor declines, those tracking scripts don't load. If they accept, tracking loads using the strategy you chose.
- While the banner is on, the no-JavaScript fallbacks for Tag Manager and Facebook Pixel are left out: visitors without JavaScript can't accept the banner.
- Staging and local copies of a site can have analytics turned off by your host. Ask your developer if tags should be off outside the live site.
- Ecommerce Debug Mode logs events to the browser console for testing; turn it off on live sites.
- To check what tracking does on a page, add
?ds_tracking_debug=1to the end of its address. The browser console then shows the consent check and which scripts load. Visitors never see this. - Changing banner text or tracking IDs after a policy update may require visitors to choose again — your developer can reset consent version if needed.