Page Object

Prev Next

Suggested readings: User object, Listing object, Product object, Basket object, Transaction object

The Page Object includes the properties of the current page (e.g., home, product, listing, confirmation). If the page type (or breadcrumb) can be changed without reloading the page, this object must be updated too.

This guide answers the following questions:

What are the prerequisites?

  • The Insider tag must be implemented.
  • The Insider object must be defined before the Insider tag. Otherwise, the Insider tag cannot read any information from the Insider object.

What are the properties?

The Page object has the following properties.

KeyPropertyTypeDefinitionRequired
typePage TypeStringIncludes the page properties as in Home, Product, Category, Search, Basket, Checkout, Confirmation, and Content. Page Type value should start with an upper case.Yes

What are the things to keep in mind?

When integrating the object, the following factors should be considered.

Change the value of the key

Make sure to change the value of the key based on your page type: Home, Product, Category, Search, Basket, Checkout, Confirmation or Content.

You can pass the Search and Content page type information if these page types are available on your website.

Code for the confirmation page

Upon adding the Code for Confirmation Page, review to make sure:

  • The page type is Confirmation for all transactions made with all payment types (e.g., payment on delivery, credit card, bank transfer). If you want to exclude any payment method or payment for specific products (e.g., free product samples, wholesale products, etc.), you should not return such transactions as Confirmation.
  • If a transaction fails, the type does not show Confirmation.
  • If it is a single page, ensure the page object includes the correct information. For example, once a user navigates to another page after the Confirmation page, the page object should also state this change and not display the type as Confirmation.

Sample Code

Below is a sample code for the Page object on a Confirmation page.

window.insider_object = window.insider_object || {};
window.insider_object.page = {
        "type": "Confirmation"
}

How can we monitor if the integration works correctly?

Once you deploy your integration, you can test it via the Website Integration Wizard. This wizard helps you complete your integration and test it afterward. If you have already implemented the integration, you can use the wizard only to test it.