Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fingerprintjs/fingerprintjs-pro-gtm

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fingerprintjs/fingerprintjs-pro-gtm

FingerprintJS pro version adapter for Google Tag Manager

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-0.28%
Maintainers
2
Weekly downloads
 
Created
Source

FingerprintJS

<Place for badges>

Adapter for FingerprintJS Pro JS agent to use in Google Tag Manager (GTM) template. GTM uses javascript subset that doesn't support Pomises and this is the reason for this library.

Example of usage

TODO: add link to GTM template when it will be ready

In GTM template use code like this:

const injectScript = require('injectScript');
const callInWindow = require('callInWindow');

const onSuccess = () => {
  const onFpJsLoad = (result) => {
    const dataLayerPush = createQueue('dataLayer');
    dataLayerPush({
      event: 'FingerprintJS.loaded',
      visitorId: result.visitorId
    });
    data.gtmOnSuccess();
  };

  callInWindow('FingerprintjsProGTM.load', {apiKey: data.apiKey}, onFpJsLoad);
};

// If the script fails to load, log a message and signal failure
const onFailure = () => {
  data.gtmOnFailure();
};

injectScript(url, onSuccess, onFailure);

FAQs

Package last updated on 22 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc