Documentation » Administration

Cookies & Consent

Published · Last updated

Overview #

The General Data Protection Regulation (GDPR) is a regulation in the European Union (EU) and European Economic Area (EEA). Among other things, it sets rules for the cookies your site stores in your visitors’ browsers.

This article covers cookies: what they are, how to find the ones your site uses, what a cookie banner should offer, what to put in your privacy policy, and how to make Groundhogg wait for your visitors’ consent. For consent to email marketing, double opt-in, and the preferences center, see GDPR & CASL Compliance.

Starting in Groundhogg 4.12, if you use a consent plugin that supports the WP Consent API, such as Complianz, Groundhogg’s tracking waits for it. With GDPR features turned on, tracking starts only once a visitor allows marketing cookies. It works on cached pages too, and you don’t need any custom code.

Warning! You should consult your lawyer or other legal professional before making decisions with legal implications. We will not be held responsible for any violations levied against you as a result of implementing strategies in this article or use of the compliance tools provided by the Groundhogg WordPress plugin.

What are cookies? #

Cookies are small text files that websites store in your browser as you go from site to site.

Sites set cookies for lots of reasons. The most common is keeping you logged in, so you don’t have to log in again every time you come back. Others remember your preferences so the site looks the way you like it.

Think of a cookie as a coat check ticket. You hand over your coat, they give you a ticket that identifies it, and when you come back later, the ticket gets you the right coat.

How do cookies relate to GDPR? #

GDPR requires informed consent before you store or access cookies on a visitor’s device. That means the visitor has to agree first, and only then can those cookies be stored and read.

Here are a couple of examples:

  • Someone is logged in to Facebook and visits your site, which has a Facebook Messenger chat plugin. If they haven’t agreed to let your site access Facebook’s cookies, the chat plugin can’t know who they are. It has to show a general message and ask them to agree before it can use those cookies.
  • Ads work the same way. If a visitor doesn’t agree, ads can’t store or read cookies and may fall back to showing general ads. That might not help your site, but you have to respect what the visitor chose.

Not based in the EU? You should still care. GDPR applies to everyone who lives in or is currently in the EU.

Which cookies does your site use? #

It depends on the plugins and services you use. Some plugins set no cookies at all, and some track visitors without you realizing it. Check the privacy policy of every plugin you use. Some publish their cookie information, like Groundhogg does below, and for others you may need to contact the developer.

Some common sources of cookies are:

  • Google Analytics, which may count as statistics or marketing cookies depending on how you set it up.
  • Retargeting ads, like the Facebook pixel, which are marketing cookies.
  • Cloudflare, which may count as strictly necessary cookies.
  • YouTube, if you embed videos, which may be marketing cookies.

Finding them all can take a while, and there may be some you’d never think of. An online cookie checker can help. These free checkers all worked when we tested them:

  • Cookieserve: scans your homepage only. It’s free and doesn’t ask for an email address.
  • CookieMetrix: scans a single page and shows which cookies are set before the visitor consents. Enter the full address, including https://.
  • Cookie Scanner: checks up to three pages for free, or five with a free account. It reports cookies, tracking requests, and whether your banner shows on each page. If it says the scan didn’t return any pages, it couldn’t load your site. Try one of the other checkers.

Keep in mind that no online checker is 100% accurate. A checker usually sees only the pages it visits, and some cookies only appear after a visitor accepts the banner, logs in, or submits a form.

Cookies Groundhogg sets #

Groundhogg sets these cookies for visitors on the front end of your site. The Waits for consent column shows which ones Groundhogg holds back until the visitor consents, when GDPR features are on.

Cookie: groundhogg-tracking
What it’s for: A functional cookie that identifies a known contact, so Groundhogg can link their visits, form submissions, and email clicks to their record. The value is encrypted.
When it’s set: Set when a contact clicks a tracked link in a Groundhogg email, opens an identity link, logs in to your site, or submits a Groundhogg form.
Lifetime: 14 days
Waits for consent: No

Cookie: groundhogg-lead-source
What it’s for: Remembers the page that sent the visitor to your site, so it can be saved as the contact’s lead source when they sign up.
When it’s set: Set on the visitor’s first page view.
Lifetime: 3 days
Waits for consent: Yes

Cookie: groundhogg-page-visits
What it’s for: Remembers up to 50 pages a visitor viewed before you knew who they were, so they can be added to the contact’s activity when they sign up.
When it’s set: Updated on each page view.
Lifetime: 1 hour
Waits for consent: Yes

Cookie: groundhogg-form-impressions
What it’s for: Remembers which Groundhogg forms the visitor has already seen, so each form impression is counted once.
When it’s set: Set when a page with a Groundhogg form loads.
Lifetime: 3 days
Waits for consent: Yes

Cookies: gh-permissions-key-preferences, gh-permissions-key-view_archive
What it’s for: Keeps the access key from an email link, so the contact can keep using the preferences center or email archive without logging in.
When it’s set: Set when a contact opens one of those pages from a link that carries the key.
Lifetime: 1 hour
Waits for consent: No

groundhogg-tracking is set without waiting for consent. It’s set when a contact clicks a tracked link in a Groundhogg email, opens an identity link, logs in, or submits a Groundhogg form. Check with your own legal advisor how to classify it in your cookie policy.

Two more cookies are only set for you and your team in the WordPress admin:

  • gh-safe-mode remembers that you turned on Groundhogg’s safe mode. It lasts 1 year.
  • groundhogg_reporting_dates remembers the date range you picked on the Reports page. It lasts 1 hour.

Your consent plugin sets its own cookies to remember each visitor’s choices. With the WP Consent API, those are named like wp_consent_marketing, and Groundhogg reads them to decide whether tracking can start.

