Google Analytics 4 (GA4) Best Practices
April 5, 2022
If you have logged in to your Google Analytics account recently, you may have seen that Google has announced that they are sunsetting Universal Analytics as of July 23, 2023. That means that Universal Analytics will stop importing and processing any new data on that date, but you will still have access to historical data even after that date. To keep receiving data after that date, you will need to implement GA4.
While it may seem like that cut-off date is far in the future, it would be best to have historical data in GA4 by the time it becomes mandatory to start using it. We recommend that you set it up now, even if you simply run it alongside your Universal Analytics implementation.
GA4 Set-up and Best Practices.
Turning GA4 on is simple (instructions for getting started are linked above). There are several GA4 best practices that should be implemented during setup for optimal data collection and processing.
Data Retention Settings
Under Universal Analytics, many were used to almost unlimited access to historical data. However, data retention has been significantly limited. By default, user event data is retained for only 2 months. This timeline resets whenever a user comes back to your site, but 2 months is a very short timeline. Follow these 2 ways to retain your data for a longer period of time as part of GA4 best practices:
- Switch Data retention time to 14 months
- From your GA4 dashboard, go to Settings > Data Settings > Data Retention
- In the Event data retention drop-down menu, select “14 Months” and save
- Link GA4 to BigQuery, Google’s database system. This allows you to keep user event data until you manually delete it.
Set up Internal Traffic Filter
Another GA4 best practice is to keep your data accurate. It’s best to filter out internal traffic, or traffic to your website coming from you or your employees. In order to do this, navigate to:
Settings > Data Streams > [Your Data Stream] > More Tagging Settings > Define Internal Traffic
Now you need to find your IP address. If you are at your place of work, click “Create” and then click the “What’s my IP Address?” link. This will open a google search, and your public IP address will appear at the top. Then you will need to copy this number and go back to Analytics.
Name the rule something descriptive so that you know what it is later. Under the IP Address match type, choose “IP address equals” and then paste your IP address in as the value. If your company has several locations, repeat this process for each location – you will need to get the IP address from someone who is physically at each location and using the company-provided internet (not their own mobile data).
Set Up Custom Events in GA4
If you are familiar with events in Universal Analytics, you will likely want to set up custom events in GA4 as well. Events can be set up using native GA4 event tagging, Google Tag Manager, or any other tagging software. Once you have set up your events, it is important to make sure that GA4 can process them. To do that, you will want to set up custom events.
To set up custom events, navigate to your GA4 dashboard, and then go to:
Configure > Events
You will see a list of the default events (click, first_visit, page_view, etc.). Click the “Create Event” button, and on the next screen, click “Create.” Name the event however you want but keep it descriptive. Next, the event name value should match exactly the name you gave your event in your tagging, and it should contain no spaces.
Add any other conditions (parameters) as you see fit, though only the event name is required.
Save your custom event.
Set Up Custom Dimensions
If you set up custom events, you will likely be sending other parameters along with your events (purchase total, form names, page URL, etc.). These will need to be registered on GA4 using custom dimensions. In order to set these up, go to:
Configure > Custom Dimensions > Create custom dimensions
Name the dimension something descriptive – at BrandCraft, we keep this name the same as the actual parameter. Add a description if desired. In the Event Parameter box, enter your event parameter exactly as it appears in your event tag. Once you have at least the name and event parameter, click save. Your dimension is now registered!
Connect to Other Google Properties
Like Universal Analytics, you can connect GA4 to Search Console and Google Ads. To make these connections, go to Settings. Under the “Property” column, Scroll down to the “Product Links” section. There are several services you can connect to here, including Search Console, Google Ads, and BigQuery. Next, select each one you wish to connect to and follow the on-screen instructions to connect the GA4 property with its corresponding properties across Google services.
We’re Here to Help You Implement GA4 Best Practices
If you have been on the fence about switching, we hope these GA4 best practices sway you to make the switch. If you need help, reach out to BrandCraft, and our Google Analytics Experts can help get you set up for optimal data collection.