facebook.logEvent()

Type Function
Return value Event
Revision Release 2024.3703
Keywords Facebook, request
See also facebook.*

Overview

Used to log Facebook App Events.

Syntax

facebook.logEvent(eventName [,eventParams] [,valueSum])
eventName (required)

String. Event name to log for App Events. Can be a custom or following standard events: "achievedLevel", "adClick", "adImpression", "addedPaymentInfo" , "addedToCart", "addedToWishlist", "completedRegistration", "completedTutorial" , "contact", "customizeProduct", "donate", "findLocation" , "initiatedCheckout", "rated", "searched", "spentCredits" , "startTrial", "submitApplication", "subscribe", or "viewedContent". For more information, see this document

eventParams (optional)

Table. Table of key/value pairs passed as params for FB App Events. Can be a key/value or use the standard keys: "adType", "content", "contentID", "contentType" , "currency", "description", "level", "maxRatingValue", "numItems", "orderID", "paymentInfoAvailable" , "registrationMethod", "searchString", or "success". For more information, see this document.

valueSum (optional)

Number. Number value passed as params for FB App Events. For more information, see this document.

Examples

Log Achieved Level
facebook.logEvent( "achievedLevel", { level="Level 1" } )
Log Spend Credits
facebook.logEvent( "spentCredits", { contentID="skin1", contentType="skin", content="solar skin" }, 12 ) -- Total value of credits spent=12