@govuk-one-login/frontend-device-intelligence
v1.2.0
Published
Frontend Device Intelligence package for GDS One Login
Readme
About The Project
The GDS One Login Device Intelligence node package is a shared, reusable nunjuck component created to facilitate the integration of fingerprinting for analysis.
The purpose of this package is to make it as easy as possible for the various pods that make up the One Login journey to collect data in identifying a unique visitor correctly.
The package is owned by the DI Frontend Capability team, part of the development of this package involves ongoing discovery with the pods responsible for maintaining the frontend repositories that make up the One Login journey. As more information is collated, the package and documentation will be updated. As such, it is considered a WIP and the pods will be notified when a stable release is ready.
Getting Started
Prerequisites and Installation
Top level of the monorepo:
npm install
npm run buildOr Add to your project using npm i @govuk-one-login/frontend-device-intelligence
Testing
To test the Device Intelligence package in the One Login Frontend monorepo, follow these steps:
<script src="/fingerprint/index.js"></script>
<script>
console.log(window.ThumbmarkJS.getFingerprint())
console.log(window.ThumbmarkJS.getFingerprintData())
console.log(window.ThumbmarkJS.setFingerprintCookie())
</script> {
file: "build/iife/index.js",
format: "iife",
name: "ThumbmarkJS"
}Developing the package
See monorepo instructions for building, testing, and publishing packages.
