App Events

App Events Best Practices for E-Commerce/Retail App

Updated: Jun 30, 2026
Copy for LLM
This guide is intended to be used as a starting point for your app and should be customized for your app’s needs. The example app provides a screen by screen breakdown of the different events and parameters that can be collected. At the end of it, there is a table that lists the recommended events and parameters for your app.

E-Commerce/Retail App Objectives

  • Understand conversion flow through app
  • Retarget users that have abandoned their cart
  • Find new users through lookalikes of high value users

ActivatedApp Event

Sample clothing app home screen, illustrating when the App Launch event fires

ActivatedApp Event Code Example:

/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
- (void)applicationDidBecomeActive:(UIApplication *)application {
    [FBSDKAppEvents activateApp];
}

Searched Event

Sample app search results for shirts, mapping the Search event to its Search String parameter
Searched Event Code Example:
/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
 - (void)logSearchedEvent :(NSString*)contentType
    searchString :(NSString*)searchString
    success :(BOOL)success {

NSDictionary *params =
    [[NSDictionary alloc] initWithObjectsAndKeys:
        contentType, FBSDKAppEventParameterNameContentType,
        searchString, FBSDKAppEventParameterNameSearchString,
        [NSNumber numberWithInt:success ? 1 : 0], FBSDKAppEventParameterNameSuccess,
        nil];

    [FBSDKAppEvents logEvent: FBSDKAppEventNameSearched
        parameters: params];
}

ViewedContent Event

Sample product detail screen mapping ViewedContent parameters: content type, ID, description, currency, value
ViewedContent Event Code Example:
/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
 - (void)logViewedContentEvent :(NSString*)contentType
    contentId :(NSString*)contentId
    currency :(NSString*)currency
    valToSum :(double)price {

NSDictionary *params =
    [[NSDictionary alloc] initWithObjectsAndKeys:
        contentType, FBSDKAppEventParameterNameContentType,
        contentId, FBSDKAppEventParameterNameContentID,
        currency, FBSDKAppEventParameterNameCurrency,
        nil];

    [FBSDKAppEvents logEvent: FBSDKAppEventNameViewedContent
        valueToSum: price
        parameters: params];
}

AddedToWishList Event

Product screen marked added to wish list, mapping AddedToWishList parameters: content type, ID, description, currency, value
AddedToWishList Event Code Example:
/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
 - (void)logAddedToWishlistEvent :(NSString*)contentId
    contentType :(NSString*)contentType
    currency :(NSString*)currency
    valToSum :(double)price {

NSDictionary *params =
    [[NSDictionary alloc] initWithObjectsAndKeys:
        contentId, FBSDKAppEventParameterNameContentID,
        contentType, FBSDKAppEventParameterNameContentType,
        currency, FBSDKAppEventParameterNameCurrency,
        nil];

    [FBSDKAppEvents logEvent: FBSDKAppEventNameAddedToWishlist
        valueToSum: price
        parameters: params];
}

AddedToCart Event

Added to cart confirmation dialog, mapping AddedToCart parameters: content type, ID, description, currency, value
AddedToCart Event Code Example:
/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
 - (void)logAddedToCartEvent :(NSString*)contentId
    contentType :(NSString*)contentType
    currency :(NSString*)currency
    valToSum :(double)price {

NSDictionary *params =
    [[NSDictionary alloc] initWithObjectsAndKeys:
        contentId, FBSDKAppEventParameterNameContentID,
        contentType, FBSDKAppEventParameterNameContentType,
        currency, FBSDKAppEventParameterNameCurrency,
        nil];

    [FBSDKAppEvents logEvent: FBSDKAppEventNameAddedToCart
        valueToSum: price
        parameters: params];
}

AddedPaymentInfo Event

Add new card form with card and billing fields, showing where the AddedPaymentInfo event fires
AddedPaymentInfo Event Code Example:
/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
 - (void)logAddedPaymentInfoEvent :(BOOL)success {

NSDictionary *params =
    [[NSDictionary alloc] initWithObjectsAndKeys:
        [NSNumber numberWithInt:success ? 1 : 0], FBSDKAppEventParameterNameSuccess,
        nil];

    [FBSDKAppEvents logEvent: FBSDKAppEventNameAddedPaymentInfo
        parameters: params];
}

InitiatedCheckout Event

Secure checkout summary mapping InitiatedCheckout parameters: description, content ID, coupon, currency, value
InitiatedCheckout Event Code Example:
/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
 - (void)logInitiatedCheckoutEvent :(NSString*)contentId
    contentType :(NSString*)contentType
    numItems :(int)numItems
    paymentInfoAvailable :(BOOL)paymentInfoAvailable
    currency :(NSString*)currency
    valToSum :(double)totalPrice {

NSDictionary *params =
    [[NSDictionary alloc] initWithObjectsAndKeys:
        contentId, FBSDKAppEventParameterNameContentID,
        contentType, FBSDKAppEventParameterNameContentType,
        [NSNumber numberWithInt:numItems], FBSDKAppEventParameterNameNumItems,
        [NSNumber numberWithInt:paymentInfoAvailable ? 1 : 0], FBSDKAppEventParameterNamePaymentInfoAvailable,
        currency, FBSDKAppEventParameterNameCurrency,
        nil];

    [FBSDKAppEvents logEvent: FBSDKAppEventNameInitiatedCheckout
        valueToSum: totalPrice
        parameters: params];
}

Purchased Event

Purchase thank-you screen mapping Purchased parameters: content type, description, item count, coupon, currency, value
Purchased Event Code Example:
/**
 * For more details, please take a look at:
 * developers.facebook.com/docs/reference/ios/current/class/FBSDKAppEvents
 */
 - (void)logPurchasedEvent :(int)numItems
    contentType :(NSString*)contentType
    contentId :(NSString*)contentId
    currency :(NSString*)currency
    valToSum :(double)price {

NSDictionary *params =
    [[NSDictionary alloc] initWithObjectsAndKeys:
        [NSNumber numberWithInt:numItems], FBSDKAppEventParameterNameNumItems,
        contentType, FBSDKAppEventParameterNameContentType,
        contentId, FBSDKAppEventParameterNameContentID,
        currency, FBSDKAppEventParameterNameCurrency,
        nil];

    [FBSDKAppEvents logPurchase:price
          currency: currency
        parameters: params];
}
Event Name Predefined Suggested Parameters
App Install
Yes
Launched App
Yes
Searched
Yes
SearchString
Viewed Content
Yes
ContentID, Content Type, Description, Currency, valueToSum
Added to Wishlist
Yes
ContentID, Content Type, Description, Currency, valueToSum
Added to Cart
Yes
Contents, ContentID, Content Type, Description, Currency, valueToSum
Initiated Checkout
Yes
ContentID, Content Type, Description, Currency, valueToSum
Added Payment Info
Yes
Purchased
Yes
Contents, ContentID, Content Type, Description, Currency, valueToSum, Number of Items