Sleek’s SDK can extract product information from the pages your users are visiting. To enable this experience for your users, you’ll need to call Sleek on the pages that you want to extract product information from. This documentation will guide you through the integration process.

This document assumes that you have already integrated the Sleek SDK into your extension. If you haven’t, please refer to the SDK integration guide.

Enable product extraction

After Sleek is installed and setup in your extension, you are ready to extract product information from the pages your users are visiting.

To extract product information from a page, call the extractProductsOnTab method.

import { getSdkInstance } from "@sleek/web-ext-coupon-sdk";

getSdkInstance().extractProductsOnTab(tabId); // Returns Promise<Product[] | undefined>.

Sleek will only return products on pages that are classified as productDetailPage or cart. To determine the page classification, you can use the classifyPageOnTab method. See the page classification guide for more information.


What’s next:

Now that you have enabled product extraction in your extension, you can check out the TypeDoc for specific event types and methods on the SDK.

View TypeDoc

Browse the reference TypeDoc for the SDK.