Detailed Explanation of UV Monitoring and Canvas Fingerprint Tracking Technology

  • what is buried point

    • Burying points can be understood as collecting user data, and judging user preferences through data processing, analysis and mining, such as which page stays longer and which thing is browsed more.
  • What is UV monitoring

    • In fact, it is the access record of the website, including PV, UV
      • PV, PageView, total page visits, every time a user visits the website will be recorded
      • UV, Unique Visitor, page views, one client can only be counted as one visitor.
  • Methods of UV monitoring

    • After the user logs in, the background returns a userId, and judges whether it is a user based on the userId
      • Cons: Users cannot monitor without logging in
    • Use cookies to track user behavior
      • Disadvantages: Users can disable cookies and cannot access across domains.
    • use navigator
      • Disadvantage: the identification is not unique, and it is impossible to judge whether it is the same client
    • canvas fingerprint tracking
      • Disadvantage: The fingerprint can be modified through a plug-in, but it is more powerful than the above method
  • navigator fingerprint

    • Navigator can provide many fingerprints, such as user agent userAgent, operating system platform, etc., but these are relatively common and uniqueness cannot be judged.

  • canvas fingerprint
    • Practicality
      • When browsing some websites, such as a certain shopping mall, without logging in, you often browse some products, and when you enter again next time, some personalized recommendations will be generated.
    • The toDataURL method generates canvas fingerprints
      • This is a method of canvas that converts the canvas object to base64 encoding
      • When we use canvas to generate canvas images, different browsers use different image processing engines and different compression levels. Different operating systems will also use different settings and algorithms for anti-aliasing and sub-pixel rendering, which will result in different generated pictures (invisible to the naked eye), and the generated base64 encoding is completely different. Then, if you want to generate a unique fingerprint , the operating systems, device information, and browser information of the two users must be exactly the same. Compared with the navigator fingerprint, the repetition probability can be said to be extremely low.
    • the case
      • Google Chrome, Edge, Firefox

 

 

  • Generate canvas fingerprint
const fingerprint  = ()=>{
    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');
    const contentTxt = 'canvasFingerprint';
    ctx.fillText(contentTxt, 50, 50)
    return canvas.toDataURL()
}
fingerprint()
  • How to prevent canvas fingerprinting
    • Use browser add-ons such as Firefox's Enhanced Tracking Protection add-on, Google Chrome's CanvasFingerprintBlock

    • Forbid web pages to use js (may lose some functionality)

Guess you like

Origin blog.csdn.net/qq_28174545/article/details/130111811