How to Setup Google Analytics 4 for a WordPress Website
Important: Universal Analytics is being phased out. Starting July 1, 2023, standard Universal Analytics properties will cease to process data. To ensure uninterrupted tracking and make the most out of your WordPress website analytics, you must transition to Google Analytics 4 (GA4) before this deadline.
Table of contents
Creating a GA4 Property
- Navigate to the Google Analytics homepage and sign in.
- Click on the “Admin” tab in the top right corner.
- In the “Property” section, select “Create Property”.
- Input the necessary details such as the property name, timezone, currency, and confirm your industry and business size.
- Select your intended GA4 use cases and finalize the process by clicking “Create”.
Adding a Web Data Stream
- Under your newly created property, select “Data Streams” and then “Add Stream”.
- Choose “Web” as the stream type and input your website URL.
- Assign a name to the data stream for easy identification in the future.
- Enable the “Enhanced measurement” option and then click “Create Stream”.
Installing the Site Kit Plugin
- In your WordPress dashboard, go to Plugins > Add New.
- Search for “Site Kit” and click “Install Now” on the ‘Site Kit by Google’ listing.
- Activate the plugin by clicking “Activate Plugin”.
Connecting Your GA4 Property
- In your WordPress dashboard, navigate to Site Kit > Dashboard.
- Click “Connect Service” under the Analytics section and sign in.
- Select your new GA4 property from the dropdown menu and click “Configure Analytics”.
(Optional) Removing the Old Analytics Code
This step is only necessary if you previously used Universal Analytics on your site. If you are setting up Google Analytics for the first time, you can disregard this step.
- After setting up GA4, remove the Universal Analytics code from your site. The Site Kit will now track your site using your newly created GA4 property.
Congratulations! You have successfully set up Google Analytics 4 on your WordPress site!
Contact us if you’re uncertain about any step or prefer someone else to handle the migration process. We’re here to support you.