## 6 User Tracking and Profiling Techniques  
Long gone are the days when advertisers would select a form of media to display ads without taking into consideration their actual audience [6]. Nowadays, we live in the era of customized ads, where advertisers are not only required to select specific users for specific ads based on the users' preferences and interests, but they are expected to do so in real-time. As a result of this evolution, the concept of user profiling, i.e., a collection of most significant facts about a given user and his/her interests [18], has emerged. The most common way to collect information about a user (i.e., build a user profile) is by tracking the user's online behavior, including the type and sequence of visited pages, over some time. In the research literature, several studies have looked into user profiling within the context of digital advertising. For example, in [19], the authors have described a targeted advertisement system that performs matching between the user profile and the page profile. The system creates a user profile in a multi-step process by integrating user-related information from multiple sources. Several user profiling approaches, including its related concepts, methods, and techniques, have also been discussed in [20, 21, 22, 23]. These techniques comprise data mining and machine learning methods to extrapolate users' information. The booming of Online Social Networks and IoT technologies have provided new avenues to collect data from users' actions. Technical mechanisms that facilitate online user tracking can be categorized in four major groups [24]: (1) Session-based, (2) Storage-based, (3) Cache-based, and (4) Fingerprinting. 1. Session-Based Tracking: A web session is defined as a sequence of user actions on an individual website within a given time frame. The purpose of session-based tracking is to facilitate the monitoring of user actions across multiple visited websites and/or over a longer interval of time. One common form of session-based tracking, called Session Identifiers Stored in Hidden Fields [25, 26], involves passing a single identifier from one website to another through a URL. Another form of session-based tracking, called Explicit Web-Form Authentication [27, 28], happens when a user logs in to a website and is asked to register before accessing the resources. In the third form of session-based tracking, window.name document object model (DOM) property [29] can be used to store data and be shared and applied by different visited parties/sites. Basically, the W3C Document Object Model (DOM) [30] is a cross-platform interface to access and interact with the content, structure, and style of web documents. It organizes all the objects in a tree structure, and it is language independent. The window.name property is resistant to page reloads, and it is accessible from other domains as well, which allows third-party content to exchange information with the first-party or with another third-party content [24]. 2. Storage-based Tracking. Cookies, also known as HTTP cookies, are the most common method in this category. A cookie is a small piece of data (i.e., identifier) generated by a web server the first time a user visits the website hosted by this server. The identifier is then sent to be stored in the client's memory and retrieved each time the user visits the same website. It should be noted that a single website can incorporate content from multiple servers; thus, two different types of cookies are defined--first party and third-party cookies [31]. The first party cookies are set by first party servers directly associated with the URL of the page that the user has explicitly requested. The third-party cookies are widely used by advertising companies and are received when the browser implicitly fetches the third-party content (such as video ads) from a third-party server. Cookies can also be classified in terms of their life span into temporary and permanent cookies.