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

@adv-ui/vendor-by-consents-loader

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adv-ui/vendor-by-consents-loader

Load vendors according to the allowed user's consents

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
decreased by-10.9%
Maintainers
2
Weekly downloads
 
Created
Source

⚠️ Important: This is a work in progress package that could face changes. Please, use the exact semantic version until it gets to 1.0.0 package version

Vendor by Consents Loader

Utilities to load vendors scripts according to user consents.

Loading list of vendors

import {initVendorConsentsLoader, addVendorLoadedEventListener} from '@adv-ui/vendor-by-consents-loader'

const OPTIMIZELY_KEY = 'optimizely'

initVendorConsentsLoader({
  vendors: {
    tealium: {
      script: 'https://frtassets.fotocasa.es/external-scripts/utag-pro.js',
      consents: {
        purposes: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
        specialFeatureOptins: [1]
      }
    },
    [OPTIMIZELY_KEY]: {
      script: 'https://frtassets.fotocasa.es/external-scripts/optimizely.js',
      consents: {
        purposes: [1, 2]
      }
    }
  }
})

addVendorLoadedEventListener(({vendor}) => {
  vendor === OPTIMIZELY_KEY && console.log('Optimizely has been loaded')
})

Loading specific vendors

Some vendors are used across all Adevinta Spain products and, for sake of convenience, they've their own script to load them.

Comscore

import {
  addVendorLoadedEventListener,
  loadComscore
} from '@adv-ui/vendor-by-consents-loader'

loadComscore({comscoreClientId: '7109919'})

addVendorLoadedEventListener(({vendor}) => {
  vendor === 'comscore' && console.log('Comscore has been loaded')
})

List of Purposes

Purposes:

  • 1 - Store and/or access information on a device
  • 2 - Select basic ads
  • 3 - Create a personalised ads profile
  • 4 - Select personalised ads
  • 5 - Create a personalised content profile
  • 6 - Select personalised content
  • 7 - Measure ad performance
  • 8 - Measure content performance
  • 9 - Apply market research to generate audience insights
  • 10 - Develop and improve products

Special Purposes

  • SP1 - Ensure security, prevent fraud, and debug
  • SP2 - Technically deliver ads or content

Features

  • F1 - Match and combine offline data sources
  • F2 - Link different devices
  • F3 - Receive and use automatically-sent device characteristics for identification

Special Features

  • SF1 - Use precise geolocation data
  • SF2 - Actively scan device characteristics for identification

FAQs

Package last updated on 20 Oct 2020

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