Google Analytics is very useful for anyone who has a website.
It gives you information about who uses your site and how they interact with it.
In addition, the interface is easy to understand.
You don't need an analytics background to use and navigate the service.
How to set up Google Analytics step-by-step
Google Analytics can be set up in two ways: The Global Website Tag (gtag.js) or Google Tag Manager.
The easiest way is to use The Global Website Tag.
This tutorial will focus mainly on the The Global Website Tag approach.
Step 1: Create a Google Analytics account
Go to Analytics: Create an account or sign in to Analytics
The link in the paragraph above takes you to the Google Analytics landing page.
Click the "Start for free" button.
Step 2: Enter the welcome page
After creating an account or signing in, you are welcomed to the solution.
Press the "Start measuring" button to proceed.
Step 3: Account setup
You have two decisions to make here.
Enter your account name.
Decide what data you want to share.
Click the "Next" button.
β
Step 4: Property setup
Enter a property name.
Enter your time zone.
Enter the currency that you use.
Click the "Next" button.
Step 5: Add business information
Analytics uses the information to tailor your experience.
Select your industry category.
Select business size.
Tick the boxes for how you are planning to use Analytics.
Click the "Create" button to proceed.
Step 6: Terms of Service Agreement
Read and understand the terms of service.
Tick the GDPR box and click the "I accept" button if you agree.
Step 7: Email subscriptions
Tick or uncheck all boxes.
Click the "Save" button to continue.
Step 8: Select platform
Chose the platform where you are collecting data.
Then, click the relevant platform to continue.
Step 9: Data stream setup
Enter data stream details.
The URL to your site.
The name that you want to give the stream.
Decide if you are to enable enhanced measurement or not.
Click on the "Create stream" button to continue.
Step 10: Web stream overview
Here you can see a detailed overview of the web stream.
Here are the the main takeaways from the overview.
1. Stream URL.
The Stream URL is the link to the connected site.
2. Measurement ID
The Measurement ID is the identifier for your data stream.
It has a format of G-XXXXXXX.
3. Tagging instructions
Make sure to select Global site tag.
Installing the Global site tag is the easiest and quickest way of getting it up and running.
Step 11: Global site tag (gtag.js)
Click the "Global site tag (gtag.js)" row.
Here you can see an example of a code snippet.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DNJN1PF3CS"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');
</script>
The code snippet is a script to allow Google to measure data on your site.
You can see the Measurement ID in the second last line in the code snippet.
Send this code to [email protected] so we can get it added for you.
Step 12: Test that it works
Once we've informed you that the code has been added to the site, you can now test that the analytics is working properly.
Open the URL for the site you have connected to the data stream.
Click on "Real time" on the menu to the left.
Confirm that you see yourself as an active user.
Congratulations. You have successfully enabled Google Analytics for your site!
β