Skip to content

Commit

Permalink
adds additional track purchase function
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Greer committed Apr 9, 2024
1 parent e3173f1 commit f925e44
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,20 @@ public void trackPurchase(double total, @NonNull List<CommerceItem> items) {
trackPurchase(total, items, null, null);
}

/**
* Tracks a purchase.
* @param total total purchase amount
* @param items list of purchased items
* @param dataFields a `JSONObject` containing any additional information to save along with the event
*/
public void trackPurchase(double total, @NonNull List<CommerceItem> items, @Nullable JSONObject dataFields) {
if (!checkSDKInitialization()) {
return;
}

apiClient.trackPurchase(total, items, dataFields, null);
}

/**
* Tracks a purchase.
* @param total total purchase amount
Expand Down

0 comments on commit f925e44

Please sign in to comment.