Getting Started with Google Analytics by Eli Davis - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

Tracking Code Installation

Google Analytics works thanks to a tracking code snippet. You can find this code along with your tracking ID:

img18.png

Have a look at the script above. To make it work, you’ll need to insert it into every page that you want to track. To do it the hard way, you can find your website’s source HTML file (.html or .htm) and paste the code right before the </head> tag. Sounds too techy? Luckily, there are easier ways to do this.

As a matter of fact, very few people insert tracking scripts directly into the site’s code. Instead, they install Google Analytics plugins (like the one from Yoast) or use the functionality provided by their content management system or e-commerce platform. For instance, Cherry Framework and similar WordPress frameworks have dedicated fields for Google Analytics code:

img19.png