Giter Site home page Giter Site logo

id5io / id5-api.js Goto Github PK

View Code? Open in Web Editor NEW
25.0 11.0 10.0 4.38 MB

The ID5 Universal ID is a shared, neutral identifier that publishers and ad tech platforms can use to recognise users even in environments where 3rd party cookies are not available. The ID5 API is designed to make accessing the ID5 Universal ID simple for publishers and their ad tech vendors.

Home Page: https://id5.io

License: Apache License 2.0

JavaScript 93.43% HTML 6.57%
adtech prebid id5 usersync universal-id consent publishers hacktoberfest

id5-api.js's People

Contributors

abazylewicz-id5 avatar cosenmarco avatar efthymiosh avatar irsath avatar kzhang-id5 avatar matbielinski avatar mbartoszewiczwp avatar mimoraruid5 avatar padurgeat avatar pkowalski-id5 avatar pkwisniowski-id5 avatar sgeller avatar smenzer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

id5-api.js's Issues

Debug logs always enabled

Hi,
I found an error in code that is responsible for enabling "INFO" logs in browsers console.

In line

return !!config.getConfig('debug');

the function config.getConfig is used with parameter, but the function doesn't take parameters and always returns config object, so this line always evaluates to true, thus enabling logs.

This is undesirable because logs will be active in production environments.

Prebid with GDPR / TCF API v2

I'm having an issue with getting id5 working with GDPR.

In network I can see my test page sending this:
https://id5-sync.com/g/v1/250.json?1puid=ID5-ZHMOE2Mtxa95iEFlTy9WMsL-67uNoQCfRZZ6ZwCYSA&gdpr=0&gdpr_consent=

Although I have the latest consentModule and id5 adapter in latest version of prebid.js. The SSPs are receiving TCFv2 consent string properly, both versions of iab API are available. I'm following this implementation guide: https://console.id5.io/docs/public/prebid
(the GDPR example at the bottom, it's missing an anchor)

So I guess I have two questions:

  1. Is TCF api v2 supported by id5?
  2. Is there an easy way to debug the adapter?

In prebid logs I can see this order of events:

Prebid INFO: User ID - usersync config updated for 2 submodules
Prebid INFO: Invoking pbjs.enableAnalytics for:  [{…}]
Prebid INFO: consentManagement config did not specify allowAuctionWithoutConsent.  Using system default setting (true).
Prebid INFO: consentManagement module has been activated...

Webpack issue

Hi,

I've tried to included ID5 into a bundle install through NPM, however, where facing the following issue when running webpack.

 asset loader.js 101 KiB [compared for emit] (name: main)
runtime modules 670 bytes 3 modules
modules by path ./node_modules/@id5io/id5-api.js/lib/ 76.5 KiB
  ./node_modules/@id5io/id5-api.js/lib/id5-api.js 11.3 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/utils.js 12.3 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/refererDetection.js 5.66 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/clientStore.js 7.04 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/consentManagement.js 19.5 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/localStorage.js 3.25 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/id5Status.js 9.96 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/config.js 7 KiB [built] [code generated]
  ./node_modules/@id5io/id5-api.js/lib/constants.json 446 bytes [built] [code generated]
./src/app.js 160 bytes [built] [code generated]
./node_modules/@id5io/id5-api.js/generated/version.js 59 bytes [built] [code generated]

ERROR in ./node_modules/@id5io/id5-api.js/lib/config.js 4:0-86
Module not found: Error: Can't resolve './utils' in '/Users/gabrielchicoye/Dropbox/nexx360/dev/id5/node_modules/@id5io/id5-api.js/lib'
Did you mean 'utils.js'?
BREAKING CHANGE: The request './utils' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ./node_modules/@id5io/id5-api.js/lib/id5-api.js 19:0-33 66:25-31
 @ ./src/app.js 1:0-35 3:15-23

ERROR in ./node_modules/@id5io/id5-api.js/lib/id5Status.js 6:0-33
Module not found: Error: Can't resolve './utils' in '/Users/gabrielchicoye/Dropbox/nexx360/dev/id5/node_modules/@id5io/id5-api.js/lib'
Did you mean 'utils.js'?
BREAKING CHANGE: The request './utils' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ./node_modules/@id5io/id5-api.js/lib/id5-api.js 16:0-39 76:32-41
 @ ./src/app.js 1:0-35 3:15-23

ERROR in ./node_modules/@id5io/id5-api.js/lib/id5Status.js 9:0-30
Module not found: Error: Can't resolve './config' in '/Users/gabrielchicoye/Dropbox/nexx360/dev/id5/node_modules/@id5io/id5-api.js/lib'
Did you mean 'config.js'?
BREAKING CHANGE: The request './config' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ./node_modules/@id5io/id5-api.js/lib/id5-api.js 16:0-39 76:32-41
 @ ./src/app.js 1:0-35 3:15-23

3 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.67.0 compiled with 3 errors in 198 ms

We only have id5 as dependency

"dependencies": {
   "@id5io/id5-api.js": "^1.0.11"
 },
 "devDependencies": {
   "webpack": "^5.67.0",
   "webpack-cli": "^4.9.2"
 }

Our src/app.js is just a sample

import ID5 from '@id5io/id5-api.js'

const status = ID5.init({ partner: 173 });
status.onAvailable((id5Status) => {
    console.log(id5Status.getUserId());
});

Our webpack.config.js is really small

/* eslint-disable quotes */
const path = require('path');
const webpack = require('webpack');

module.exports = {
  entry: './src/app.js',
  output: {
    filename: 'loader.js',
    path: path.resolve(__dirname, 'dist'),
  },
  plugins: [
    new webpack.DefinePlugin({
      process: {
        env: {
          BUILD_DATE: `"${Date(Date.now()).toLocaleString()}"`,
        },
      },
    }),
  ],
  // mode: 'development',
  // mode: 'production',
};
 

Any idea?

Thanks!

upgrade to ID5 v2 endpoint

ID5 now has a new version of its endpoint that supports receiving publisher data and counting API initializations for analytics purposes. This issue is to track the upgrade

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.