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:

  1. Add this file to your HTML source, following this example:
Terminal window
<script src="https://mal2u8n8zk.map.azionedge.net/274addd29ac1edb2b200a297b98581cd88465e2ee36f18cfdbdc063402063fe5.js"></script>

Alternatively, you can also:

  1. Copy the code in this file.
  2. Create a new JavaScript file with the code.
  3. Include the JavaScript file in your project folder.
    1. In this example, the file name is fingerprint-script.js
  4. Then, add it to your HTML source, following this example:
Terminal window
<script src="https://example.com/fingerprint-script.js"></script>

Where:

  • https://example.com/ is your domain.
  • fingerprint-script.js is your JavaScript file name.

Contributors