You most likely need one, especially if you, your business, or any of your customers are in the EU. It’s also good practice to show one to everyone. It shows that you care about your visitors’ privacy and gives them a choice about which cookies are stored or accessed.

When GDPR first came in, cookie banners popped up everywhere, and many people found them annoying. That shouldn’t put you off. A banner shows you’re following the law, which can come with fines if you don’t, and it gives your visitors a choice.

Your cookie banner should let visitors:

  • Accept all cookies.
  • Reject all cookies, just as easily.
  • Choose by category or by service. For example, a visitor might allow Groundhogg’s cookies but not YouTube’s.

Whichever banner you use, you can set Groundhogg to start tracking only after the visitor consents.

Groundhogg only waits for consent when GDPR features are on. If they’re off, Groundhogg treats every visitor as having consented. To turn them on, go to Groundhogg » Settings » Compliance and check Enable GDPR features. Then click Save Changes. GDPR & CASL Compliance explains what else this setting turns on.

How Groundhogg finds out about consent depends on your consent plugin.

This is the easiest option. Groundhogg asks your consent plugin directly, so you don’t need to set a cookie name or value. These steps use Complianz, which is free, but any consent plugin that supports the WP Consent API works the same way.

Requirement: you need an active consent banner plugin that supports the WP Consent API, such as Complianz, alongside the WP Consent API plugin. Without one, Groundhogg treats visitors as having consented.

  1. Install and activate the WP Consent API plugin and your consent plugin, such as Complianz.
  2. Go to Complianz » Wizard. On the Visitors step, choose European Union (GDPR) so visitors have to opt in.
  1. On the Services step, answer Yes to “Do you use plugins that might set marketing cookies?” If you answer No, Complianz removes the Marketing category from your banner, and visitors can only allow Groundhogg by accepting everything. Click Save, then finish the wizard.
  1. Make sure Enable GDPR features is checked in Groundhogg » Settings » Compliance, as shown above.
  2. Open your site in a private browser window to test it. Groundhogg doesn’t set any of the cookies that wait for consent until you click Accept.

Visitors who click View preferences can turn on Marketing on its own and click Save preferences. Groundhogg starts tracking as soon as Marketing is allowed, without reloading the page.

Here’s how it works once it’s set up:

  • Groundhogg waits for the marketing category. Until the visitor allows it, Groundhogg doesn’t log page views or form impressions, and it doesn’t set the cookies marked “Yes” in the table above.
  • It works on cached pages. The browser asks the consent plugin when the page loads, so a cached page can’t pass one visitor’s answer on to another.
  • If a visitor withdraws consent, Groundhogg stops tracking on later pages. Cookies it already set stay until they expire or the visitor clears them.
  • The Consent cookie name and Consent cookie value settings are ignored.

Opt-in vs. opt-out: the WP Consent API treats a category as allowed until the visitor says no when your consent plugin uses an opt-out model, which is how Complianz handles regions like the United States. For GDPR, make sure your consent plugin uses opt-in for your visitors.

Groundhogg can check for the cookie your banner sets when a visitor accepts. Your banner’s documentation should tell you its name and the value it uses for “accepted”.

  1. Go to Groundhogg » Settings » Compliance and make sure Enable GDPR features is checked.
  2. In the Cookies section, enter the cookie’s name in Consent cookie name and its “accepted” value in Consent cookie value.
  3. Click Save Changes.

Note: with GDPR features on and no WP Consent API plugin, you need to fill in both Consent cookie name and Consent cookie value from your banner plugin. If you leave them blank, Groundhogg treats visitors as having consented. Type both values in, even if they match the grey examples. The examples, viewed_cookie_policy and yes, aren’t saved unless you enter them.

Turn off cookies you don’t need #

You can also cut down what Groundhogg stores, whatever banner you use:

  • Disable unnecessary cookies, in Groundhogg » Settings » Compliance, stops Groundhogg from setting groundhogg-lead-source, groundhogg-page-visits, and groundhogg-form-impressions.
  • Disable frontend page tracking, in Groundhogg » Settings » Misc » Site Activity Tracking, stops Groundhogg from tracking contacts’ page visits and form impressions on the front end of your site.

Yes, you need to include it. Your privacy policy should list:

  • Every cookie your site uses.
  • What data each one collects.
  • What happens to that data, including whether it’s shared with anyone.
  • How a visitor can change or withdraw their consent.

You can put this on a separate cookie policy page instead. It depends on your business and the advice you’ve been given. The table above has the details for Groundhogg’s cookies. Because Groundhogg is self-hosted, it doesn’t process your contacts’ data outside of your WordPress site.

To link your privacy policy from Groundhogg’s pages, such as the preferences center, go to Groundhogg » Settings » Compliance and choose your page in the Privacy Policy field of the Policies section.

FAQs #

No. When GDPR features are off, Groundhogg treats every visitor as having consented, even if you have a consent plugin.

Marketing. Developers can change it with the groundhogg/consent_category filter. It accepts functional, preferences, statistics, statistics-anonymous, or marketing.

add_filter( 'groundhogg/consent_category', function () {
	return 'statistics';
} );

Does tracking work on cached pages? #

Yes, if your consent plugin supports the WP Consent API. The browser checks consent when the page loads, so the cached copy doesn’t matter. With the consent cookie method, part of the check happens when the page is built, so a cached page can carry an out-of-date answer. See also Caching Compatibility.

Can visitors remove Groundhogg’s cookies? #

Yes. Visitors can clear cookies in their browser. A contact who uses Erase Profile in the preferences center also has groundhogg-tracking and groundhogg-lead-source removed.

See all Administration docs →