To measure a website’s performance, it is essential to have a tool that can track its daily activities. The Google Analytics tool can assist you in improving the performance of your WordPress website.
You can track visitors, traffic, goal completions, average session durations, bounce rates, users, page views, and more using GA. Here are the steps you need to follow to connect GA4 to WordPress:
Go to the GA home page and enter your credentials to log into your Google Analytics account. In case you do not have a GA account, you need to create one first and then you can log in and follow the below steps to connect GA4 to WP.
From GA’s dashboard, click the ‘settings’ icon in the left panel, and you’ll see an interface like the one below.
You can create a property if you already have an account by clicking the ‘Create Property’ button under the ‘Admin’ tab. In case you do not have an account, you need to click on the ‘Create Account’ button.
Since this step is on how to set up a new GA4 property, we will proceed with creating a property option.
Once you have the ‘property setup’ interface open as seen in the below image, you need to fill in all the required fields with relevant information. Once done, click the ‘Next’ button to proceed further. Towards the end, click on the ‘Create’ button to create your property.
Once the property is created, select the ‘Web’ option under the ‘Data Streams’ section. There are two more options, namely, the Android app and the iOS app. Your selection of the data stream depends on the property.
Once you have selected the data stream option to ‘web’ you need to enter the ‘website URL’ and ‘stream name’ and click on the ‘Create stream’ button.
As soon as the stream is created, you can go back and integrate the existing GA property with GA4.
You can do so by selecting the UA Property in the drop-down, under the ‘Admin’ section.
Next, you need to select the ‘Tracking Code’ option as shown in the below image. Once a code appears, make sure to note it down for further use.
You now need to switch back to the new GA4 property from the drop-down list and select the stream that you created under step 4 and click on it.
Under the ‘Additional Settings’ section, click on the ‘Connected Site Tags’ option. At the place where you are asked to ‘Connect a tag’, enter the tracking ID (noted down from earlier) and click on ‘Connect’.
Once you are done with the Google Analytics steps, you need to now add the tracking code on your WordPress website backend.
For this, you will need the tracking code from GA. Copy the code from ‘Global Site Tag’, which can be found under your web stream.
To add the code on WordPress, you need to log in to the backend and paste the code in the <head> section as mentioned in GA. This can be done either using a plugin or by going to the ‘theme’ option. You then need to save the changes.
Finding the above steps too technical? Reposition can assist you with connecting GA4 to WordPress. Our team of experts will assist you with setting up your GA4 property, switching your existing property to GA4 and connecting GA4 to your website.