I am trying to load fingerprintjs script in a google chrome browser where Ublock origin is enabled but it's impossible with my current situation :
<script> // Initialize the agent at application startup. const fpPromise = import('https://fpcdn.io/v3/your-public-api-key')
.then(FingerprintJS => FingerprintJS.load({
endpoint: 'https://fp.yourdomain.com' }));
// When you need the visitor identifier: fpPromise .then(fp => fp.get())
.then(result => console.log(result.visitorId));
</script>
At the page load, my browser's console shows :
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://fpcdn.io/v3/your-public-api-key
Some people suggest to use cloudflare workers to evade Ublock restrictions. But I never used cloudflare I just started my first worker now :
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
return new Response("Hello world")
}
How can I use this workers to get my visitorId
?
This feature will be released in a couple of weeks and will be part of the product. Nevertheless, there's a public beta that requires some manual steps. If you are interested, reach out to the official support: [email protected]