Widget Attributes
In the widget overview, we explain how to use the widget on a product page through a custom HTML element. The attributes you provide during setup enable communication with Fitle’s APIs and help customize the user experience.
Custom Element Attributes
Below is a list of attributes you can use with the custom element.
clientId
type: string
; required
This is the client identifier provided by us. It allows us to recognize you in our database.
productId
type: string
; required
This is the identifier for the product. It has to be the same provided with feeds and events.
availableSizes
type: string
(sizes separated by commas); required
This attribute lists the available sizes for the product. Customers should be able to select any of these sizes on the product page.
productImageUrl
type: string
; required
This is the URL for the product’s image, which is displayed in the recommendation process. Relative paths are not supported, so make sure to provide the full URL.
language
type: string
; default: en
(English)
This attribute sets the language for the widget. It can be automatically detected on your website; otherwise, it defaults to en
(English).
braInputMandatory
type: boolean
; default: false
This attribute makes the bra input field mandatory for women’s clothing.
debug
type: boolean
; default: false
This attribute is for developers during implementation. When set to true
, it enables logging in the console for debugging purposes.
logo
type: string
This attribute allows you to change the default appearance of the logo.
- Default
- Small
buttonText
type: string
This attribute changes the default text of the button.
- Default
- Custom
tooltipPosition
type: string
This attribute changes the default position of the tooltip if it is hidden due to the widget’s location.
- Default
- Left