Getting Started
Bootstrap The Website Application
Bootstrap The REST API Application
User Functionality
Item Functionality
Comment Functionality
Search Functionality
Moderator Functionality
Informational Pages
Deploy The Application
Post Deployment Tasks / Configure Google Analytics / Add The Measuring ID To The Website

Add The Measuring ID To The Website

Now we're ready to get Google Analytics tracking your website using the measurement ID we received in the last step.

To do this, we'll first get the measurement ID added to each page on the website. Then, we'll deploy the code changes to production and verify that the data is tracking correctly in the Google Analytics dashboard.

Let's get it done!

Add The Measurement ID To Your Website

Each time a page loads on your website, we'll want to call a script that sends data about the user to Google Analytics. Your unique measurement ID we obtained in the last section needs to be included in that script.

To do this, open your website project folder and navigate to the /components directory:

Get full access to the course materials.
In preview mode, the rest of the course materials are hidden.
⚠️ In preview mode some course materials are hidden. For full access 👉
Getting Started
Bootstrap The Website Application
Bootstrap The REST API Application
User Functionality
Item Functionality
Comment Functionality
Search Functionality
Moderator Functionality
Informational Pages
Deploy The Application