Skip to main content

Documentation Index

Fetch the complete documentation index at: https://moengage.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

PrerequisiteMoEngage Personalize SDK must be integrated on your webpage to define custom attributes.

What are custom attributes?

Custom attributes are used to define what pages on a website and what values on those pages can be used to personalize the experience for visitors. It helps you avoid configuring a combination of multiple URLs to deliver the experience on the right set of pages. Below are the set of standard fields that can be used as a targeting criterion:
  • pageType
  • category
    • firstLevel
    • secondLevel
    • thirdLevel
    • fourthLevel
  • unitPrice
  • salePrice
  • currency
Any values apart from the above can be defined in the custom block and then used for targeting.
window.moePageContext = {
  pageType: "product page",
  category: {
    firstLevel: "Clothing & Accessories",
    secondLevel: "T-shirts",
    thirdLevel: "Polos"
  },
  unitPrice: "24",
  salePrice: "18",
  discount: "25",
  currency: "USD",
  custom: {
    size: "Medium",
    color: "Black",
    gender: "Unisex"    
  }    
};
Below are some examples of using custom attributes

E-commerce

Field nameDescriptionExample
pageTypeDefine the type of page. Standard page type values are: Homepage, category, cart, checkout, successpageType: "Homepage"
OR
pageType: "category"
categoryExperiences can be targeted for any of the 4 levels of categories.category: { firstLevel: "Electronics", secondLevel: "Home Audio", thirdLevel: "Speaker", fourthLevel: "Bluetooth Speakers" }
unitPriceTarget product pages based on the original price of the product.unitPrice: "24"
salePriceTarget product pages based on the discounted price of the product.salePrice: "18"
discountTarget product pages based on the discount amount on the product.discount: "25"
currencyTarget product pages based on the currency of the product.currency: "USD"
customAny other trait that you want to target for personalization.

Example: Personalize all pages that display White, Medium-size Polo T-shirts for Men
OR
Personalize checkout page only when the cart value is $500 or above and cart discount is 0 and cart contains at least 2 items.
custom: { color: "White", size: "M", gender: "Male" }
OR
custom: { cartAmount: "750", cartDiscount: "0", cartQuantity: "4" }

Finance

AttributeDescriptionExample
pageTypeDefine the type of page. Standard page type values are: Homepage, blog, service/products, resources/downloads, offerspageType: "Homepage"
OR
pageType: "products"
OR
pageType: "services"
categoryExperiences can be targeted for any of the 4 levels of categories.category: { firstLevel: "Insurance", secondLevel: "Health Insurance", thirdLevel: "Medical Insurance" }
For further assistance, please contact your MoEngage Customer Success Manager (CSM) or the Support team.