Properties allowing to customize where and what analytics properties are sent. For a full list of
events, see AnalyticsEvent. For the accompanying analytics props of each event, see
AnalyticsEventWithProps.
Properties allowing to customize the appearance of the configurator. Useful for adjusting the layout and styling of the configurator to match the design of the website.
Most appearance-related properties can also be set using CSS variables. If both are provided, CSS variables take precedence.
Properties that can be used for custom handling of the checkout process or just to get some information from the checkout process.
Order of the checkout process is as follows:
checkoutInitCallback is called and awaited. If the callback was specified and
returned false, the process stops here.checkoutSecondaryButtonsConfigurationSummary, the user is able to proceed by
clicking one of the secondary buttons, calling its callback in the next step instead.checkoutItemAmountsCallback is called and awaited. If the callback was
specified and returned false, the process stops here.checkoutSecondaryButtonsContactDetails, the user is able to proceed by clicking one
of the secondary buttons, calling its callback in the next step instead. Process does not
continue until the contact details are valid.checkoutContactDetailsCallback is called and awaited. If the callback was
specified and returned false, the process stops here.Use texts parameter of RavakConfigurator.init instead
Properties allowing to customize some of the texts displayed in the configurator. You need to
handle the translations yourself and provide the text in the desired language.
OptionalconsumerConsumer identifier for resolution of product prices, availability and more. For example
"ravak-cz"
OptionallanguageLanguage used for localization of the configurator. For example "en"
If not provided, the language of the website is used, which is determined by the lang
attribute of the <html> element.
OptionalpresetIdentifier of the initial preset configuration. The default preset will be used if not specified.
OptionalanalyticsList of additional analytics plugins to be used by the configurator
The array should contain valid AnalyticsPlugin instances compatible with npm package
analytics. This property enables integrating
analytics with your own system.
Note: The provided plugins are appended to the default set, not replacing them.
import type { AnalyticsPlugin } from 'analytics';
import googleTagManager from '@analytics/google-tag-manager';
const analyticsPlugins: AnalyticsPlugin[] = [googleTagManager({ containerId: 'GTM-xyz123' })];
OptionalanalyticsStatic payload to be added to every analytics event
OptionalcontainerMaximum width that the inner content should visually take-up. For example 1600px or
max(1232px, 80vw)
Useful for matching the apparent width of the configurator to the width of the adjacent container on the website where it is displayed.
Can also be set using CSS variable --configurator-container-width.
OptionalheightOffset of the configurator's height to the full viewport height
Useful for adjusting configurator's apparent height while compensating for sticky headers or
anchored titles on the website where it is displayed. For example 180px on 1000px tall
viewport would result in 820px tall configurator. Should not be changed dynamicaly, as that
would result in unpleasant movement of the UI.
Can also be set using CSS variable --configurator-height-offset.
OptionaltopOffset of the inner UI elements from the top edge of the viewport when scrolling
Useful for adjusting for sticky headers on the website where it is displayed. Should the height of the sticky header change dynamically, this option should be adjusted accordingly (using CSS variable below) so that the UI never hides behind the sticky header.
Can also be set using CSS variable --configurator-top-offset.
OptionalcheckoutCallback that can be called when the user initializes the checkout process
OptionalcheckoutCallback that can be called after the user decided how many items they want
OptionalcheckoutCallback that can be called after the user successfully submitted their contact details
OptionalcheckoutAdditional secondary buttons displayed in the footer of the checkout form during configuration summary where the user can decide how many items they want
OptionalcheckoutAdditional secondary buttons displayed in the footer of the checkout form while the user fills in their contact details
OptionalcheckoutLabel of the Address field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.address.label instead
OptionalcheckoutLabel of the City field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.city.label instead
OptionalcheckoutLabel of the Country field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.country.label instead
OptionalcheckoutLabel of the Email field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.email.label instead
OptionalcheckoutLabel of the Message field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.message.label instead
OptionalcheckoutLabel of the Name and surname field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.nameAndSurname.label instead
OptionalcheckoutLabel of the Phone field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.phone.label instead
OptionalcheckoutLabel of the Zip code field in checkout
Use texts parameter of RavakConfigurator.init with key
checkout.contactDetailsForm.fields.zipCode.label instead
OptionalcheckoutTitle of the first step of a checkout (configuration summary)
If set to an empty string, the checkout form won't have a header during first step. If both
this and checkoutHeaderTitleContactDetails are set and not same and
checkoutItemAmountsCallback is not provided, the header will be displayed as a step
indicator.
Use texts parameter of RavakConfigurator.init with key
checkout.headerTitles.configurationSummary instead
OptionalcheckoutTitle of the second step of a checkout (contact details)
If set to an empty string, the checkout form won't have a header during second step. If both
this and checkoutHeaderTitleConfigurationSummary are set and not same and
checkoutItemAmountsCallback is not provided, the header will be displayed as a step
indicator.
Use texts parameter of RavakConfigurator.init with key
checkout.headerTitles.contactDetails instead
OptionalcheckoutTitle of the final screen of a checkout
If set to an empty string, the checkout result screen won't have a header.
Use texts parameter of RavakConfigurator.init with key
checkout.headerTitles.finished instead
OptionalcheckoutLabel of the primary button during the first step of a checkout (configuration summary)
By default it continues to the second step (contact details), unless stopped by
checkoutItemAmountsCallback.
Use texts parameter of RavakConfigurator.init with key
checkout.buttonLabels.continue instead
OptionalcheckoutLabel of the primary button during the second step of a checkout (contact details)
By default it sends the data and displays the result screen, unless stopped by
checkoutContactDetailsCallback.
Use texts parameter of RavakConfigurator.init with key
checkout.buttonLabels.send instead
OptionalcheckoutLabel of the primary button on the final screen of a checkout that closes the dialog
Use texts parameter of RavakConfigurator.init with key
checkout.buttonLabels.finish instead
OptionalcheckoutDescription of the Sent Sucessfully banner in the final screen of a checkout
Use texts parameter of RavakConfigurator.init with key
checkout.sentSuccesfully.description instead
OptionalcheckoutTitle of the Sent Sucessfully banner in the final screen of a checkout
Use texts parameter of RavakConfigurator.init with key
checkout.sentSuccesfully.title instead
OptionalstartLabel of the button that starts the checkout process
Use texts parameter of RavakConfigurator.init with key
configuration.summary.startCheckoutButtonLabel instead
OptionaltreatWhen true, makes the checkout appear as sending a question to a merchant instead sending
binding demand
Presets values to options checkoutFieldLabelMessage,
checkoutSentSuccesfullyBannerTitle and
checkoutSentSuccesfullyBannerDescription unless they have manually set values. If
checkoutItemAmountsCallback is also specified, a button will be added to
checkoutSecondaryButtonsConfigurationSummary.