Example: eCommerce Website and Mobile App

This topic is an example of how to apply to concepts in Designing Your Data to a specific scenario. In this scenario, you have a website and mobile application for an e-commerce business. The website uses Facebook Pixels while the mobile app integrates the Facebook SDK. This example shows how you can use pre-defined events to instrument both your website and mobile app.

Goal

The goal is to let a user purchase an item using the website or mobile application. You are using Facebook Analytics to see the route that the user takes to purchase an item so that you can optimize the experience.

Successful Route

  1. Enter the website or install and start the app - the user finds the website through a search engine result or install the mobile app from the recommendation in a blog.

  2. Search for an item - the user looks for a specific item by entering terms in the search bar of the website or mobile app.

  3. View an item from the result list - the user selects an item from the search results to get more details.

  4. Add an item from the search results to a wish list - the user the currently viewed item to the wish list.

  5. Move an item to a shopping cart from a wish list - the user moves an item to the shopping from the wish list.

  6. Start the checkout process - the user begins the process to purchase the items in the shopping cart.

  7. Complete the registration -; since this is the first time the user ordered from the website or app, the user has to complete the registration process.

Events and Parameters

The following table shows the events and parameters to use for each step in a successful route.

StepEvent to UseEvent TypeParameter

Enter the website or install and start the mobile app.

App Install and App Launch

Automatically logged

Search for an item.

Searched

Pre-defined

contentType, contentData, contentID, searchString, success

View an item from the result list.

Viewed content

Pre-defined

contentType, contentData, currency, price

Add an item to the wish list from the results list.

Added to Wishlist

Pre-defined

contentType, contentData, currency, price

Move an item to the shopping cart from the wish list.

Added to Cart

Pre-defined

contentType, contentData, currency, price

Checkout.

Initiate checkout

Pre-defined

contentType, contentData, numItems, paymentInfoAvailable

Complete the registration.

Completed registration

Pre-defined

registrationMethod

Data Dictionary

The following table describes the parameters used in the events.

ParameterDescriptionData TypeNotes

contentData

Description of the item

String

contentID

Unique number the describes the search terms and results

String

Each number is unique.

contentType

Category of the item

String

currency

Currency of the price of the item

String

numItems

Number of items in the cart

Integer

paymentInfoAvailable

The payment information is available

Integer

1 if the information is available. Otherwise 0.

price

The price of the item

Double

registrationMethod

Describes the method the user used in the registration process

String

possible values are email, Facebook, Google, or Twitter.

totalPrice

The total price of all items in the cart.

Double