Enable page classification
After Sleek Web Extension is installed and setup in your extension, you are ready to enable page classification.Automatically classify pages
To automatically classify pages, setfeatureControls.emitPageClassification to
true in the web extension SDK’s options during initialization.
PAGE_CLASSIFIED
event to be notified when a page has been classified.
Register for page classification events
Sleek’s web extension SDK automatically emits events when pages are classified. Subscribe to
the PAGE_CLASSIFIED event to be notified when a page has been classified.
For example, you might want to show different UI based on what type of page the
user is viewing. To do so, you can follow a pattern like:
Manually classify pages
In addition to automatic emission of page class, you can manually classify a page by calling theclassifyPage method.
Available page classifications
The web extension SDK can classify pages into the following categories:cart- A shopping cart pagecheckout- A checkout pagecheckoutComplete- A completed checkout pagecollection- A category/collection page listing productscustomersAccount- A customer account pagecustomersAuthentication- A login or registration pagecustomersOrders- A customer orders history pagehome- A website’s homepageproduct- A product detail pagesearch- A search results pageother- An e-commerce page that doesn’t fit other categoriesnonShopping- A page that is not shopping related
View TypeDoc
Browse the reference TypeDoc for the web extension SDK.

