Baseline JavaScript API Implementation

Articles

Required for All Page Types
You must include the following for all page types when implementing the Monetate JavaScript API: monetateQ — This array contains the necessary instructions for collecting and storing data in the appropriate format to send to Monetate. Yo...
Baseline API Call Matrix
The calls that you implement during a baseline Monetate JavaScript API implementation are just the recommended API calls. You can implement more calls to customize your implementation to meet your business needs. Do not copy t...
Step 1: Implement the Monetate Tag
The Monetate tag is a small chunk of code that enables Monetate to communicate with your site. There are two tag options: a synchronous tag and an asynchronous tag . Refer to Tag Comparison to better understand the benefits of each tag type, ...
Step 2: Capture Site Structure with Page Types
The setPageType method call sends the page type for a page that a site visitor is on to Monetate. This information also allows you to limit actions to specific page types when you add action conditions to Web experiences. For example, if you ...
Step 3: Capture Products on List Pages
The addProducts method sends to Monetate the product IDs and, optionally, the product SKUs that are rendered on an index or search page (for example, fifthlevelfashion.com/men/shirts.html ). Because it enables you to target experiences at the p...
Step 4: Capture Product Details
The addProductDetails method is used to add items when a customer views a more detailed product description on a product detail page. This is usually linked from an index or search page thumbnail. Some product detail pages may have several ite...
Step 5: Capture Cart Information
The addCartRows method sends information about the products that visitors have added to their cart to Monetate. You should make a call to this method on every page or at least on any page on which the basket has the potential to change. Implemen...
Step 6: Capture Site Conversions
The addPurchaseRows method sends information about the products that a customer has purchased to Monetate and specifies details about that product (for example, quantity, purchase ID, amount, and currency). Implementing this method call is impor...
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 ...
Make Test Purchases
After you quality test each page type on your site as explained in QA Pages , 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...
Data Alignment Check
After you quality test each page type on your site as explained in QA Pages and test different types of purchases as explained in Make Test Purchases , you have technically completed the QA process for a baseline Monetate JavaScript API impleme...
Implement Third-Party Analytics
Passing data from Monetate to your own third-party analytics provider enables more granular reporting. Monetate allows you to pass experience data to any analytics provider that can accept data within the browser so that your analysts c...
Implement a Product Catalog
A product catalog is required for Monetate's recommendations and badging add-ons. Uploading a product catalog has the added benefit of allowing you to target products in the WHO settings of an experience by hierarchy, category, or produc...