Google Analytics is a popular easy to install and use statistics and reporting tool that you can add to your website (and it’ free)
To setup, Google Analytics go to https://analytics.google.com/analytics/web/ and create an account. From here you can add a site and generate a tracking ID.
The website tracking code was (I changed the code to 555555555).
ga('create', 'UA-555555555-1', 'auto');
I opened WordPress and went to Appearance then Editor and selected header.php and added the tracking code under the <head> HTML tag.
This tracking ID allows Google to generate stats from your visitors.
I was unable to update the file in WordPress until I set permissions in Ubuntu in (Read these guide to setup an Ubuntu Server on Vultr for as low as $2.5 a month of setup a $5 a month with Digital Ocean or AWS). I have guides on moving WordPress here or setting up WordPress from the command line here). If you update WordPress you may need to re add the tracking ID.
sudo chmod 666 /www/wp-content/themes/twentyseventeen/header.php
I loaded my WordPress website and verified that the tracking code was loading in the HTML source. You can also embed the tracking code in static HTML websites.
After a few days, you can view your sites statistics. from the Googe Analytics home portal. This will allow you know when to publish, know how popular your content is, know what new content to create etc.
The best feature of Google Analytics is page hit information. To me, the total number of hits is less important than Avg. Time on Page and Bounce Rate.
The Google Analytics dashboard home is very informative.
Google Analytics Terms
Google has a glossary for terms here.
- Users – The unique user that visited your site.
- Bounce Rate – The percentage or users who loaded your site and left after viewing the initial page.
- Active Users – The total number of active users reading your site.
- User Retention – The percentage of users who have returned to your site.
- Device – The device (Desktop, tablet or mobile device) that was used to read your site.
- Organic Search – The number of users who found your site via a search engine. Having a highly efficient SEO will see a higher Organic search percentage.
- Sessions – The number of unique sessions that your users have accessed your site.
- Direct – The times a user has directly typed your website URL (or have visited your site in incognito/privacy mode).
- Referral – The percentage or know referrals from other websites.
- Social – Known number of visits to our site from social media platforms.
You can watch in real-time users accessing your site. This is important when you send out mailing list to users when new content is posted, will 1,000 visitors take down your site? Are you posting at the right time for your sites visitors timezone?
This report will tell you a lot about who and where people are visiting your site form and what language they speak, OS they use, what browser they use and what city they are from.
Google Analytics allows you to drill down on most captured data.
I can see Apple devices are the most popular mobile devices accessing my site (but mobile devices in total only take up 12 % of my site’s traffic).
The User Flow report is a great way to see how people interact with your site (where they come from, what they do and where they drop out).
Google Analytics has a handy page speed tool that you can use to identify what you need to do to speed up your site.
Google Analytics have goals that allow you to set targets to meet. Usually, Google encourages you to assign a monetary value to a goal then suggest you buy Google Ad’s to achieve these goals (this is why Google Analytics is free). Read my guide on setting up Google AdWords on your WordPress blog.
You can set email alerts on key stats.
More to come later.
Donate and make this blog better
Ask a question or recommend an article
v1.1 added page hits information