Google Analytics gives you insight into how your site is performing, user behavior, demographics, and many other valuable reporting tools that will help you improve your site. There is even built in integration with many of Google’s other services such as Google AdWords and Google Search Console.
Ask any webmaster out there and they will tell you that Analytics is a must. The benefits undoubtedly outweigh the cost, especially considering that the standard version is free. A more robust version does exist, Google Analytics 360, which is recommended for “larger enterprises that need it all.” While I feel bad leaving out the “larger enterprises”, I’m going to mainly focus on the standard, free Google Analytics for this tutorial.
So, now that your mind is made up to use this extremely useful, free service, let’s dive into how to install it on your website.
Setting Up Google Analytics in Three Steps
Step 1: Signing Up
Head over to the Google Analytics Home Page and click the green Sign Up For Free button in the top right of the page.
Click the grey Sign up button on the right side of the screen.
Now, it’s time to set up your account. Fill out the form on this page including your Account Name, Website Name, Website URL, Industry Category, and Reporting Time Zone.
The Data Sharing Settings are up to you, but I recommend leaving them all checked.
You did it! Your account is created and Step 1 is out of the way.
Step 2: Installing the Code
Scroll down the page until you see the Website Tracking section.
Simply copy and paste this code between the <head></head> tags of every webpage that you would like to track.
Step 3: Setting up a Goal
Since you just set up your Analytics, you’re not going to have any data to look at yet, but you can get started by setting up a goal. A goal is a way to measure user behavior on your site. For the purpose of this tutorial, we’ll be using Form Submission as our goal.
Unfortunately, Form Submission isn’t a preset goal option on Analytics. Since we can’t just make the actual submit button our goal, we’re going to get creative by using a thank you page.
Create a thank you page that the user is redirected to after submitting a form on your website. With this setup, anyone that submits the form will end up on the thank you page, allowing us to make visiting the thank you page our goal. Ensure that the thank you page isn’t linked to from any other location so that your results are accurate. If you have multiple form submission that you’d like to track, create multiple thank you pages to track the performance individually.
Once the thank you page and redirect are complete, go to the home page of your Google Analytics.
Click the Admin button found in the bottom left of the page.
Select the Goals button found in the middle of the third column.
Click the red New Goal button.
Leave Template selected for Goal setup and hit the blue Continue button.
Now it’s time to name your goal. Try to make the name as descriptive as possible. For example, I’m not going to name my goal Form Submission because my site has more than one form that it could possibly be describing. Since I’m specifically tracking the number of people that submit a from my Contact Us page, I’m naming my goal Contact Us Form Submissions.
You can leave the Goal ID untouched and choose Destination for the goal type.
Click the blue Continue button.
Select Begins with under Destination because we’ve all seen URLs that look like https://justincollier.com/thank-you/?=XXXXXXX, so it will track the goal even if something like that happens.
Enter the domain path (/thank-you) of your new thank you page. There’s no need to include your root domain (justincollier.com).
Image created by DOEPUD.
Click the blue Save button.
That’s it! You can now track your goals under Admin > Goals right under the red New Goals button.
Installing Google Analytics on WordPress Without Code
Okay, I know what some of you are thinking. Code is scary and this was supposed to be an easy task. I assure you that copy/pasting that code in between the <head></head> tags of your website is simple and that you’re selling yourself short, but there is a way to bypass Step 2. If you’re using WordPress, many themes include a field where you can install Google Analytics without editing any code. If your theme doesn’t have this option, consider checking out these three plugins that should help you install Google Analytics code:
Verify that the Code is Installed
To ensure that this process worked, go to whichever webpage you would like to check, right click, and choose View page source.
If you see a bunch of coding mumbo-jumbo, you’re at the right place.
Press CTRL+F or COMMAND+F and type “Analytics” into the search bar.
If you see the tracking code that you just submitted, you’ve done it correctly – give yourself a pat on the back.