Analytics play an important role in understanding what users are visiting your site and how long they have been on a particular page. In this section, we will be using Google Analytics to track user interactions on the site. This is one of those really easy things that you can do even outside of Web Components.
In order to start using Analytics, we need to do the following:
- Go to https://analytics.google.com/, then click on the admin button and create a new property. You will be dropped on to New Property page.
- You can then start filling out the forms on the page:
- Once you have filled in the details, and clicked on the Get Tracking ID button, you will be dropped onto the next page:
- You can use the code from the text area and put it in your index.html file.
- That's it. Now, you can simply go to the following URL and see how users are visiting...