Skip to main content
Skip table of contents

Web Analytics Integration

This page contains integration guides with various Web Analytics solutions, of how to pass martechpass as declared ID.

Why Integrate Utiq martechpass with Analytics?

The Utiq martechpass (mtid) is a semi-stable identifier tied to a real person (or household), persisting across browsers and devices, and rotating every 90 days for privacy and compliance.

When passed as a user ID in Web Analytics, it helps stabilize and unify visitor metrics.

Primary Use Case

  • Metric Stabilization & Deduplication: More accurately measure Unique Users by reducing identity fragmentation across devices or browsers.
    For example, instead of reporting 1.000 ‘visitors’ (duplicate cookies), analytics may reveal 900 true individuals using martechpass, and report a more realistic and stabilized conversion rate.

For more on use cases, visit: Utiq Use Cases

Vendor Integrations

For each integration, Utiq recommends retrieving the mtid using onIdsAvailable via the addEventListener API, especially when embedding via third-party scripts.

Google Analytics

Last update: April 2025 (check vendor documentation)

JS
window.Utiq ||= {};
window.Utiq.queue ||= [];

const handleIdsAvailable = ({ mtid, category }) => {
  // Callback action for onIdsAvailable
  
  if (mtid && window.dataLayer && Array.isArray(window.dataLayer)) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      event: 'utiqUserIdReady', // Optional: custom event name for triggers
      user_id: mtid,
      // utiq_mtid: mtid, // If you use User ID already, you can use this instead
      utiq_category: category
    });
  } else {
    console.error('Google Tag Manager is not available, or MTID is missing.');
  }
};

window.Utiq.queue.push(() => {
  window.Utiq.API.addEventListener('onIdsAvailable', handleIdsAvailable);
});

Configurations to pass martechpass as User ID in GA4

Google Tag Manager configurations

  • Create a data layer variable

    • In Google Tag Manager, click Variables

    • In the User-Defined Variables section, click New

    • Click Variable Configuration > Data Layer Variable

    • Enter a name for the variable at the top (e.g. "DLV - user_id")

    • In the Data Layer Variable Name field, enter a name for your ID (e.g. "user_id")

    • Click Save

  • Modify your Google Analytics 4 tag

    • In Tag Manager, click Tags

    • Select your Google Analytics 4 tag

    • Under Configuration settings, add a new row with the following parameters:

      • Parameter: user_id

      • Value: Select the Data Layer variable you created

    • Click Save

    • Click Submit to publish the changes

(Optional) Configurations to pass martechpass as Custom Dimension in GA4 instead

In case you populate ‘user_id’ attribute already, and you don’t want to change this to martechpass, you can create a new custom dimension in Google Analytics to capture utiq_mtid instead.

Google Tag Manager configurations

  • Create a data layer variable

    • In Google Tag Manager, click Variables

    • In the User-Defined Variables section, click New

    • Click Variable Configuration > Data Layer Variable

    • Enter a name for the variable at the top (e.g. "DLV - utiq_mtid")

    • In the Data Layer Variable Name field, enter a name for your ID (e.g. "utiq_mtid")

    • Click Save

    • Do the same for variable "DLV - utiq_category" with ID "utiq_category"

  • Modify your Google Analytics 4 tag

    • In Tag Manager, click Tags

    • Select your Google Analytics 4 tag

    • Under Configuration settings, add a new row with the following parameters:

      • Parameter: user_properties.utiq_mtid

      • Value: Select the Data Layer variable you created

    • Click Save

    • Do the same for parameter user_properties.utiq_category

    • Click Submit to publish the changes

Google Analytics 4 configurations

  • In Google Analytics 4, in Admin, under Data display, click Custom definitions

  • Create a custom dimension, with below configurations:

    • Scope: User

    • Name: utiq_mtid

    • Event parameter: utiq_mtid

  • Do the same for custom dimension utiq_category

  • This will then be associated with all events from that user

In case you pass Google Analytics events in BigQuery, the above utiq_mtid and utiq_category custom dimensions can be found under the user_properties object. This allows modeling of user stability using mtid as an auxiliary identifier.

Documentation:

Testing: In Console type window.dataLayer and check for utiqUserIdReady event. Also filter Network for collect and check attribute uid and/or up.XX

Adobe Analytics

Last update: July 2025 (check vendor documentation)

