---
title: Facebook
slug: experience/facebook
description: This document provides important information about Facebook integrations and the tracking service. It includes a comprehensive list of official websites and developer integration URLs for Android and iOS. The document also presents an event support matrix
docTags: 
createdAt: 2023-06-30T14:37:54.106Z
---

# Summary

## Official websites

| **Site**      | **URL**                                                                                            |
| ------------- | -------------------------------------------------------------------------------------------------- |
| Website       | [https://developers.facebook.com](https://developers.facebook.com)                                 |
| Documentation | [https://developers.facebook.com/docs/app-events](https://developers.facebook.com/docs/app-events) |

## Developer integrations

| **Platform** | **URL**                                                                                              |
| ------------ | ---------------------------------------------------------------------------------------------------- |
| Android      | [https://github.com/facebook/facebook-android-sdk](https://github.com/facebook/facebook-android-sdk) |
| iOS          | [https://github.com/facebook/facebook-ios-sdk](https://github.com/facebook/facebook-ios-sdk)         |
| Web          | <font color="#ff6900">not supported by Purple</font>                                                 |

# Tracking service

## Event support matrix

Overview of the supported events and their configuration.

|                                            | **Templates**                         | **Parameter**                          |
| ------------------------------------------ | ------------------------------------- | -------------------------------------- |
| <font color="#2166ae">**Actions**</font>   | <font color="#3b9f0f">*action*</font> | <font color="#3b9f0f">supported</font> |
| <font color="#2166ae">**Purchases**</font> | <font color="#3b9f0f">*action*</font> | <font color="#3b9f0f">supported</font> |

<font color="#2166ae">**Views**</font> and <font color="#2166ae">**Attributes**</font> are not supported.

## General structure in tracking\_config.json

:::hint{type="info"}
Tracking service key name in "*tracking\_config.json*" is:
"<font color="#2166ae">**facebook**</font>"
:::

:::CodeblockTabs
General structure

```json
{
  
  "facebook": {
    "eventsEnabledByDefault": true,
    "viewsEnabledByDefault": false,
    "purchasesEnabledByDefault": true,
    "attributesEnabledByDefault": false,
    
    "events": {
      // your configured list of events
    },
    
    "views": {},
    
    "purchases": {
      // your configured list of events
    },
    
    "attributes": {} 
    
  }
  
}
```
:::

## Event configuration

### Actions

Facebook supports action events.&#x20;

:::CodeblockTabs
Action event

```json
"action_event_key": {
  "templates": {
    "action": "value of template"
  },
  "parameters": {
    "parameter_key_1": "value of parameter",

    // your configured list of parameters
  }
}
```

Example

```json
"ISSUE_DOWNLOADED": {
  "templates": {
    "action": "issue_downloaded"
  },
  "parameters": {
    "issue_id": "{{ISSUE_ID}}",
    "issue_name": "{{ISSUE_NAME}}",
    "issue_categories": "{{ISSUE_CATEGORIES}}",
    "issue_tags": "{{ISSUE_TAGS}}",
    "issue_purchasable": "{{ISSUE_PURCHASABLE}}",
    "issue_purchased": "{{ISSUE_PURCHASED}}",
    "publication_id": "{{PUBLICATION_ID}}",
    "publication_name": "{{PUBLICATION_NAME}}"
  }
}
```
:::

### Views

Facebook does not suppport view events.

### Purchases

Facebook supports action events.&#x20;

:::CodeblockTabs
Purchase event

```json
"purchase_event_key": {
  "templates": {
    "name": "value of template"
  },
  "parameters": {
    "parameter_key_1": "value of parameter",
        
    // your configured list of parameters
  }
}
```

Example

```json
"STOREFRONT_ISSUE_PURCHASED": {
  "templates": {
    "action": "issue_purchased"
  },
  "parameters": {
      "transaction_id": "{{TRANSACTION_ID}}",
      "issue_product_id": "{{PRODUCT_ID}}",
      "issue_price": "{{PRICE}}",
      "issue_price_currency": "{{CURRENCY_CODE}}",
      "issue_id": "{{ISSUE_ID}}",
      "issue_name": "{{ISSUE_NAME}}",
      "issue_type": "{{ISSUE_TYPE}}",
      "issue_categories": "{{ISSUE_CATEGORIES}}",
      "issue_tags": "{{ISSUE_TAGS}}",
      "issue_price_formatted": "{{ISSUE_PRICE}}",
      "issue_latest": "{{ISSUE_LATEST}}",
      "publication_id": "{{PUBLICATION_ID}}",
      "publication_name": "{{PUBLICATION_NAME}}",
      "publication_type": "{{PUBLICATION_TYPE}}"
  }
}
```
:::

### Attributes

Facebook does not support attributes.

## Additional supported functionality

No additional features which may be provided by Facebook are currently supported.

# How to configure

## Native Purple App

Any native Tracking Service is configured in the <font color="#2166ae">**Purple Manager.**</font>

### Enable SDK

:::hint{type="info"}
***Settings location***

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Consent/Push/Analytics**</font>" => "<font color="#2166ae">**Analytics (General/iOS/Android/Web)**</font>"
:::

| **Setting**         | **Description**                                                 |
| ------------------- | --------------------------------------------------------------- |
| **Enable Facebook** | To enable the Facebook SDK in your app, activate this checkbox. |
| **Facebook App ID** | App id from your facebook app.                                  |

### Apple privacy / ATT

:::hint{type="info"}
***Settings location***

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Consent/Push/Analytics**</font>" => "<font color="#2166ae">**Privacy**</font>"
:::

### Consent management

:::hint{type="info"}
**Settings location:**

"<font color="#2166ae">**Your app**</font>" => "<font color="#2166ae">**Consent/Push/Analytics**</font>" => "<font color="#2166ae">**Consent Management**</font>"
:::

| **Setting**                | **Description**                                               |
| -------------------------- | ------------------------------------------------------------- |
| **Vendor-ID for Facebook** | The Vendor-ID is provided by the consent management platform. |

## Web integration

Purple does not support Facebook web integration.
