Google Analytics shows you how many people visit your site, where they come from, and what they do. Adding it to WordPress lets you make decisions based on real data. This guide explains the options.
Step 1: Create a Google Analytics property #
Sign in to Google Analytics, create an account and a property for your website, and get your measurement ID (it starts with G-). This ID connects your site to your analytics.
Step 2: Add it to WordPress #
There are two common approaches:
- With a plugin (easiest): install an analytics plugin, paste your measurement ID, and it handles the tracking code for you.
- Via your theme: some themes have a field for your analytics ID or header scripts in their settings.
Using a plugin #
- Ir a Plugins > Add New and install a reputable analytics plugin.
- Activate it and open its settings.
- Connect your Google account or paste your measurement ID.
- Guardar.
Confirm it is working #
Visit your site, then check the Realtime report in Google Analytics; you should see your own visit. Data for reports builds up over the following hours and days.
A note on privacy #
If you have visitors in the EU, remember that analytics involves personal data. Add a privacy policy and a cookie consent banner, and configure analytics in line with GDPR expectations.
Solución de problemas #
- No data: confirm the measurement ID is correct and caching is cleared.
- Double counting: make sure the tracking code is only added once, not by both a plugin and the theme.
¿Necesita ayuda? #
If analytics is not tracking, our support team can help you check the setup over live chat.