Accessing the Utiq Passes
The Utiq passes and metadata you can access, are the following:
mtid (martechpass)
atid (adtechpass)
attrid (attributionpass)
category → ‘mobile’ or ‘fixed’, to differentiate if Utiq IDs are generated based the mobile connection, or the fixed (household) connection
These passes are enabled based on agreement with Utiq - reach out to csm@utiq.com
There are two ways to retrieve these values:
1. Using the getIdGraphEntry API method
Example:
try {
const martechpass = window.Utiq.API.getIdGraphEntry('mtid')
console.log(`martechpass: ${martechpass}`)
const adtechpass = window.Utiq.API.getIdGraphEntry('atid')
console.log(`adtechpass: ${adtechpass}`)
const attributionpass = window.Utiq.API.getIdGraphEntry('attrid')
console.log(`attributionpass: ${attributionpass}`)
const category = window.Utiq.API.getIdGraphEntry('category')
console.log(`category: ${category}`)
} catch (err) {
console.error(`getIdGraphEntry API call failed. Reason: ${err.message}`)
}
2. Using the onIdsAvailable event listener
Example:
window.Utiq = window.Utiq || {};
window.Utiq.config = {
listeners: {
onIdsAvailable: ({ mtid, atid, attrid, category }) => {
// Single callback action
}
}
};
First Page Utiq Passes Optimization
If you want to optimize the Utiq Passes timing on the first page of your website, and be available on those bid requests and/or other marketing platform integrations, and not from second page only, so that you can get more value out of Utiq, then you could consider using our event listener onFlowCompleted, with the below logic.
Don't call Prebid and/or other marketing platform integrations after CMP acceptance but wait to call them when this event listener fires.
This event is dispatched when Utiq has completed its flow, either user was eligible and accepted/rejected, user had accepted/rejected on previous session, or user was not eligible.