Setting up tracking scripts for Google Analytics can be frustrating. Even more frustrating is thinking it’s installed and good to go, then finding out months later it hasn’t collected any data. Here are several ways to check if Google Analytics is working correctly.
Use Realtime Reports to Check Web Traffic
If you just set up Google analytics for the first time, it's going to take about 1 to 2 days to show web traffic in your reports. However, you can see if it's working properly or not immediately if you check the real-time reports. This is the fastest and most convenient way to double check that GA is working correctly.
In order to access these reports, go to your GA4 property, then under Reports click on Realtime. If you're using Universal Analytics, look under Realtime and click Overview. If your IP hasn’t been excluded, it should show pageviews when you or others visit your site.
Google Tag Assistant Tool
The Realtime report can tell if there is tracking data, however it can't specifically tell you if there's a duplicate tracking code installed and data is being reported twice.
If you used Google Tag manager, you may want to check for duplicate tags on your site. Check out the Google Tag Assistance tool at https://tagassistant.google.com/. You can use the website to check a domain, or if you have many domains to check, there is a chrome extension.
Click Add domain and enter your domain to check. After clicking Connect, a new window of the domain you entered will open. Leave this open and out of the way or minimize it to see the Tag Assistant tool working.
Check Source Code for the Analytics Tracking Code
A quick and simple way to verify if analytics is working is to view the source code then using Ctrl+F (Command+F for Macs) to find it. This option is best for someone who is not afraid of looking at code.
First, right click the page and select View Page Source or press Ctrl+U. From here you can Find (Ctrl+F) the code. It should look something like this for users with Universal Analytics. GA4 tracking is similar but slightly different:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-1337814885-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-1337941315-1');
setTimeout("gtag('event', 'No Bounce', { 'event_category' : 'Adjusted Bounce' })",20000);
</script>
Google Analytics Debugger
If you'd like to use a different extension, this is a popular dev tool straight from Google. Once installed, you can enable the Analytics debug mode by clicking the extension icon in the extension bar. Next, go to your website and right click on empty page space and click Inspect.
Then click on the Console tab and where gtag.js is spelled out big in ASCII like an old-school text file, then you know your tag is installed. Like this:
_ _
| | (_)
__ _| |_ __ _ __ _ _ ___
/ _` | __/ _` |/ _` | | / __|
| (_| | || (_| | (_| |_| \__ \
\__, |\__\__,_|\__, (_) |___/
__/ | __/ |_/ |
|___/ |___/|__/
Or if Universal Analytics is installed, it will spell "google analytics":
Hopefully this helped you verify your tracking data is working. If you’re interested in boosting your business’ online success, get in touch with us.