Debugging JavaScript tracking

When Ometria’s JavaScript interaction API is successfully installed, you can track user activity across your website, including their identity, the products they browse, items added to their basket, etc.

You can use events to trigger automation campaigns.


You can troubleshoot issues with JavaScript tracking by appending #om_debug to the URL.


Reload the page - you might need to refresh as well.

A message box displays in the top-left of your screen:


As you navigate through your site you can check this message box for events.

This is a quick way to check that identify, page views and basket methods are being called correctly by the JavaScript.

The script will print additional information in the browser console associated with the message:

ActionMessageDebug data printed to the console on click
User first arrives on the site with no previous cookieNEW COOKIE IDN/A
A new session is startedNEW SESSION: session_idN/A
An existing session is continuedEXISTING SESSION: session_idN/A
The active session is identifiedIdentified: email_addressN/A
On every page where page_type is definedEvent: pageview (page_type)Page Types
Shown when a setBasket event is calledEvent: setbasketBasket Object
An item has been added to the basketEvent: addtobasketProduct ID and quantity of items added to basket
An order/transaction has been completed, where id is the order/transaction identifierEvent: transaction (orderId)Order ID or Web ID
User logs in or enters their email addressEvent: identifyUser identification information

Switch off debugging mode

You can switch off #om_debug from the console in developer tools in your browser.

Open the developer tools using right-click > Inspect.

Select the Console tab at the top of the tool. Look for the cursor at the bottom of the panel and enter: ometria.setDebugLogging(false):

Hit enter on your keyboard.

Debugging mode closes and the message box disappears.