MCPcopy Create free account
hub / github.com/Iterable/react-native-sdk / trackPurchase

Method trackPurchase

src/core/classes/IterableApi.ts:216–227  ·  view source on GitHub ↗

* Create a `purchase` event on the current user's Iterable profile, populating * it with data provided to the method call. * * @param total - The total cost of the purchase * @param items - The items included in the purchase * @param dataFields - The data fields to track

({
    total,
    items,
    dataFields,
  }: {
    total: number;
    items: IterableCommerceItem[];
    dataFields?: unknown;
  })

Source from the content-addressed store, hash-verified

214 * @param dataFields - The data fields to track
215 */
216 static trackPurchase({
217 total,
218 items,
219 dataFields,
220 }: {
221 total: number;
222 items: IterableCommerceItem[];
223 dataFields?: unknown;
224 }) {
225 IterableLogger.log('trackPurchase: ', total, items, dataFields);
226 return RNIterableAPI.trackPurchase(total, items, dataFields);
227 }
228
229 /**
230 * Create an `inAppOpen` event for the specified message on the current user's profile

Callers

nothing calls this directly

Calls 2

logMethod · 0.80
trackPurchaseMethod · 0.65

Tested by

no test coverage detected