As part of your Monetate JavaScript API implementation process, you should perform a variety of testing to confirm the deployment is working as expected.
QA Pages
The setPageType method is used to set a page type that describes the type of page a visitor views on your site. You can pass any string value for page type, but Monetate recommends using a single word with lowercase values because they're easier to remember. Key pages to set page types for include the home or main page, index page, search page, product detail page, cart page, checkout page, and purchase confirmation page.
As part of your implementation of the Monetate JavaScript API, you should ensure that the each setPageType method call works correctly so that the information from each page is correctly passed to Monetate.
Main Page Type
The main page is generally the first page that a site visitor lands on when navigating your site. The Monetate Inspector browser plug-in should report the following:
Create an account for your site, and then navigate back to the home page. Ensure Page Type = main appears in Monetate Inspector whether or not you're logged in.
Category Page Type
This page usually includes thumbnail images or links that direct site visitors to specific index pages. A category page for furniture may include "Outdoor Furniture," "Bedroom Furniture," and "Living Room Furniture" options. Category pages do not generally collect PIDs but should track the following:
Monetate Inspector
1Page Type = category
2Page Event = viewPage
Testing Tips
Check several different category pages to verify that they share a consistent layout and overall look.
Index Page Type
Index pages generally display a thumbnail view of products, their descriptions, and their prices. If you select a product, then you are taken to the product description page. Product IDs should remain consistent on every page of your site. Index pages must collect PIDs and should report the following in Monetate Inspector:
Monetate Inspector
1Page Type = index
2Page Event = viewPage
Testing Tips
Most index pages should share a consistent layout and overall look. Apply a filter and alter the sort order, and then ensure that the right number of PIDs are collected. Some index pages allow the customer to change the way the thumbnail images are presented, such as a list view and a thumbnail view. Ensure that the information collected doesn't break after changing the display view.
Ensure that you verify that the information collected accurately reflects the correct number of PIDs on the page after a filter is applied. For example, if 100 PIDs are present on the page and then you apply a filter to that page to limit the number to 50 PIDs, then ensure that 50 PIDs are displayed.
You should also verify that the information collected for the number of PIDs is accurate when you apply sorting. For example, if a site visitor sees 10 PIDs and then sorts by price, then 10 should still be collected.
Product Page Type
This page loads after you click a product image or link on an index page. It displays specific product information in detail and allows you to add an item to the cart. Product pages should collect a single PID that remains consistent across the site unless you use SKUs and should report the following in Monetate Inspector:
Although both PID and SKU are required in a product catalog, Monetate only requires you to implement method calls for PID. However, you should implement SKUs if you intend to use the recommendations and product-badging features.
Search for multiproduct product pages, products with warranties, and gift cards. Ensure the information collected is correct for all varieties of product pages.
Additionally, visit a product page, refresh that page, change the shoe size or color, add the item to the cart, and then confirm the information collected is still correct.
Cart Page Type
The cart page is the page that displays all products that a site visitor is ready to purchase. You can remove an item from the cart, change the quantity of an item, or continue to the checkout process. Cart pages should collect PIDs that remains consistent across the site unless you use SKUs and should report the following in the Monetate Inspector tool:
Monetate Inspector
1Page Type = cart
2Page Event = viewPage, viewCart
3Cart Products = Product ID Unit Price Quantity
Since the cart page is critical for how your site records conversions, you should test it extensively.
Place at least 15 products in the cart including free products, sale products, two-for-one deals, and products that are paired with additional products. On the cart page, verify that the information collected reflects the unit price instead of the total price. To test the veracity, add more than one of the same item to the cart. Monetate analyzes both the unit price and the total cart value when collecting and reporting information on the cart page.
You should also test sales price functionality for the cart page. To do this, launch the Monetate Inspector tool on the cart page, then click the Track tab, and then verify that the unit price is reflected next to the appropriate PID. Apply a promo code to the cart and a gift card, if possible, to see how these actions impact the information collected, if it all.
To test retracks on the page, add two items to the cart and then remove one of them. Verify that only one product is displayed in the Monetate Inspector tool. Repeat this process with one item in the cart and then remove it. Make sure that Monetate Inspector still identifies the page as Cart with no PIDs present. Repeat this process again with an item in the cart, and then increase that quantity from the cart page. Verify that Monetate Inspector reflects this change.
When you have items in the cart, refresh the page and verify that ID, price, and quantity don't change. Coupons and promo codes should not affect the page collect information.
When you compare PIDs from index or product pages with PIDs on the cart page, make sure to test products that have different color and size combinations. Sometimes the PID that Monetate collects from index or product pages is different than the cart page because the site visitor hasn't selected the color or size yet. Once the visitor makes a selection, the PID that Monetate collects is actually the SKU.
If you use a currency other than US dollars ($), then verify that the price and currency values that Monetate collects correspond to that currency when you add items to the cart.
Billing and Shipping Page Types
These page types typically appear after the cart page:
Billing: The page on which customers typically enter their billing information
Shipping: The page on which customers typically enter their shipping information
There isn't much you must test or check on these pages except the page type in Monetate Inspector and the overall look of the pages.
Login, CheckoutLogin, Sign-Up Page Types
The login page appears when a site visitor clicks Log In, My Account, or Sign Up somewhere on your site outside of the checkout process. This page should display the following in Monetate Inspector:
Monetate Inspector
1Page Type = login
2Page Event = viewPage
Your site may use separate page types for login and sign-up pages. In this case the page should display the following in Monetate Inspector:
Monetate Inspector
1Page Type = signup
2Page Event = viewPage
The checkoutLogin pages typically appear during the checkout process. These pages may look exactly like the login page, but some piece of the URL should indicate to you that you're in the checkout process. This page should report the following in Monetate Inspector:
Monetate Inspector
1Page Type = checkoutLogin
2Page Event = viewPage
Checkout Page Type
The checkout page is the page that a site visitor sees right before they place an order. This page should list billing and shipping information along with the contents of the cart. It should also report the following in Monetate Inspector:
Monetate Inspector
1Page Type = checkout
2Page Event = viewPage, viewCart
3Cart Products = Product ID Unit Price Quantity
Try to break this page by adding a promo code, whether it's valid or invalid. Try to edit your billing or shipping address. If this attempt returns you to the shipping page, verify that Page Type = shipping shows in the Monetate Inspector tool. Your checkout page may or may not collect the cart here (productId, price, quantity). It's only 100% necessary to collect the cart here under these circumstances:
You can get to this page by skipping the cart page.
You can edit your cart (items you're buying) on this page.
Purchase Page Type
The purchase page is the page that customers see after completing an order. It usually displays the following information needing to be tracked:
Monetate Inspector
1Page Type = purchase
2Page Event = viewPage, viewPurchase
This page should also track the purchase ID or confirmation number and in most cases should also track purchase page cart data.
After completing a purchase, copy the purchase ID, log into the account, and verify that you can search for your order using the purchase/order ID captured in the collect. In some instances, the order ID that's captured is incorrect.
If the client indicates that there is no way to make a test purchase, you'll need to make an actual purchase to verify its functionality.
By default, Monetate collects order-level discounts on the Purchase page. Verify that a separate line item of _DISCOUNT or DISCOUNT appears in the Monetate Inspector tool. If your site is only set up to collect the order ID on the purchase page, you must rely on the last known cart and account for order-level discounts on the cart page. However, this method may affect experiences that rely on cart thresholds for PageType = cart.
PayPal Testing
If you accept PayPal on your site, then you should make an additional test purchase using PayPal. You need the following information on the page for PayPal purchase to function properly:
Monetate Inspector
1Page Event = viewPage, viewPurchase
2Cart Products = Product ID Unit Price Quantity
This page should track the purchase ID and in most cases should also track purchase page cart data.
Make Test Purchases
After you quality test each page type on your site, you should make a series of test purchases to ensure that your site passes the correct data to Monetate. After all, purchases are often your most important metric, thus you should ensure they're working perfectly.
Purchase 1: Guest Account
Make a purchase as a guest to verify that guest purchases work and that purchases aren't required to be tied to a previous account.
Purchase 2: Logged-In Customer
Make a purchase as a registered customer logged into an existing account. This test ensures that you can make the purchase and also that the information from an existing account works as intended.
Purchase 3: Gift Card
Add a gift card to the cart if your site offers them for purchase. The purchase of a gift card can be tricky, so verify the total amount is adjusted correctly to include the amount of the gift card.
Purchase 4: Sale Items
Add sale or discounted items to the cart. Adding such items to the cart lets you ensure that the discounted price is tracked from the time a customer adds an item to the cart until they reach the purchase confirmation page.
Purchase 5: Free Items
If your business ever offers free items on your site, add one of them to the cart and then continue the purchase. Even though the item's cost is $0.00, it should still be tracked through the purchase process.
Purchase 6: Items Greater than $999.99
Because comma delimiters can sometimes cause issues, make a purchase greater than $999.99.
Purchase 7: Extended Warranties
If your business sells extended warranties on products that it sells, add one to your cart and make a purchase. Nontraditional items such as extended warranties can sometimes cause issues, so ensure the warranty is tracked from the time you add it to the cart until you reach the purchase confirmation page.
Purchase 8: Valid Promotional Code
Similar to discounted items, use a valid promotional code when making a purchase to ensure the appropriate discount is applied.
Purchase 9: Invalid Promotional Code
Try adding an invalid promotional code—for example, one that's expired or one that's fake—to the cart. Ensure that no discount is applied to the purchase and that the invalid code doesn't have any other unforeseen effects on the purchase process.
Purchase 10: Alternate Payment Forms
If your site accepts alternate forms of payment, such as Google Pay, PayPal, or Amazon Pay, you should make several purchases with each alternate form.
Data Alignment Check
After you quality test each page type on your site and test different types of purchases, you have technically completed the QA process for a baseline Monetate JavaScript API implementation. However, you can do one final check by completing a data alignment check.
To complete this check, contact your Client Services team or submit a request using the
.
Requirements for a Data Alignment Check
You need a transaction audit with 3 days of data. The file should only contain transactions that Monetate should have observed and not include in-store transactions, transactions from a different channel, from a different domain, etc.
The file should contain the following fields:
transaction ID: Required
timestamp/date/timezone: Optional but helpful
value: Optional but helps ensure revenue is being correctly captured as well
Any fields that can help Monetate identify potential issues, such as applying for credit or making purchases using a different checkout funnel, such as PayPal
If possible, don't include line items/products. Purchase-level data is preferable.
Do not include any personal identifiable information (PII).
Monetate's Data Analytics team compares your data compared to the data that Monetate collected, and then provides your team with a report on how closely aligned Monetate's collected purchase data is to your system of record.