info |
Prerequisite MoEngage 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 name | Description | Example |
pageType | Define the type of page. Standard page type values are Homepage, category, cart, checkout, success |
pageType: "Homepage" pageType: "category" |
category | Experiences can be targeted for any of the 4 levels of categories. |
category: { firstLevel: "Electronics", secondLevel: "Home Audio", thirdLevel: "Speaker", fourthLevel: "Bluetooth Speakers" } |
unitPrice | Target product pages based on the original price of the product | unitPrice: "24" |
salePrice | Target product pages based on the discounted price of the product | salePrice: "18" |
discount | Target product pages based on the discount amount on the product | discount: "25" |
currency | Target product pages based on the currency of the product | currency: "USD" |
custom |
Any other trait that you want to target for personalization. Example |
custom: { color: "White", size: "M", gender: "Male" } custom: { cartAmount: "750", cartDiscount: "0", cartQuantity: "4" } |
Finance
Attribute | Description | Example |
pageType |
Define the type of page. Standard page type values are Homepage, blog, service/products, resources/downloads, offers |
pageType: "Homepage" pageType: "products" OR pageType: "services" |
category | Experiences can be targeted for any of the 4 levels of categories. |
category: { firstLevel: "Insurance", secondLevel: "Health Insurance", thirdLevel: "Medical Insurance" } |
Reach out to us directly from your MoEngage Dashbaord -> Need Help? -> Contact Support or send an email to support@moengage.com.