Debugger
Tool to test your Question Stream experience without logging any data to analytics.
Debugger
A real time debugger to help you verify your QuestionStream™ implementation.
The debugger tool allows you to simulate the Question Stream experience in real time by enabling Test Mode. This allows you to test your integration (Shopify & SDK) and verify that your implementation is working as expected. Test sessions will generate events that are live streamed to the debugger page, you can use these events to detect errors and verify the correct data is being sent. NO new view/response data will be logged in analytics while in Test Mode.
Getting Started
Debugger test sessions are temporary Question Stream sessions that will be automatically deleted after 30 minutes of inactivity. No data is persisted by Fairing during a test session so your Analytics, Charts and Reports will not be affected by any activity logged while in Debugger mode.
A link to the debugger can be found under the Account
tab. Alternatively, you can access the debugger directly here.
Enable Debugger for SDK
To enable Test Mode, set the testMode
property to true
when initializing the SDK.
...
window.addEventListener("DOMContentLoaded", function() {
const fairing = Fairing(API_KEY, TARGET_ELEMENT, {
...
config: {
testMode: true, // Enable test mode
integrations: {
}
}
});
Important: Test mode only affects the session where the flag has been enabled and can be used in any environment. However, do NOT enable this flag for your customers. Doing so will cause test sessions to be created for all your users and will result in no data being collected.
Enable Debugger for Shopify
Script Tags
First, open a Checkout page for an existing order. Next, open the dev console (right click >> Inspect >> Console). Enter Fairing.enableTestMode()
in the console and click enter. The page will reload and restart the Question Stream, you are now in 'Test Mode.' To exit test mode, enter Fairing.disableTestMode()
in the Console and refresh the browser.
Checkout Extensions
First open a Checkout page for an existing order. Next, click the question header 10 times. You will see a pop up to indicate you are now in Test Mode. You will also see an indication on the Question Stream itself. To exit Test Mode, refresh the browser.
Event Stream
View Events
Once Test Mode has been enabled, respond to the Question Stream in the Checkout page and view the corresponding events in the Debugger event stream (no data will be logged in analytics).
To go through the same order more than once, click 'Clear' in the Debugger event stream. Your Checkout page will display the first question in the Question Stream again.
Expected Events
With test mode enabled, interactions with your Question Stream will generate events which can be previewed on the debugger. The expected events are as follows:
- Order Placed: Shows at the beginning of the session and contains information about the order.
- Next Question Returned: Contains information of the next question to be answered. If there are no more questions to be answered, a message will be displayed - "No more questions".
- Question Viewed: Generated after a question is viewed. Contains information about the view, order, customer and more.
- Response provided: Generated after a response is provided to a question. Contains the response and auxiliary information.
Successful Events
Successful events will come through to the debugger with a 'Success' tag. The right panel contains details on what information was passed through with the event.
Unsuccessful Events
Unsuccessful events will come through to the debugger with an 'Error' tag. The right panel of the debugger will explain the reason for the error.
If Fairing is not loading as expected and no events are coming through to the debugger, there are additional errors logged in the console to indicate what may be wrong.
Updated 10 months ago