Debugging the SDK

Before enabling the SDK on your live store, we recommend you verify that data is sent correctly to QL.

The easiest way to debug the SDK, is to enable the SDK's debug mode, by calling the setDebugMode on the SDK:

QL.setDebugMode('on');

SDK Debug Mode

  1. Start by visiting one of your product pages where QL's SDK is enabled
  2. Now open your browser's Developer Tools console (CTRL+ALT+I / CMD+OPTION+I) and press on the "Console" tab
  3. Now change the page's URL to include qldebug=1 in the query string

You should now see several output lines in your console with information about what the SDK is doing:

debug console

In case there are any errors in your SDK code, the SDK debugger will print the errors into the console, with additional information.

Request Debugging

In case you cannot enable the SDK's debug mode, you can still see what information is sent to QL, by looking at your the Network tab in your browser's Developer Console, and filtering requests made to quicklizard.com:

debug network

If you see a request as above, it means that the SDK is successfully sending information to QL.

SDK Embed Code Checklist

To ensure the SDK is embedded correctly, please go over the following checklist, and make sure each step is accurately fulfilled.

Step 1 - SDK execution code

The SDK execution code should be available in your page, inside a <script> tag, and placed as close as possible to the closing </body> tag

<script>
  window.QLAsync = function(QL){
    // ... rest of execution code should be added here!
  }
</script>

window.QLAsync is a globally-defined function, that must be available on the Javascript window object of your page

Step 2 - SDK variables

Depending on the page the SDK is embedded in, your SDK execution code must contain all required variables in their correct type and format.

Please consult the SDK Method Signatures page for the correct type and format of each variable passed to the SDK.

Note that prices must always be passed as floats. Passing a price variable (shelfPrice or salePrice) as a string, will cause the SDK invocation to fail.
Step 2.1 - GTM variables

If you're using Google Tag Manager, you must make sure your GTM dataLayer contains all the variables required by the SDK's execution code.

Step 3 - SDK runtime inclusion

With your SDK execution code in place, you must ensure the actual SDK runtime is added to your page by placing the following <script> tag under your SDK execution code block.

<script src="//d3jdlwnuo8nsnr.cloudfront.net/sdk/v3.0/ql.js"></script>
The SDK runtime must be included after the SDK execution code block.

Your complete embed code should look like this (SDK execution code must be added by you as per previous guides):

<script>
  window.QLAsync = function(QL){
    // ... rest of execution code should be added here!
  }
</script>
<script src="//d3jdlwnuo8nsnr.cloudfront.net/sdk/v3.0/ql.js"></script>