Introducing the User Identification Library - FingerprintJS

Introducing the User Identification Library - FingerprintJS

Daily short news for you
  • Privacy Guides is a non-profit project aimed at providing users with insights into privacy rights, while also recommending best practices or tools to help reclaim privacy in the world of the Internet.

    There are many great articles here, and I will take the example of three concepts that are often confused or misrepresented: Privacy, Security, and Anonymity. While many people who oppose privacy argue that a person does not need privacy if they have 'nothing to hide.' 'This is a dangerous misconception, as it creates the impression that those who demand privacy must be deviant, criminal, or wrongdoers.' - Why Privacy Matters.

    » Read more
  • There is a wonderful place to learn, or if you're stuck in the thought that there's nothing left to learn, then the comments over at Hacker News are just for you.

    Y Combinator - the company behind Hacker News focuses on venture capital investments for startups in Silicon Valley, so it’s no surprise that there are many brilliant minds commenting here. But their casual discussions provide us with keywords that can open up many new insights.

    Don't believe it? Just scroll a bit, click on a post that matches your interests, check out the comments, and don’t forget to grab a cup of coffee next to you ☕️

    » Read more
  • Just got played by my buddy Turso. The server suddenly crashed, and checking the logs revealed a lot of errors:

    Operation was blocked LibsqlError: PROXY_ERROR: error executing a request on the primary

    Suspicious, I went to the Turso admin panel and saw the statistics showing that I had executed over 500 million write commands!? At that moment, I was like, "What the heck? Am I being DDoSed? But there's no way I could have written 500 million."

    Turso offers users free monthly limits of 1 billion read requests and 25 million write requests, yet I had written over 500 million. Does that seem unreasonable to everyone? 😆. But the server was down, and should I really spend money to get it back online? Roughly calculating, 500M would cost about $500.

    After that, I went to the Discord channel seeking help, and very quickly someone came in to assist me, and just a few minutes later they informed me that the error was on their side and had restored the service for me. Truly, in the midst of misfortune, there’s good fortune; what I love most about this service is the quick support like this 🙏

    » Read more

Problem

We always want to know how many people are using our website, track visits, or identify unique users.

One simple way to do that is to require users to log in, which allows us to easily capture sessions through the user ID stored in the system. This method works well, but it's not always possible to get users to log in. Therefore, we need to find an alternative solution to identify users.

What is FingerprintJS

FingerprintJS is a library that provides the most accurate device identification for mobile and web devices. FingerprintJS supports cross-platform identification from Android, iOS to web browsers.

We know that the browser acts as a bridge for users to access websites. The browser itself contains a lot of information about itself as well as user information, such as browser type, version, display size, operating system, IP address, and much more. Visit https://coveryourtracks.eff.org to learn more about the information that browsers can "fetch" from you. This information, if successfully exploited and processed, can provide a unique identification for the user currently using it.

We may have encountered the need to identify users without using the login feature. Therefore, we need a way to mark whether a user has used the application before or not. A simple method is to generate a random identification string and store it in the cache. This method is quick and easy, but if the cache is cleared, everything will start from scratch. Therefore, we need a better user identification solution.

You can create your own algorithm to generate identification based on the data collected from the browser, or you can use the FingerprintJS library to do so. FingerprintJS has two versions: Open Source and Pro. According to their claims, the Open Source version has an accuracy of up to 60%, while the Pro version has an accuracy of up to 99.5%. However, when using the Pro version, you need to make requests to FingerprintJS's server to perform the identification process and there is a limit of 20,000 requests per month. If you exceed this limit, you will need to pay extra to use the service.

FingerprintJS will calculate based on the collected data to generate a user identification string like this:

x6e9RzbUC2P96yckcMih

How to Use

FingerprintJS provides various ways to use it.

Using a CDN:

  const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3')
    .then(FingerprintJS => FingerprintJS.load())

  fpPromise
    .then(fp => fp.get())
    .then(result => console.log(result.visitorId))

Or through npm:

npm i @fingerprintjs/fingerprintjs
import FingerprintJS from '@fingerprintjs/fingerprintjs'

const fpPromise = FingerprintJS.load();

(async () => {
  const fp = await fpPromise
  const result = await fp.get()
  console.log(result.visitorId)
})()

To use the Pro version, you need to sign up for an account on FingerprintJS, and the system will display the tracking code to be added to your website.

FingerprintJS tracking code

Summary

FingerprintJS is a solution for quickly and accurately identifying users without requiring them to log in. My blog also uses FingerprintJS to provide the best experience for readers. If your next project requires user tracking without login, then you know what to do, right.

Premium
Hello

5 profound lessons

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? Click now!

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? Click now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (2)

Leave a comment...
Avatar
Ẩn danh1 year ago
Lúc trước mình nhớ bên này ra mắt tool anti browers mà nhỉ giờ tìm mãi không ra hay do nó đổi thành dự án này rồi nhỉ
Reply
Avatar
Xuân Hoài Tống1 year ago
Thế ạ, mình cũng chỉ nghe đến thư viện này giúp định danh trình duyệt. Nhưng vừa rồi họ mới chấm dứt bản miễn phí và bắt trả phí rồi, thế là đành phải chuyển qua phiên bản open source với độ chính xác thấp hơn chỉ khoảng 60% theo họ nói.
Avatar
Gin Na2 years ago
@gif [tIeCLkB8geYtW] Thư viện hay, phải login vào cmt cho bạn
Reply
Avatar
Xuân Hoài Tống2 years ago
Cảm ơn bạn đã tạo động lực cho mình