Accessing the Utiq Passes

The Utiq passes can be found in the browser local storage under the utiqPass key. The JSON object includes an idGraph object with the adtechpass (atid) and martechpass (mtid).

There are two ways to retrieve these values:

1. Using the Utiq API getIdGraphEntry method


try {
  const martechpass = window.Utiq.API.getIdGraphEntry('mtid')
  console.log(`martechpass: ${martechpass}`)
  const adtechpass = window.Utiq.API.getIdGraphEntry('atid')
  console.log(`adtechpass: ${adtechpass}`)
} catch (err) {
  console.error(`getIdGraphEntry API call failed. Reason: ${err.message}`)

2. Using the onIdsAvailable listener

For usage examples see onIdsAvailable listener.