Facebook is a tracking service which supports tracking events (actions and purchases). It also supports tracking the installation of the app.
General
For setting up the App in Facebook Analytics use the following information:
Android Class Name: depends on Template version:
until 8.0: com.sprylab.purple.android.app.purple.splash.SplashActivity
starting with 8.0: com.sprylab.purple.android.MainActivity
Andriod Key Hash (Preview Apps): VnOtQRWs9tYehKQDf9SeALlqsxc=
For Release Apps you need to create a hash from your release keystore. See the official Facebook documentation for more information.
Changelog
- Standard 2.1: Initial availability
- Standard 3.5: Support for custom parameters added
- Standard 7.0: Support for value parameter added
Events
Overview
Key-Name in Config | Action Templates | Actions: Custom Parameters | View Templates | Views: Custom Parameters | Purchase Templates | Purchases: Custom Parameters | Attribute Templates |
---|---|---|---|---|---|---|---|
| supported | unsupported | supported | unsupported |
Info |
---|
Templates in bold are required. |
Actions
Facebook supports tracking of action events. The actual value sent to Facebook is configured through a template with the key action.
Additionally, a custom parameter named value can be used to attach a value to the event.
Info |
---|
Event names and parameter names length must be under 40 characters and contain only alphanumeric characters, ‘_’, ‘-‘ or spaces, and cannot start with a space or hyphen. For more information please see the official Facebook documentation. |
Views
Facebook does not support view events.
Purchases
Facebook supports tracking of purchase events. Purchase events only send the price and currency for the purchase. The product id can be sent with custom parameters.
Warning |
---|
“Log In-App Purchase Events Automatically on iOS” setting should be disabled otherwise in-app purchases logging will be duplicated. To disable the setting follow the steps below:
For more information please see the official Facebook documentation. |
Attributes
Facebook does not support storing attributes per user.
Event parameters
Facebook supports sending custom parameters for actions and purchases.
Info |
---|
An event can have up to 25 parameters. This doesn’t just mean for each call, but for all invocations that use that event name. If you need to remove obsolete parameters - you can deactivate parameters by following the instructions in the Facebook help center. The length of each parameter value can be no more than 100 characters. For more information please see the official Facebook documentation. |
Configuration Example
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "facebook": { "events": { "APP_BOOKMARK_ADDED": { "templates": { "action": "Bookmark added {{CONTENT_NAME}}" }, "parameters": { "pageinfo.brand": "purple" } } }, "purchases": { "KIOSK_ISSUE_PURCHASED": { "templates": { "action": "Issue purchased {{ISSUE_ID}}" }, "parameters": { "product": "{{PRODUCT_ID}}", "issue.id": "{{ISSUE_ID}}" } } } } } |