Decide what you want to measure before installing GA4
A duplicated page view can look harmless until someone uses it to judge an advertising campaign. I once investigated a WordPress site where every visit appeared twice in GA4. The theme had a Google tag, and a plugin had added the same measurement ID again. I had checked the plugin settings but not the rendered HTML, so I lost time looking in the wrong place. The browser Network tab showed two collect requests and ended the mystery.
That incident changed the first question I ask: what exactly should this site measure? GA4 can record page views, scrolls, file downloads, form submissions and purchases as events. That flexibility is useful, but without a written plan your reports soon fill with event names that nobody can interpret six months later.
Before I create a tag, I write down answers to these questions:
- How many genuine visits does the site receive?
- Which pages lead visitors to the contact form?
- Which sources bring WooCommerce orders?
- Which files do people download, and which buttons do they use?
- How do conversions differ between advertising and organic traffic?
This list is more useful than dozens of reports in the Analytics interface. Your business goal decides which measurements deserve to exist.
Creating a Google Analytics 4 property and web data stream
Sign in to Analytics with your Google account and create a property. You will choose a property name, business details, reporting time zone and currency. Choose the currency carefully at the beginning. Changing it later does not reliably repair WooCommerce revenue reports that were already collected.
After creating the property, open Data streams and select Web. Enter your domain with https:// and create the stream. The measurement ID usually looks like G-XXXXXXXXXX. This is the ID used across your website. Do not confuse it with a Google Ads customer ID or a Google Tag Manager container ID.
Enhanced measurement is enabled by default when you create a web stream. Along with page views, it can automatically collect scrolls, outbound clicks, site searches, video engagement and file downloads. I do not leave every option enabled blindly. If a site has no video, keeping video measurement enabled will not improve its reports.
Why not? Automatic measurement does not replace a business goal. A visitor scrolling through 90 percent of a page may be interesting, but if form submissions are what matter to you, that event needs to be defined and monitored separately as a possible conversion.
Know what you are sharing when you provide the measurement ID
G-XXXXXXXXXX is not a password by itself. Still, do not share screenshots of the Analytics administration area, your Google account or Google Tag Manager access. In a support request, the measurement ID and the domain where the issue appears are usually enough.
Three ways to install GA4 on WordPress
There are several ways to add a tag to WordPress. The choice depends less on the size of the site than on who will manage its tags. For a small site with one Analytics tag, adding the Google tag directly may be enough. If advertising, conversion and remarketing tags will grow, Google Tag Manager gives you a more orderly setup.
1. Add the Google tag directly
Once you have the measurement ID from the GA4 web stream, you can add Google’s Google tag code to the site’s <head> section. Editing the WordPress theme file manually is possible, but a theme update may remove the code. A child theme, a reputable header plugin or the theme’s own custom-code field is safer.
The basic structure looks like this. Replace G-XXXXXXXXXX with your own measurement ID:
<!-- Google tag -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>This code loads the Google tag library asynchronously and sends page-view information to the selected data stream. Do not add the same code through two plugins. A duplicate installation can report visits and events twice.
2. Use a WordPress plugin
A plugin can feel easier for someone who does not work with code. Check whether it only adds the Analytics code or also manages its own events and advertising integrations. Adding separate Google tags through a plugin, the theme and Tag Manager is something I see regularly in support tickets.
When choosing a plugin, review its update history, current support and permissions. Instead of giving a third-party service your WordPress administrator password, use Google OAuth when possible. Every plugin adds another attack surface. Install-and-forget is not a good operating model here either.
Google Tag Manager is not a separate Analytics property that carries your data directly. It is a layer for managing tags, triggers and variables on the site. You create a GTM container, add its container code to the site, and then define the GA4 Google tag inside that container.
When you use GTM, publish every change with Submit and add a description to the version. A simple note such as Added button measurement makes it much easier to understand what changed three months later. Test in preview mode first.
You do not have to choose between GA4 and GTM. The useful question is who will manage the tags, how often, and under what approval process. A small brochure site may be fine with a direct Google tag. A WooCommerce project with advertising pixels and several marketing tools benefits from the controlled workspace of GTM.
Treat consent and KVKK compliance as part of installation
Loading the Analytics code for every visitor at once is technically easy, but it may leave the legal side unfinished. Your privacy notice, consent flow and cookie preferences need to be considered together. Clarify what data is processed and for which purpose with your legal adviser and your organisation’s policies.
If your site receives visitors from Europe or processes personal data in Türkiye, plan separately how consent signals such as Google Consent Mode v2 will be used. Not firing the Analytics tag before consent is one possible approach. If you take it, test whether the banner and the tag trigger actually behave the same way.
Follow the current Analytics documentation for how data such as IP addresses is processed. Do not send user IDs, customer email addresses or order notes as event parameters. A developer may ask to see a customer’s email address in reports, but that decision can create unnecessary problems with data breaches and deletion requests later.
Check the data retention settings in the administration area as well. KVKK and GDPR processes cannot be reduced to technical settings alone, but if the technical settings are wrong, a carefully written policy is not enough. The approach in GDPR/KVKK Data Deletion and Anonymization for WordPress and WooCommerce Hosting is useful when you map the full data lifecycle.
Verify that the tag actually works after installation
Before deciding that no data is arriving because a report is empty, run a real-time test. Open the real-time view under Reports in GA4 and visit the site in a private browser window. An active user should appear within a short time. Ad blockers and consent preferences can prevent data from arriving in some browsers.
For more detail, use Google Tag Assistant in Chrome or GTM preview mode. The Network tab in the browser developer tools can also reveal collect requests. If no request is created, the code may not have been added to the page, may be blocked, or may have the wrong trigger.
The Admin > DebugView screen in GA4 shows sessions that send debug signals. Keep DebugView open while testing in GTM preview mode. Check page views, clicks and form events one by one, including the parameters you expect to receive.
My short verification sequence is:
- Open the site in a new private browser session.
- Check how the consent banner behaves.
- Use Google Tag Assistant to confirm that the Google tag loads once.
- Look for the
page_viewevent in GA4 DebugView. - Verify a custom event with a form or test order.
- Record how the test data appears in production reports.
If real-time reports are empty after these checks, do not immediately paste the code again. Duplicate code creates a harder reporting problem than the original error.
Use consistent names for events and conversions
In GA4, almost any action can be an event, but not every event should be a conversion. A conversion is a completed goal that has business value. A contact form submission, quote request, phone click or WooCommerce purchase may qualify. Viewing the home page is a normal event.
Lowercase names with underscores make future reporting easier. For example, contact_form_submit, quote_request and file_download are easy to read. If the same action is called formSubmit in one place and form_sent in another, comparisons become needlessly difficult.
With the Google tag approach, a basic JavaScript structure for sending a custom event looks like this:
gtag('event', 'contact_form_submit', {
form_name: 'contact_form',
page_location: window.location.href
});When the form is submitted, the contact_form_submit event is sent with the form name and page address. Do not add the person’s name, email address or phone number as parameters.
After the event reaches GA4, you can mark it as a conversion in the administration area. First make sure it is sent at the correct time and only once. If a success message fires again on every page refresh, one form submission may look like several conversions.
What to check on WooCommerce sites
WooCommerce measurement is not simply a matter of placing an Analytics tag on the product page. Product views, add-to-cart actions, checkout steps, purchases and refunds need to be sent with the right parameters. Product ID, product name, currency, value and transaction ID must remain consistent.
Without a transaction ID on the purchase event, refreshing the same thank-you page can create duplicate revenue records. Confirm with the business team whether the order total includes shipping and tax or reports them separately. Do not make decisions about advertising performance until the GA4 and WooCommerce reports use the same revenue definition.
Use a bank-transfer method or test gateway instead of a real payment when possible. Then separate the test order from the store reports. If you must test on a live store, plan and document both the order and the measurement check.
Allow for delays in GA4 reports
Real-time reports and standard reports do not operate at the same speed. An event appearing in DebugView does not mean it will appear immediately in every exploration and report. Changing settings repeatedly during the first hours because the data seems incomplete makes diagnosis harder.
During the first few days, these reports are enough to start with:
- User acquisition: Shows the first source or campaign that brought users to the site.
- Traffic acquisition: Helps you track the channels, sources and tools bringing sessions.
- Events: Shows which events fired and how often.
- Landing pages: Shows which page visitors used to start their sessions.
- Monetization: Provides product and revenue data when e-commerce tracking is configured correctly.
Standardise UTM parameters from the beginning. If you use utm_source=instagram, utm_medium=social and utm_campaign=spring_campaign, do not change capitalisation in another link for the same campaign. Instagram and instagram may be reported as different sources.
You do not need to tag all organic traffic manually with UTMs. Use campaign links in controlled areas such as advertising, email and social media instead of damaging search-engine source attribution.
Diagnose missing or duplicated GA4 data layer by layer
When data is missing after a GA4 installation, I separate the problem into layers. The first is the HTML output: is the tag present on the page? The second is consent: did the user allow the Analytics cookie? The third is the trigger: does the correct event fire under the correct condition? The fourth is reporting delay.
WordPress caching and a CDN may continue serving old HTML after a change. Clear the relevant cache, but first confirm whether the page is actually returning the old code. Test the browser, CDN and origin separately instead of clearing every cache layer at random.
If you see two data streams, the Analytics property may contain multiple web streams. Search the site for two different measurement IDs. If the same collect request is sent twice in the browser tools, the direct Google tag and a GTM tag are often both active.
The GTM draft may not have been published. A domain filter in the plugin may be wrong. The cookie banner may block the tag until consent is given. These are separate possibilities, so applying the same fix to every site will not work.
Watch the tag’s effect on performance too. The Google tag normally loads asynchronously, but a large collection of marketing tags can slow the first load. Do not confuse hosting latency with Analytics data problems. When I receive a “the site is slow” ticket, I check the network path with mtr, server logs and query times; measurement code is only one possibility. Hosting and SEO: Myths vs Reality About IPs, Location, CDNs and HTTP/2/3 also explains why technical performance and traffic sources should be considered separately.
Build a small operating routine to protect data quality
Installing the tag once and ignoring it for months is not a reliable process. WordPress, a theme, a form plugin or a payment flow can change the way events behave. I keep the backup and change note from before an update, so at least I know what changed and when.
Run these checks once a month:
- Record the active Google tag and GTM version.
- Verify a test page view in the real-time report.
- Test one important form.
- If the site uses WooCommerce, check a test or low-risk order flow.
- Investigate sudden, unexplained jumps in conversion numbers.
- If the consent banner changed, test the tags against the new consent state.
Review access as well. Not everyone in Analytics needs administrator rights. Giving reporting-only users administrative access can eventually lead to an incorrect property or data stream being deleted. In Tag Manager, separate publishing permission from view-only access.
Keeping test URLs and expected events in a short document is useful. A scenario such as open /contact, give consent, submit the form, see contact_form_submit once explains the expected measurement even after the team changes.
A practical order for your GA4 setup
Start by creating the Analytics property and web data stream. Record the measurement ID. Then choose one WordPress installation method: direct Google tag, plugin or Google Tag Manager. Do not use all three at once.
Next, check consent management and personal-data boundaries. Do not send email addresses, phone numbers, order notes or free-text fields to Analytics. Name form and e-commerce events, document their parameters and mark only valuable events as conversions.
Do not leave testing until the end. Visit the site in a private browser window, submit a form and, where necessary, complete an order flow. Confirm the same event from three angles with Tag Assistant, the Network tab and DebugView. Allow for the delay before standard reports populate.
For me, a good GA4 setup does not end when a visitor appears on a screen. The reason for every event, the way consent is processed and the person responsible for each check when tracking breaks are all part of the installation. Put the test scenario on the calendar for after the next theme or plugin update. I failed to do that once, and a broken form tag quietly lost data for weeks.
Frequently asked questions
Is Google Tag Manager required for a GA4 setup?
No. For a small site with one Analytics tag, adding the Google tag directly through a safe WordPress code field may be enough. If you manage several marketing tags, custom events or consent flows, Google Tag Manager provides a more organised setup.
Why does GA4 data not appear in reports immediately?
Real-time reports and DebugView are relatively quick, while standard reports and some explorations may be delayed. First check the correct property, data stream and measurement ID in the real-time view. Do not treat a delay of a few minutes as proof of an installation error.
What happens if the GA4 code is added twice in WordPress?
The same page view or event may be sent more than once, making visitor, session or conversion totals appear too high. Search the theme, plugins and GTM for measurement IDs separately, then leave only one primary installation.
Can I send the email address of a person who submits a form to GA4?
No. Do not send directly identifying information such as email addresses or phone numbers as Analytics event parameters. A form name, form type or successful-submission indicator is usually enough for measurement.