JS
window.Utiq ||= {};
window.Utiq.queue ||= [];

const handleIdsAvailable = ({ mtid, category }) => {
  // Callback action for onIdsAvailable
  
  if (mtid && window.Visitor && typeof Visitor.getInstance === 'function' && typeof s !== 'undefined') {
    const visitor = Visitor.getInstance("YOUR-ORG-ID"); // Replace with your actual Adobe Org ID
    
    visitor.setCustomerIDs({
      utiq: {
        id: mtid,
        authState: Visitor.AuthState.AMBIGUOUS
      }
    });
    
    // Link Visitor instance to AppMeasurement (Adobe Analytics)
    s.visitor = visitor;
    
    // If you use Visitor ID already, you can use an eVar instead
    // s.eVarXX = mtid; // Replace XX with the actual eVar number
    s.eVarYY = category; // Replace YY with the actual eVar number
  } else {
    console.error("Adobe Visitor API or Analytics not available, or MTID is missing.");
  }
};

window.Utiq.queue.push(() => {
  window.Utiq.API.addEventListener('onIdsAvailable', handleIdsAvailable);
});

The above code example is with the assumption you use ‘Adobe ECID Visitor Service’.

Ensure that ‘utiq’ is a registered identity namespace in Adobe Admin Console.

Documentation:

Testing:

  • Filter Network for demdex.net and check attribute d_cid_ic

  • Filter Network for b/ss and check attribute id and/or vXX

  • Use Adobe Experience Platform Debugger to confirm identity mappings

Marfeel

Last update: April 2025 (check vendor documentation)

JS
window.Utiq ||= {};
window.Utiq.queue ||= [];

const handleIdsAvailable = ({ mtid, category }) => {
  // Callback action for onIdsAvailable
  
  if (mtid && window.marfeel && window.marfeel.cmd && typeof window.marfeel.cmd.push === 'function') {
    window.marfeel.cmd.push(['compass', function(compass) {
      compass.setSiteUserId(mtid);
      
      // If you use User ID already, you can use a User Var instead
      // compass.setUserVar('utiq_mtid', mtid);
      compass.setUserVar('utiq_category', category);
    }]);
  } else {
    console.error('Marfeel is not available, or MTID is missing.');
  }
};

window.Utiq.queue.push(() => {
  window.Utiq.API.addEventListener('onIdsAvailable', handleIdsAvailable);
});

Marfeel user reconciliation feature is available only for Enterprise clients.

Documentation:

Testing: Filter Network for ingest and check attribute sui and/or uvar

Piano

Last update: April 2025 (check vendor documentation)

JS
window.Utiq ||= {};
window.Utiq.queue ||= [];

const handleIdsAvailable = ({ mtid, category }) => {
  // Callback action for onIdsAvailable
  
  if (mtid && typeof pa !== 'undefined' && typeof pa.setUser === 'function') {
    pa.setUser(mtid);
    
    // If you use User ID already, you can use a Custom Property instead
    // pa.setProperties({ utiq_mtid: mtid });
    pa.setProperties({ utiq_category: category });
  } else {
    console.error('Piano is not available, or MTID is missing.');
  }
};

window.Utiq.queue.push(() => {
  window.Utiq.API.addEventListener('onIdsAvailable', handleIdsAvailable);
});

Documentation:

Testing: Filter Network for collect or pa and check attribute user.id and/or properties

Mapp

Last update: July 2025 (check vendor documentation)

JS
window.Utiq ||= {};
window.Utiq.queue ||= [];

const handleIdsAvailable = ({ mtid, category }) => {
  // Callback action for onIdsAvailable
  
  if (mtid && window.wtSmart && Array.isArray(window.wtSmart)) {
    window.wtSmart.push(function(wtSmart) {
      
      wtSmart.customer.data.set({
        id: mtid
      });
      
      wtSmart.session.parameter.set({
        // If you use ID already, you can use a Session Parameter instead
        // XX: mtid, // Replace XX with the actual Session Parameter number
        YY: category // Replace YY with the actual Session Parameter number
      });
    });
  } else {
    console.error('Mapp Smart Pixel is not available, or MTID is missing.');
  }
};

window.Utiq.queue.push(() => {
  window.Utiq.API.addEventListener('onIdsAvailable', handleIdsAvailable);
});

Documentation:

Testing: Filter Network for /wt and check attribute cd and/or csXX

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.