prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
http://prebid.org
Apache License 2.0
1.26k stars 2.02k forks source link

LiveIntent User ID Module: Eliminating live-connect NPM Dependency. #11541

Open 3link opened 1 month ago

3link commented 1 month ago

Type of issue

Eliminating live-connect NPM dependency.

Description

The goal of this issue is to get rid of the LiveConnect NPM module dependency.

Instead, the following approach should be implemented: The LiveIntent user ID module will rely on the LiveConnect script being present on the page. This LiveConnect script will accept commands and execute them according to the configuration passed along with them (e.g. what to resolve, privacy settings, callbacks, etc.).

The user ID module implementation will look like in the snippet below:

window.liQHub = window.liQHub || [];

decode(value, config) {
  const sync = {
      config: config,
      commands: [{
        command: "sync"
      }]
  }
  window.liQHub.push(sync)
  // decode the value
}

getId(config) {
  const result = function(callback) {
    const syncAndResolve = {
        config: config,
        commands: [
            {
                command: "sync"
            },
            {
                command: 'resolve',
                onSuccess: response => {callback(response)},
                onError: error => {callback()}
            }
        ]
    }
     window.liQHub.push(syncAndResolve)
  }
  return {callback: result}
}
3link commented 1 month ago

Hi @SKOCHERI @patmmccann @jdwieland8282. The proposal is as communicated in Slack. We started working on it this week. There is no PR in Prebid yet as we have to rewrite LiveConnect from scretch first.

patmmccann commented 7 hours ago

@3link excluding the import in geographies you don't function had a rather noticeable performance improvement; this speaks to the potential opportunity in the geographies where you do from the disentangling