Inserting the snippet of tracking code into the web page code

Figure 1 shows the tracking code created by Google Analytics inserted into the HTML file that generates the home page of our website. It is highlighted in yellow.

That’s it! As a website owner all we had to do was let Google Analytics generate the tracking code, and then cut-and-paste it into the HTML file for our web page.

Figure 1. The Google Analytics tracking code is highlighted in yellow The web page code seen in Step 1.8 with Google Analytics code inserted, highlighted in yellow

In order to monitor the whole site the same tracking code was put into each of its three pages in a similar way.

What do you think?

Even if you don’t know much about coding, did you catch the main point that it is easy to generate Google Analytics tracking code, and cut-and-paste it into a website? Was the explanation easy to follow?

Share this article:

This article is from the free online course:

Introduction to Data Science with Google Analytics: Bridging Business and Technical Experts

UNESCO UNITWIN Complex Systems Digital Campus