Update Prices on Page

The IntelligemsReactProvider HOC is always required.

The <IgPrice/> Component

The <IgPrice/> component is recommended as it will color prices throughout your page while in Integration Mode.

The useIgPrices() Hook

The useIgPrices() hook may be used to get the updated prices based on the user's test group.

Internationalization

  1. Set a default activeCurrencyCode prop for IntelligemsReactProvider. USD will be used by default if not set.

  2. If necessary, update activeCurrencyCode through context:

const { setActiveCurrencyCode } = useContext(IntelligemsContext);
setActiveCurrencyCode("EUR")
  1. Experiment currency is set through the Intelligems app. Prices for Experiments with a currency != to activeCurrencyCode will return the original price.