How to Add Google Analytics to a WordPress Website with Hosting from Bluehost

You’ve been hearing a lot about the importance of website analytics these days. Everyone from small businesses to Fortune 500 companies are realizing the benefits of measuring and analyzing how their websites perform. The idea is simple: without good analytics, you’ll never know if your efforts are paying off or if you’re just wasting your time and money.

What is surprising, however, is just how easy it is to implement. You might think that getting analytics on your WordPress website would be quite the task, but in reality, the process is anything but complicated. In fact, implementing web analytics into your website is actually a piece of cake.

Let’s take a look at how you can put Google Analytics on your WordPress website with the help of a hosting provider, Bluehost. 

Choosing The Right Hosting Provider

The first step to getting Google Analytics on your website is selecting a hosting provider. You want to pick a company that offers top-notch service and support as well as includes a one-click installation of WordPress. To save you the time and effort, Bluehost is an excellent choice. Not only does it have all of the above but it also provides a free domain name and a free customer support ticket. So not only will you have a fully-functioning WordPress website in no time but you’ll also be able to get help if you ever need it. Sounds like a perfect match to me.

Installing WordPress

Once you’ve chosen your hosting provider, it’s time to install WordPress. To do this, visit the WordPress website and click on the Get a copy button to download the latest version of WordPress. You’ll see a pop-up where you can enter your email address and click on the Get button. You’ll then be taken to a confirmation page where you can enter a password. Once you’ve entered your password, click on the Verify Key button to complete the install.

What this step basically does is allows you to have a fully-functioning WordPress website that you can update at any time. So if you’ve been thinking about trying out a blogging platform, now is the perfect time to do it. You can even use the free version of WordPress and build up your audience before upgrading to a premium plan when you’re ready to launch your blog or website.

Activating Google Analytics

Once you’ve installed WordPress, it’s time to activate your Google Analytics account. To do this, click on the Admin menu in the upper-right corner and then select Settings from the drop-down menu. Once you’re in the Settings tab, under the General section, you’ll see a checkbox labeled Turn on Google Analytics. Simply hover over this box and click on the Change button to change it to On. Now when someone visits your site, they’ll see a simple popup window containing information about your website and how you used Google Analytics to build it.

This step is important because it allows you to track the visitors to your site as well as the action (or lack thereof) that they take on your site. Let’s say you’ve set up a blog about fashion trends and you want to know if the ideas you’ve been blogging about are actually working. You can click on any of the blog posts to see how they performed in terms of traffic and engagement. This way, you’ll always know if what you’re doing is paying off or if you’re just wasting your time.

Adding A Google Analytics Tracking Code To Your Website

Once you’ve activated Google Analytics, it’s time to add a Google Analytics tracking code to your website. This is a small snippet of code that will allow you to track the various activities that take place on your site. You can add this code to your website’s header or footer to track visits to different pages or posts as well as the actions (such as purchases) that your website visitors take. 

The most important thing to keep in mind when adding a Google Analytics tracking code is to make sure that you use a hiding mechanism. The reason behind this is simple: you don’t want your web visitors to know that they’ve been tracked by you (the owner of the site) and Google. You can use a variety of methods to hide the tracking code including CSS, javascript, or a combination of both. 

To add the code to your website’s header, navigate to your website’s dashboard on WordPress and then click on Settings in the upper right corner. From there, click on the Headers and Footers tab to view your website’s header information. You’ll see a space where you can type in the HTML code for your Google Analytics tracking snippet. You want to enter it between the

and

tags for the header section of your website.

While we’re on the subject of headers and footers, let’s take a quick look at the theme that we’re using for this tutorial: StudioPress. In the header of our site, you’ll see a snippet of JavaScript that loads the Google Analytics code. This is what helps the plugin automatically track our site’s traffic.

Configuring Analytics For E-commerce

If you’ve set up an e-commerce store on your site (or plan on doing so in the near future), you’ll want to take a little bit more effort to ensure that Google Analytics is collecting the correct data. The reason for this is simple: with e-commerce stores, you have multiple revenue sources (such as products purchased and affiliate fees) which you want to keep track of separately. 

To start, you’ll want to navigate to your website’s dashboard on WordPress and then click on Settings in the upper right corner. From there, click on the Traffic section to view your website’s traffic sources. As you can see, we have a mix of traffic including organic and paid visits.

What we need to do now is to determine which one of these traffic sources is the e-commerce store. To do this, we want to track a purchase from our e-commerce store using the Google Analytics Event Tracking feature. This feature allows you to track the action (such as a product purchase) that your visitors take on your site. We can set this up by clicking on Products in the Sources section of our site’s Traffic section. Doing so will take us to a new page that will allow us to select the Event that we’d like to track.

From there, we can choose Product Purchase and then, under the Settings tab, choose Continue to the next step.

Setting Up A Segment For E-commerce

The next step that we need to take is to create a segment for our e-commerce store. A segment is a group of similar visits (such as Product Purchase vs Brand Inquiry) which you can track using the Advanced Segmentation feature in Google Analytics. To set up a segment for our e-commerce store, we want to create a new segment starting with the Product Purchase event that we set up earlier. Once we’ve done this, we can click on the Save segment in the upper right corner of the page.

What this segment does is allow us to track the various actions (such as a product purchase) that our website visitors take on our store. So if we’ve set up a Product Purchase segment, we can now see the various products (including those from our e-commerce store) that our website visitors have purchased in the Analytics dashboard. This makes it much easier to track the success of our online store. As you can see from the screenshot below, we’ve been able to successfully track a product purchase from our store.

In order to get paid affiliate commissions from Clickbank, we want to make sure that our website visitors actually go to that particular website (i.e. https://shopaholic.com instead of simply typing in shopaholic.com). This can be done by creating a new filter for our website’s traffic. What we can do is choose the Traffic Source from the drop-down menu and then, under the Filter menu, choose Create a new filter. Doing so will bring up a page where we can choose the destination (in this case https://shopaholic.com) for our traffic.

By selecting the Destination option and then clicking on the Create button, we can now choose Shopaholics as the site that our website visitors will be taken to once they visit our website. This will help us verify that our affiliate commissions are being earned from the sales that are actually taking place on the site.