Skip to main content

Overview

AI Sizing adds a “Find my size” button to your product pages. Shoppers answer a few quick questions and get an instant size recommendation — the experience runs in the Kleep drawer, on top of your page. The Kleep app also:
  1. Lets you customize the button’s UI directly in the Theme Editor
  2. Creates automated daily flows of Products, Orders and Returns data to keep recommendations up to date

Standard installation

The Kleep team installs AI Sizing for you (see the integration process). Under the hood it uses the Kleep app’s theme components — no theme code is modified:
  1. The Kleep App Embed is enabled (Online Store → Themes → Customize → App embeds → Kleep) — it loads the sizing experience.
  2. The Button app block is placed on the product template (Add block → Apps) and styled from the theme editor.
For the complete technical walkthrough (including V1 / legacy themes), see the AI Sizing — advanced installation guide.

CSS customization

You can customize the appearance of Kleep elements (buttons, popups, search) by adding custom CSS. Where to Add CSS In the Kleep App Embed settings, you’ll find an “Input custom CSS styles” field. Paste your custom CSS there. Screenshot_2025-08-13_at_13.25.30.png Custom CSS Field Example Customization

Manual installation

Use manual installation when your theme doesn’t support App Blocks — vintage themes (also called “legacy”, created before Online Store 2.0) — or when your team prefers to place Kleep’s code directly in the theme instead of using app blocks.
This section requires Shopify development knowledge (Liquid).
Prerequisites
  • Access to the theme code editor (Online Store → Themes → Edit code)
  • Kleep App Embed must be enabled in your Shopify admin (Online Store → Themes → Customize → App embeds → Kleep)
Step 1: Enable the App Embed In your Shopify admin, go to Online Store → Themes → Customize → App embeds and toggle on the Kleep app. Step 2: Call the Snippet Paste the following code where you want Kleep to appear. It must be part of Product info block within snippets folder:
Step 3: Create the Button Snippet Create a new file named kleep-button.liquid within your snippets folder. Put the following content inside:
Step 4: Add Settings Schema Add the following options to your Settings schema at the end of the section file:
Step 5: Validate Validate updates in the Shopify Theme Customize area. Configure visuals within product information block settings. Optional: Secondary Button If you want to add a secondary button, create a new file named kleep-secondary-button.liquid within your snippets folder:
Paste the following code where you want Kleep to appear. It must be part of Product info block within snippets folder.

Translations (i18n)

These translations are required for manual installations (they also cover the Similar Products button labels). Add the following translations to your theme locale files. English (en.json)
French (fr.json)
Italian (it.json)
German (de.json)
Spanish (es.json)
Japanese (ja.json)
Korean (ko.json)
Portuguese (pt.json)

Technical reference

AI Sizing button location on PDP The location is defined by DOM selectors inside KleepSDK.getConstants():
  • targetProductInfoBlockQueries – Array of selectors pointing to the main container of product details (title, price, sizes, etc.). The script iterates through these selectors and uses the first one it finds as the insertion point for the AI Sizing button or popups.
  • targetVariantQueries – Where size/variant options are. Once the product info block is found, the script searches inside it for variant elements (like size selectors). Each variant <label> (or equivalent) becomes a target for attaching the popup button.
Popup vs. Button (Desktop vs. Mobile) Device type is detected using checkIfMobile(): This function checks the browser’s navigator.userAgent string against a list of mobile devices (e.g., iPhone, Android, iPad).
  • Desktop: The button is displayed as hover popups next to the variant labels
  • Mobile: The script replaces hover popups with a single button, since hover interactions do not work on touch screens
Product Reference Configuration Kleep uses product references to match products across your catalog. Configure how to identify them: Reference Field: Where to find the brand’s product reference
  • Shopify SKU field
  • Metafield (specify which one)
  • Tags (with prefix, e.g., ref:ABC123)
Master Product Extraction: How to derive the master product ID from variant SKUs
  • Example: If variant SKUs are ABC123-S, ABC123-M, ABC123-L, the master product reference is ABC123
  • Rule: Take first 6 characters / Split by and take first part / Custom regex
Configure this in Kleep Dashboard → Settings → Product References. Customization Notes
  • Other variants of placement/layout are not provided beyond adjusting the selectors and CSS
  • To change appearance (colors, spacing, fonts, etc.), paste your CSS into the “Input custom CSS styles” box in the Kleep App Embed settings

Troubleshooting

The button doesn’t appear
  • ☑️ Verify that the Kleep App Embed is enabled (toggle ON)
  • ☑️ Make sure you saved the theme changes
  • ☑️ Clear your browser cache and reload the page
  • ☑️ Check that the product has size variants configured
Data mapping issues
  • ☑️ Check that your product data contains the expected fields (tags, metafields, etc.)
  • ☑️ Verify mappings in Kleep Dashboard → Settings → Data Mapping
  • ☑️ Re-run the product scan to refresh detected values
Still stuck? Contact support@kleep.ai.