Google Analytics has been declared illegal in several EU countries due to GDPR violations. Austria, France, Italy, and Denmark have all ruled that using Google Analytics violates European privacy law because it transfers personal data to the United States without adequate protection.
If you're looking for a GDPR-compliant alternative that still gives you the insights you need, Plausible Analytics is an excellent choice. In this guide, we'll walk you through everything you need to know to make the switch.
Why Switch from Google Analytics?
Beyond the legal issues, there are many compelling reasons to switch to Plausible:
- No cookies required: Plausible doesn't use cookies, so you don't need annoying consent banners
- Lightweight script: The Plausible script is under 1KB, compared to 45KB+ for Google Analytics
- Privacy by design: No personal data is collected or stored
- EU-owned and hosted: Data stays in the EU, processed by a European company
- Simple interface: All your stats on one page, no complex reports to navigate
- Open source: You can audit the code or self-host if you prefer
Plausible is used by thousands of EU businesses and was founded in Estonia. It's fully GDPR compliant and endorsed by privacy advocates including the French CNIL.
Step 1: Create Your Plausible Account
Getting started with Plausible takes just a few minutes:
- Visit plausible.io and click "Start free trial"
- Enter your email address and create a password
- Add your website domain (e.g., example.com)
- Choose your data region (EU is the default)
Plausible offers a 30-day free trial with no credit card required. After the trial, plans start at just €9/month for up to 10,000 monthly pageviews.
Step 2: Add the Tracking Script
Once your account is set up, you'll receive a simple JavaScript snippet to add to your website. Here's what it looks like:
<script defer data-domain="yourdomain.com"
src="https://plausible.io/js/script.js"></script>
Add this script to the <head> section of your website, on every page you want to track. Here's how to do it for common platforms:
WordPress
You have several options for WordPress:
- Official Plugin: Install the "Plausible Analytics" plugin from the WordPress plugin directory. Enter your domain in settings, and you're done.
- Theme Header: Add the script to your theme's
header.phpfile, just before the closing</head>tag. - Code Snippets Plugin: Use a plugin like "Insert Headers and Footers" to add the script without editing theme files.
Shopify
- Go to Online Store > Themes
- Click Actions > Edit code
- Find
theme.liquidin the Layout folder - Paste the script just before
</head>
Next.js / React
// In your _app.js or layout file
import Script from 'next/script'
export default function App({ Component, pageProps }) {
return (
<>
<Script
defer
data-domain="yourdomain.com"
src="https://plausible.io/js/script.js"
/>
<Component {...pageProps} />
</>
)
}
Step 3: Verify Installation
After adding the script, verify it's working correctly:
- Visit your website in a browser
- Open your Plausible dashboard
- You should see "1 current visitor" appear within seconds
If you don't see any data, check that:
- The script is in the
<head>section, not the body - Your domain matches exactly what you entered in Plausible
- You're not using an ad blocker that might block the script
- The script has the
deferattribute
Some ad blockers block analytics scripts. Plausible offers a proxy script option that routes through your domain, making it unblockable while still respecting privacy.
Step 4: Configure Custom Events (Optional)
Want to track more than just pageviews? Plausible supports custom events for tracking button clicks, form submissions, file downloads, and more.
First, update your script to include the custom events extension:
<script defer data-domain="yourdomain.com"
src="https://plausible.io/js/script.tagged-events.js"></script>
Then add the plausible-event-name class to elements you want to track:
<button class="plausible-event-name=Signup+Click">
Sign Up Now
</button>
Or trigger events via JavaScript:
// Track a custom event
plausible('Signup', {props: {plan: 'Premium'}});
Step 5: Set Up Goals and Funnels
Goals help you track important conversions on your website:
- Go to your site settings in Plausible
- Click on "Goals"
- Click "Add Goal"
- Choose between pageview goals or custom event goals
Common goals to track include:
- Thank you page visits (for form completions)
- Signup button clicks
- File downloads
- External link clicks
- Newsletter signups
Step 6: Remove Google Analytics
Once you've verified Plausible is working, remove Google Analytics from your site:
- Remove the Google Analytics script (usually starts with
gtag.jsoranalytics.js) - Remove any Google Analytics plugins
- Remove cookie consent banners if they were only needed for Google Analytics
- Update your privacy policy to reflect the change
You can also delete your Google Analytics account entirely, which will remove all historical data Google has collected about your visitors.
Plausible vs Google Analytics: Feature Comparison
| Feature | Plausible | Google Analytics 4 |
|---|---|---|
| Cookie-free | Yes | No |
| GDPR Compliant | Yes, fully | Disputed in EU |
| Script Size | <1 KB | 45+ KB |
| Real-time Data | Yes | Yes |
| Custom Events | Yes | Yes |
| Goals/Conversions | Yes | Yes |
| Campaign Tracking | Yes (UTM) | Yes |
| API Access | Yes | Yes |
| Data Ownership | 100% yours | Shared with Google |
| Self-hosting Option | Yes | No |
Alternative European Analytics Tools
Plausible isn't the only privacy-focused analytics option. Here are other European alternatives to consider:
- Fathom Analytics - Canada-based with EU data processing, simple and privacy-focused
- Matomo - Self-hosted option, more features but more complex
- Simple Analytics - Netherlands-based, similar to Plausible
- Pirsch Analytics - Germany-based, good for developers
- Counter - Minimalist approach, very affordable
Common Questions
Will I lose historical data?
Yes, Plausible cannot import your Google Analytics history. However, you can export your GA data before deleting it, or run both services in parallel for a transition period to build up historical data in Plausible.
How accurate is Plausible without cookies?
Plausible uses a privacy-friendly method to identify unique visitors using a hash of the IP address and user agent, which is discarded daily. This provides accurate daily unique visitor counts without tracking individuals across days.
Can I use Plausible for multiple sites?
Yes, you can add unlimited websites to your Plausible account. Pricing is based on total monthly pageviews across all sites.
Is Plausible open source?
Yes, Plausible is fully open source under the AGPL license. You can view the code on GitHub and even self-host it if you prefer.
Conclusion
Switching from Google Analytics to Plausible is straightforward and offers significant benefits: GDPR compliance, faster page loads, no cookie banners, and simpler analytics that still tell you what you need to know about your website's performance.
The migration typically takes less than an hour, and you'll wonder why you didn't switch sooner. Your visitors will appreciate the improved privacy, and you'll appreciate the cleaner, more focused dashboard.
Explore our full guide to privacy-focused analytics tools to find the best solution for your needs.