To add Google Analytics to WordPress, create or select a Google Analytics property, choose a web data stream, and install its Google tag through one supported method. Check for an existing installation first so the same page view is not sent twice.
Set up the property and web stream
Follow Google's Analytics setup guide. Select the correct account, create a property if needed, and choose the reporting time zone and currency deliberately. Add a web stream for the public website address and review the measurement options. Copy the stream's measurement ID from its settings.
Connect with Site Kit
Google's Site Kit Analytics documentation describes connecting an existing account, property and stream or creating them during setup. In WordPress, open Site Kit's settings, connect Analytics, and select the intended property. Confirm whether Site Kit should place the Analytics code.
If another plugin, theme or tag manager already installs the tag, choose which integration will own it. Avoid installing the same measurement ID through multiple methods.
For a separate frontend
A WordPress plugin can insert code into WordPress-rendered pages, but a separate Next.js or other headless frontend needs its own installation. Inspect the actual public pages and verify where measurement requests go. Installing a plugin on the backend does not prove that the public frontend is tracked.
Verify collection
Visit a public page and use Analytics' Realtime report to check whether activity arrives in the intended property. Allow for processing delay. Check a second page and confirm that navigation is measured as expected. A successfully saved ID or an HTML verification file is not evidence of Analytics events reaching the property.
When troubleshooting, check consent settings, browser blockers, duplicate tags, the selected measurement ID and any internal-traffic filters. Do not disable visitors' choices to increase the numbers. Keep personally identifying data out of event names, URLs and parameters.
Measure useful actions
Decide which reader or customer actions matter, then implement and verify those events separately. Basic page-view collection does not establish that purchases, enquiries or other actions are measured correctly. Test with a controlled session and compare the received events with the actions you actually performed.












Responses (0 )