How to Set Up Google Analytics 4 on WordPress
Set up GA4 on WordPress with Site Kit, avoid duplicate tags, check consent and verify real visits before measuring leads, bookings and sales.
To set up Google Analytics 4 on WordPress, create or select a GA4 property and web data stream, connect them through Google's Site Kit plugin, and let one installation method place the Google tag. Then visit the site and confirm the activity in GA4 Realtime. Consent settings and duplicate tags need checking before you trust the reports.
For a business website, installation is the beginning. You eventually need to know whether visitors submit enquiries, complete bookings or buy products. If you use Niwa on WordPress, those outcomes are the useful measurement targets. An AI-powered website helps customers complete tasks after launch; a website built with AI describes how its design or code was created.
Prepare access and inspect the existing setup
You need WordPress administrator access and a Google account with permission to select or create the Analytics property. Keep the property under a business-controlled account. Give a developer access to it rather than leaving your reporting inside their personal account.
Before installing anything, check whether the theme, an analytics plugin or Google Tag Manager already sends data to GA4. Ask whoever maintains the site if the installation is unclear. A second plugin can create duplicate page views while making the dashboard look reassuringly busy.
Write down the property name, website address and web stream's measurement ID. The measurement ID starts with G-. It identifies the destination stream; it is different from a Tag Manager container ID.
Connect Analytics through Site Kit
In WordPress, go to Plugins, add Site Kit by Google, install it and activate it. Start Site Kit's setup and connect the Google account that has access to the business property. Complete the site verification and account permissions requested by the setup flow.
If Analytics was not connected during the initial setup, open Site Kit, then Settings, Connect More Services, Analytics and Set up Analytics. Select the intended account, property and web data stream. Site Kit also provides options to create these when they do not exist. Finish with Configure Analytics.
In a new property, choose the business's reporting time zone and currency carefully. These settings matter when comparing a store's daily sales with Analytics. A late evening sale can fall on different calendar days in two reporting systems.
These steps follow Google's Site Kit Analytics guide. If your site already uses Tag Manager for analytics, keep that installation and connect the dashboard without adding another tag.
Confirm which tool places the tag
Open Site Kit, Settings, Connected Services, Analytics and Edit. Check the Place Google Analytics code setting. Enable placement when Site Kit owns the installation. If another tool already places the intended tag, avoid placing the same configuration again.
Site Kit can report whether it placed its snippet in Tools, Site Health, Info, under Site Kit by Google. That is an installation check. It does not prove that a real visitor's events reached the right property.
Clear the relevant page cache after changing tag placement, then test the public site in a browser where you are logged out of WordPress. Site Kit has a setting to exclude logged-in users, so an administrator's own visit may deliberately be absent.
Set consent behavior before testing
Review how your consent tool controls analytics storage and tag loading. Test the choices a visitor actually sees, including refusal and acceptance. A cookie banner's appearance alone does not establish that collection follows the visitor's choice.
Google documents basic and advanced consent mode as different implementation approaches. Select the behavior appropriate to your requirements and configure the integration accordingly. Consent mode is a technical mechanism; it does not decide your legal obligations.
Do not add names, email addresses or other personal details to page URLs, event names or parameters. A contact form's contents belong in your protected business records, not in an analytics event.
Verify a visit before adding business events
Open the correct GA4 property and its Realtime report. Visit two public pages from your test browser, respecting the consent settings. Look for the activity in the correct stream. Use Google Tag Assistant and GA4 DebugView if you need to inspect individual events and parameters.
Standard reports can take 24 to 48 hours to process data, according to Google's collection verification guide. Waiting for a standard dashboard is less useful than checking the live test first.
If the visit is missing, inspect the measurement ID, consent state, browser extensions, cached HTML and filters. If events appear twice, identify every tool loading analytics before changing anything.
Add the outcomes your business needs
Choose a small event plan once basic collection works. A contact form should record a successful enquiry, a booking flow should record a saved reservation, and WooCommerce should send a properly formed purchase event. Enhanced measurement can collect certain interactions, but ecommerce and meaningful business outcomes need their own setup and tests.
For Niwa, agree which customer workflow you want to measure, then test its completion against the actual lead, appointment or order record. Do not label opening the assistant as a sale or assume the plugin automatically exports every action to GA4.
Already have a WordPress website? You can add the standalone Niwa assistant to WordPress. Niwa Business is USD 150 and includes a custom WordPress website or migration, hosting, maintenance and AI adaptation. Describe your site and the outcome you want to measure so the conversation starts with a concrete workflow.