Go to Qubit

Opentag documentation

Debug tool

The debug interface allows you to visualize exactly what is happening on your page - or in some cases, what isn't happening.

Overview

When a page loads, there may be several different tags firing. If you have an Opentag container implemented on a page, you can now use the Debug Console to observe the mechanics behind the tags in your container.

Utilizing a simple traffic light system, the Debug Console lets developers know whether or not their tag is firing and why. As tags load, the developers can observe in real time and monitor any potential errors. They can then deep dive into their tag to view the different filters, parameters, and dependencies that have been set. If there are running errors, the interface notifies the developer to what the problem is.

opentag-debug-list

How do I trigger the debug tool?

You can see the debug tool for your specific website by adding the url parameter opentag_debug_tool to the address of the page you are on. For example, to see the debug tool on http://www.yoursite.com you would type http://www.yoursite.com?opentag_debug_tool in your address bar.

You can also turn on the debug tool permanently, by going into the container information (click the container’s name at the top of the column next to the Q logo, and then check the ‘Keep debug tool mode on’ checkbox). This will keep the debug tool on when navigating through the pages of your website. Similarly uncheck the box to turn it off.

‚ÄčNote: For this to work, an Opentag script needs to be on the the page.

What do the different colors mean?

The colors alongside the tag names represent the status of the respective tags:

Pending

opentag-debug-pending

Normally this means that the tag wasn’t meant to fire, the filters have been inputted incorrectly or there is a problem with one of its dependencies.

  • Tag filters don’t match / have errors
  • All dependencies haven’t been loaded yet

Loading

opentag-debug-loading

  • A tag is waiting to finish loading
  • Opentag is trying to find one or more of the tag’s script parameters

Failed

opentag-debug-failed

A tag hasn’t fired due to an error. This could include one/some of the following reasons:

  • One or more of the tag’s script parameters couldn’t be found / have errors
  • ‘Error parsing script loader’ – The inline HTML for the tag caused a javascript exception when trying to inject the HTML to the page. (Malformed hard-coded parameters, incorrect syntax, no tag around javascript code etc.)
  • ‘Error loading script’ – The url script could not physically be loaded (i.e. 404 error)

Success

opentag-debug-success

The tag has successfully fired (all corresponding filters/dependencies satisfied and parameters found).

Note: This doesn’t necessarily mean the script has ran 100% correctly – you will need to check in the tag info whether the correct parameters values are getting populated and whether any custom code works as you would expect.

In context

opentag-debug-context

Does the debug tool work with multiple Opentag scripts on one page?

Although we don’t advise the implementation of multiple Opentag scripts on one page*, the debug tool will work as per usual, with an extra bar at the top which enables traversal of the views for the Opentag scripts on the current page.

*for reasons regarding overheads, and more confusion when it comes to implementing tags

Will this affect the loading time of my Opentag script?

Not at all. The debug tool is located in a separate script that is only loaded when someone is in Opentag Debug Tool mode (i.e. has opentag_debug_tool in their URL parameters or has ‘Keep debug tool mode on’ checked).

Devices and browsers

The debug tool works as you would expect in IE8+ and Chrome, Firefox, Safari and Opera on desktop devices. The tool has not been tested across mobile devices and tablet devices, although this is on the product roadmap.

Was this helpful?