💎
Headless Docs
Version 0.2.0
Version 0.2.0
  • Overview
  • Change Log
  • Next.js Steps
    • Requirements
    • Determine Page Methods
      • Route Hashing Method
      • Cookies Method
    • Install Middleware
    • Add Intelligems Provider
    • Read User Context
      • Route Hashing Method
      • Cookies Method
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Gatsby Steps
    • Requirements
    • Add Intelligems Provider
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Pack Digital Steps
    • Requirements
    • Add Intelligems Provider
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Examples
    • Content Testing
  • Reference
    • Middleware Objects
      • IgMiddlewareConfig
      • IgMiddlewareHandler
    • Providers
      • Next.js
      • Gatsby
    • Components
      • Price Components
    • Hooks
      • Price Hooks
      • Track Hooks
      • Experiment Hooks
      • Test Group Hooks
      • Cart & Checkout Hooks
Powered by GitBook
On this page
  • The <IgPrice/> Component
  • The useIgPrices() Hook
  • Internationalization
  1. Gatsby Steps

Update Prices on Page

PreviousTrack Page ViewsNextUpdate ATC Events

The HOC is always required.

The <IgPrice/> Component

The component is recommended as it will color prices throughout your page while in .

The useIgPrices() Hook

The 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.

IntelligemsReactProvider
Integration Mode
useIgPrices()
<IgPrice/>