Using jExperience tracker with a tag manager

November 14, 2023

This topic shows you how to use a third party application to enable and disable event tracking by jExperience.

Disabling jExperience tracking

By default, when jExperience is active on your site, it collects visitor's behavioral data (for example, page views). This is done with a Javascript tracker (wem.js) that send events to jCustomer. For different reasons, you may want to disable the jExperience tracking or use a 3rd party solution, like a consent manager or a tag manager to enable tracking. 

To disable Javascript tracking by default:

  1. Navigate to your site in Page Composer and open the site for editing.
  2. In Options, enable the Execute jExperience Javascripts from a 3rd party solution mixin and select Current content and all sub content.

This option is also available for any page, so that you can decide to disable the Javascript tracking for a specific section of your website or for a single page.

Once you save, page view events are no longer sent to jCustomer until the wem is enabled again.

Enabling jExperience tracking using Javascript

When jExperience is active on a site, each page rendered in live has a Javascript object named wem. It is available once the document is loaded.

Note: If jExperience tracking is disabled, the wem object will still be available, but data won't be send to jCustomer.

You can use the following self speaking commands to activate or deactivate the tracking:


Using a tag manager

To use a tag manager:

  • From Page Composer, disable jExperience Javascript tracking.
  • From the tag manager script execution, use the wem commands to activate the tracking.