Customize and Extend the MXO Tag

You can customize and extend the MXO Tag in two ways. You can either:

  • Use the Customize your MXO Tag functionality available in the main MXO UI to implement site-wide changes to the MXO Tag operation. For example, changing the default optimization timeout or passing in additional data, when available.
  • Use the available JavaScript methods from MXO within your existing page logic to programmatically trigger calls to MXO for the current customer. For example, in situations where the default MXO Tag does not have access to all the customer context or data. You can either call the methods from the JavaScript on the web page or from your JavaScript framework.
Note: Only users with the Admin Role can customize the MXO Tag.

Default MXO Tag Behavior

By default, the MXO Tag executes in the browser at page load time, sends information about the current page to MXO, and may result in the triggering of one or more Interaction Points. MXO sends back a response telling the MXO Tag which content to inject into any configured Optimization Points.

MXO also sends commands to configure listeners for any configured Capture Points.

When Should I Customize the MXO Tag?

Customize the MXO Tag when you want your customizations to execute on all pages of your web Touchpoint.

This will be at times where you need to modify the standard operation of the MXO Tag for your web solution to:

  • Send data to MXO that is not directly available from a URL or on a web page.
  • In a single page app, call to MXO on navigation events that do not perform a typical page refresh.
  • Integrate with a third-party vendors tag or SDK. For example, to allow cookie syncing.
  • Trigger additional or conditional calls to MXO. For example, to capture data from a popup login window.

When Should I Trigger calls to MXO from within my Page Logic?

Be default, the MXO Tag lets you:

  • Track page load or click events
  • Capture URL parameters, cookie values, or page element data
  • Return optimized content to inject into a web page

You may need to enhance the default operation of the MXO Tag, by calling the MXO JavaScript methods directly, in the following circumstances:

  • To send data that is not directly available on a web page. For example, to send a customer campaign code or segment value to MXO that is not displayed on the web page.
  • To trigger an activity dynamically, that is outside the normal page navigation. For example, where, within a single context, a customer may or may not be authenticated, and you want to track authenticated and unauthenticated events differently.
  • To process returned content before it is displayed to the customer. For example, where you want to retrieve content from MXO but control how and where that content is delivered to a customer outside of MXO.