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. Required attributes are marked with an asterisk (*).
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.
braInputMandatory
type: boolean
; default: false
This attribute makes the bra input field mandatory for women’s clothing.
buttonText
type: string
This attribute changes the default text of the button.
- Default
- Custom
clientId
*
type: string
; required
This is the client identifier provided by us. It allows us to recognize you in our database.
shopCountry
type: string
This attribute sets the country of the shop. It will be used to segment data in the back-office dashboard. It’s expected to contain ISO 3166-1 alpha-2 plus a ww
code if you need a “worldwide” aggregation.
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.
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).
logo
type: string
This attribute allows you to change the default appearance of the logo.
- Default
- Small
productId
*
type: string
; required
This is the identifier for the product. It has to be the same provided with feeds and events.
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.
tooltipPosition
type: string
This attribute changes the default position of the tooltip if it is hidden due to the widget’s location.
- Default
- Left