Collaborative Ads allows producers, such as consumer-packaged goods advertisers, to run ad campaigns to drive people to seller platforms. Such platforms include online retailer websites or apps and those that can measure, retarget, and optimize towards people who have interacted with the producers' products on the seller platforms. Access to the Collaborative Ads features is provided on a limited basis only. Please contact your Facebook Representative.
To use Collaborative Ads features, the sellers need to implement the following required standard events with their respective parameters. If you're unfamiliar with app events and parameters, or you need to set up Facebook SDK for Android, see Getting Started with App Events for Android first.
The seller platform needs to provide the following standard events.
Event Name: AppEventsConstants Value | Event Description | Required Parameters | Optional Parameters |
---|---|---|---|
View Content: valueToSum: Price of item viewed (if applicable) | When a product page is viewed. A person lands on a product details page. |
|
|
Add to Cart: valueToSum: Price of item added (required) | When a product is added to the shopping cart. A person clicks on an add to cart button. |
| |
Purchase: Use the valueToSum: Purchase price (required) | When a purchase is made or checkout flow is completed. A person has finished the purchase or checkout flow and lands on thank you or confirmation page |
|
Parameter: AppEventConstants::EVENT_PARAM_* | Description | Value Type |
---|---|---|
Content: | A string of an array of JSON objects that contains the International Article Number (EAN) when applicable, or other product or content identifier(s) associated with the event (Product Group ID is not supported) and quantities of the products. Required: Example: Note: This parameter is required for |
|
Content ID: | Product IDs associated with the event, such as SKUs (Product Group ID is not supported). Example: |
|
Content Type: | Must be Note: |
|
Currency: | Currency for the value specified in ISO 4217 currency code. Example: |
|
Value: | Value of a user performing this event to the business.
Example: |
|
AppEventsLogger logger = AppEventsLogger.newLogger(this); Bundle params = new Bundle(); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "product"); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT, "[{\"id\": \"1234\", \"quantity\": 1}]"); params.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, "USD"); logger.logEvent(AppEventsConstants.EVENT_NAME_VIEWED_CONTENT, 90.0, params);
Or, with minimal parameters:
AppEventsLogger logger = AppEventsLogger.newLogger(this); Bundle params = new Bundle(); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "product"); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, "1234"); params.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, "USD"); logger.logEvent(AppEventsConstants.EVENT_NAME_VIEWED_CONTENT, 90.0, params);
Note: The minimal parameter setup is valid for ViewContent
only and not valid for AddToCart
and Purchase
.
AppEventsLogger logger = AppEventsLogger.newLogger(this); Bundle params = new Bundle(); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT, "[{\"id\": \"1234\", \"quantity\": 1}, {\"id\": \"5678\", \"quantity\": 1}]"); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "product"); params.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, "USD"); logger.logEvent(AppEventsConstants.EVENT_NAME_ADDED_TO_CART, 90.0, params);
AppEventsLogger logger = AppEventsLogger.newLogger(this); Bundle params = new Bundle(); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "product"); params.putString(AppEventsConstants.EVENT_PARAM_CONTENT, "[{\"id\": \"1234\", \"quantity\": 2}, {\"id\": \"5678\", \"quantity\": 1}]"); logger.logPurchase(BigDecimal.valueOf(15.98), Currency.getInstance("GBP"), params);
CONTENT: "[{\"id\": \"SKU-123\"}, {\"id\": \"SKU-456\"}]"
- Missing quantity
key.CONTENT_ID: "SKU-123,SKU-456,SKU-789"
- Missing an array symbol.CONTENT_ID: []
- Missing SKU IDs in an array.CONTENT_TYPE: "soap"
- The value is not "product"
.CURRENCY: "$"
- Cannot use a currency symbol format.valueToSum: "5000,00"
- Wrong format (should not be a string with comma).