This guide covers testing for all the integration steps in the JavaScript Integration Guide:

  • Framework
  • Order Confirmation
  • Browse Activity
  • Email Capture
  • Cart Activity

IP WHITE LISTING

IMPORTANT Depending on what security measures you have implemented, you may need to whitelist the following IP addresses to allow access for testing:

  • 142.0.92.2
  • 142.0.93.65
  • 142.0.93.66

PREREQUISITE - ACCESSING YOUR BROWSER'S DEVELOPER TOOLS

For this guide, you will need to know how to access your browsers developer tools, specifically the Console and Network tabs. These tabs can be accessed in most browsers by pressing F12 while browsing a website. Below are the developer tools for Google Chrome: 

PART 1: TESTING THE JAVASCRIPT FRAMEWORK

Test the JavaScript Framework by navigating to any page on your website, as this script should be installed on all site pages. Next, in the console, enter _ltk and then enter to ensure the _ltk object exists. You should see the following:

PART 2: TESTING THE ORDER CONFIRMATION CODE

Open the Network Tab in the browser's developer tools. Set your filter to listrak, which allows you to find the following network calls easier. 

Next, place a test order on your site. On the order confirmation page, you will see a T.ashx call in the headers tab. Inspect those query string parameters to see that they match the order you placed. 

PART 3: TESTING THE PRODUCT BROWSE ACTIVITY CODE

Open the Network Tab in the browser's developer tools. Set your filter to listrak, which allows you to find the following network calls easier.

Navigate to a product page. You should see a request fire that begins with your Merchant ID. Click the Merchant ID request, then click the Headers Tab.

You should see an activity type of Product Browse and a key value that matches the SKU of the page you are on.

PART 4: TESTING THE EMAIL CAPTURE CODE

Open the Network Tab in the browser's developer tools. Set your filter to listrak, which allows you to find the following network calls easier.

  • Navigate to an email input box that you tied to the email capture code. 
  • Enter any email address.
  • Press Tab or click out of the text field.
  • You should see a query string in the Network Tab with the email you entered.

PART 5: TESTING THE CART ACTIVITY CODE

Open the Network Tab in the browser's developer tools. Set your filter to listrak, which allows you to find the following network calls easier.

  • Add an item to your cart.
  • You should see an update?gsid request fire when you have added the item to your cart.
  • Click the update?gsid request.
  • Click the Headers Tab.
  • Scroll down and ensure that the item in the update?gsid request is the same item that you put in your cart.
  • Add a second item to your cart and ensure that when you click on the update?gsid request this time, you see both items, and not just the most recent. Again, you should be sending the full cart contents every time an item is added or removed from a cart.
  • Navigate to your cart page and remove an item from your cart. When the update?gsid request fires, you should only see one item in the call instead of two.

TEST THE CLEAR CART ACTIVITY 

  • Add an item to your cart.
  • You should see a update?gsid=... request fire when you have added an item to your cart.
  • Navigate to your cart page and remove all the items in your cart.
  • You should see another update?gsid=... request fire.
  • Click the new update?gsid=... request.
  • Click the Headers Tab.
  • You should now see where cc = true. This means clear cart = true.
Did this answer your question?