What is Event Tracking?
Event tracking analysis is a common data collection method used in website analysis.
Simply put, the main purpose of front-end event tracking is for operation and development personnel to collect user behavior data and page performance data for subsequent data analysis. For example, obtaining the page load time under various networks, or the user’s stay time on a certain page!
What is the purpose of event tracking?
In today’s era where the customer is king and the internet competition is fierce, customizing different content for each user’s preferences and deciding the product iteration direction according to user preferences has become an essential focus for internet companies. Therefore, event tracking have become an indispensable way to obtain information. So, what are the purposes of event tracking? What data do we need to collect?
Performance Monitoring
In small projects, as the number of users is not large, people think it’s okay as long as it’s passable. However, when the number of users surges, performance monitoring becomes very important. Because it allows you to know some potential problems and bugs, and iterate quickly to obtain a better user experience! Generally, we need to pay attention to a few points during performance monitoring:
White screen duration
HTTP request time of important pages
Rendering time of important pages
First screen loading duration
Some might ask, isn’t white screen duration the same as the first screen loading duration? Here, the white screen duration actually refers to the time from the request to the appearance of the UI skeleton on the page (this tests the time from the request domain name to the DNS resolution completion, returning the page skeleton), whereas the first screen loading duration refers to the time all dynamic content on the page is loaded, including the time from AJAX data to rendering on the page.
Data Monitoring
Data monitoring means being able to obtain user behavior, and we need to pay attention to a few points:
PV (Page View)
UV (Unique Visitor)
Record operating systems and browsers
Record user’s stay time on the page
Source webpage of entry to the current page (i.e., where the conversion came from)
Encapsulating Event Tracking Directives in Vue3
track.ts
file
|
|
Include in the main.ts
file
|
|
Usage:
|
|