Skip to main content

emetriq

Emetriq data collection module (-> Docs

This module provides Emetriq data collection functionality to Moli.

Integration Web

In your index.ts, import Emetriq and register the module.

import { createEmetriq } from '@highfivve/module-emetriq';

moli.registerModule(createEmetriq());

Interfaces

IEmetriqModule

Extends

  • IModule

Properties

description

readonly description: string

Inherited from

IModule.description

moduleType

readonly moduleType: string

Inherited from

IModule.moduleType

name

readonly name: string

Inherited from

IModule.name

Methods

checkIfConsentIsMissing()

checkIfConsentIsMissing(ctx): boolean

Parameters

ctx: AdPipelineContext

Returns

boolean

config__()

config__(): null | Object

If the module has some sort of configuration this can be fetched with this method

Returns

null | Object

Inherited from

IModule.config__

configureSteps__()

configureSteps__(): ConfigureStep[]

Returns a list of steps that should be executed in the ad pipeline.

Returns

ConfigureStep[]

Inherited from

IModule.configureSteps__

configure__()

configure__(moduleConfig?): void

Initialize the module with the given module configuration. Depending on the configuration the module may become active or inactive.

Parameters

moduleConfig?: ModulesConfig

Returns

void

Inherited from

IModule.configure__

initSteps__()

initSteps__(): InitStep[]

Returns a list of steps that should be executed in the ad pipeline.

Returns

InitStep[]

Inherited from

IModule.initSteps__

loadEmetriqScript()

loadEmetriqScript(context, webConfig, additionalIdentifier, additionalCustomParams): Promise<void>

Parameters

context: AdPipelineContext

webConfig: EmetriqWebConfig

additionalIdentifier: EmetriqAdditionalIdentifier

additionalCustomParams: EmetriqCustomParams

Returns

Promise<void>

prebidBidsBackHandler__()?

optional prebidBidsBackHandler__(): PrebidBidsBackHandler[]

This method is called in the bidsBackHandler of prebid.

A module may provide those callbacks if it needs to alter the requests send to the ad server. The auctionEnd event cannot be used for this, as there's no guarantee the event handler will run before the requestAds step.

Note: Amazon TAM (A9) also has a callback that could be used for similar things. Unfortunately does the callback not provide the necessary information to implement any meaningful business logic. Especially the cpm parameter and bidder

The callback receives additional information coming from the ad pipeline run.

Note: These callbacks should not perform any initialization code or only be created once as this array will be accessed on every pbjs.requestBids() callback.

Use cases

The generic-skin module provides prebid bids back handlers to block certain ad units from being requested.

Returns

PrebidBidsBackHandler[]

See
Inherited from

IModule.prebidBidsBackHandler__

prepareRequestAdsSteps__()

prepareRequestAdsSteps__(): PrepareRequestAdsStep[]

Returns a list of steps that should be executed in the ad pipeline.

Returns

PrepareRequestAdsStep[]

Inherited from

IModule.prepareRequestAdsSteps__

requestBidsSteps__()?

optional requestBidsSteps__(): RequestBidsStep[]

Returns a list of steps that should be executed in the ad pipeline.

This step is optional, as should have been all steps to reduce implementation complexity of modules.

Note: prebid and amazon tam (a9) maybe implemented as modules in the future as they add those steps to the ad pipeline.

Returns

RequestBidsStep[]

Inherited from

IModule.requestBidsSteps__

Variables

Emetriq

const Emetriq: object

Namespace for backward compatibility. Provides static utility methods as object properties, allowing sinon to spy/stub them (e.g. sandbox.spy(Emetriq, 'syncDelay')).

Type declaration

prebidIdentifiers()

prebidIdentifiers: (ctx) => EmetriqAdditionalIdentifier

This method assumes that window.pbjs is available and loaded. Call this only inside of a window.pbjs.que(() => ...) callback.

Parameters

ctx: AdPipelineContext

ad pipeline context to access pbjs

Returns

EmetriqAdditionalIdentifier

staticCustomParams()

staticCustomParams: (targeting, mappings) => EmetriqCustomParams

Parameters

targeting: KeyValueMap

mappings: undefined | EmetriqMappingDefinition[]

Returns

EmetriqCustomParams

syncDelay()

syncDelay: (ctx, delay?) => Promise<EmetriqAdditionalIdentifier>

Returns a promise that delays the data tracking call.

Parameters

ctx: AdPipelineContext

ad pipeline context for window access

delay?: SyncDelay

configuration of delay

Returns

Promise<EmetriqAdditionalIdentifier>

Functions

createEmetriq()

createEmetriq(): IEmetriqModule

Emetriq Module

This module provides Emetriq data collection functionality to Moli.

Returns

IEmetriqModule

See

https://doc.emetriq.de/#/profiling/adp/data-providers-client


prebidIdentifiers()

prebidIdentifiers(ctx): EmetriqAdditionalIdentifier

This method assumes that window.pbjs is available and loaded. Call this only inside of a window.pbjs.que(() => ...) callback.

Parameters

ctx: AdPipelineContext

ad pipeline context to access pbjs

Returns

EmetriqAdditionalIdentifier


staticCustomParams()

staticCustomParams(targeting, mappings): EmetriqCustomParams

Parameters

targeting: KeyValueMap

mappings: undefined | EmetriqMappingDefinition[]

Returns

EmetriqCustomParams


syncDelay()

syncDelay(ctx, delay?): Promise<EmetriqAdditionalIdentifier>

Returns a promise that delays the data tracking call.

Parameters

ctx: AdPipelineContext

ad pipeline context for window access

delay?: SyncDelay

configuration of delay

Returns

Promise<EmetriqAdditionalIdentifier>