How to install the Javascript Tag (JS TAG) through Azion
The Javascript Tag (JS TAG) is composed of a browser-level script, a JavaScript code that must be added to the web page. It captures data about the browser and sets it as a session cookie named _azfp_sc
, so this data is always sent by the browser.
Embedding the script
The browser script is a JavaScript code that runs on the web page you want to fingerprint, a process also known as JavaScript injection. It captures multiple data from the web browser:
- Audio and video support
- Canvas rendering
- If the browser has access to device-level API, such as accelerometer and gyroscope
- Manufacturer’s data
- Timezone
- WebGL rendering
Then, it creates a unique identifier containing all this information and sets it as a session cookie named _azfp_sc
, as cookies are always sent in the requests made by the browser. The script checks if the session cookie already exists. If so, it won’t create a new one.
Azion provides a code sample for this JavaScript injection that you can include in your project. To do so:
- Add this file to your HTML source, following this example:
Alternatively, you can also:
- Copy the code in this file.
- Create a new JavaScript file with the code.
- Include the JavaScript file in your project folder.
- In this example, the file name is
fingerprint-script.js
- In this example, the file name is
- Then, add it to your HTML source, following this example:
Where:
https://example.com/
is your domain.fingerprint-script.js
is your JavaScript file name.