> For the complete documentation index, see [llms.txt](https://docs.jentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jentis.com/data-activation/connectors/meta/event-setup.md).

# Event Setup

With your **Pixel ID** and **Conversion API** activated, the next step is to define the **events** that JENTIS should send to Meta. Events describe what happened on your website (e.g., a purchase, a form submission, or a page view).

### 1. Align Events with Business Goals

Before configuring anything in JENTIS:

* Review your **business requirements**.
* Decide **which visitor interactions** should be tracked (e.g., `Purchase`, `Lead`, `AddToCart`).
* Ensure that legal aspects (e.g., handling PII) are considered.

### 2. Define Events in Meta Business Manager

1. Go to [Meta Business Manager](https://business.facebook.com/) → **Events Manager**.
2. Select your **Pixel ID**.
3. In the **Events Setup**, choose which events to configure:
   * Standard events (e.g., `Purchase`, `Lead`, `PageView`)
   * Custom events (e.g., `NewsletterSignup`)

### 3. Configure Event Parameters

Each event requires **parameters** to provide additional context:

* **Standard Parameters** (handled automatically by JENTIS if activated):
  * `external_id` (internal user reference)
  * `fbc` (Meta Click ID cookie)
  * `fbp` (Meta Browser ID cookie)
  * `event_id` (Deduplication-ID)
* **Optional Parameters** (depending on business needs):
  * `email` (must be **hashed**)
  * `phone` (hashed)
  * `ip_address`, `user_agent`
  * product details (e.g., `value`, `currency`, `content_ids`)

Example configuration in Events Manager:

```
Event: Purchase
Parameters: value, currency, external_id, fbc, fbp, email
```

### 4. Handling Personally Identifiable Information (PII)

* Meta requires **PII values** (e.g., email, phone) to be **hashed** before submission.
* JENTIS will forward them as provided.
* Always hash data client-side before pushing it to JENTIS.

Example (pseudo-code, **do not run**):

```js
var emh = sha256("mail@address.com");

_jts.push({
  "track": "event",
  "group": "fbpii",
  "name": "purchase",
  "emh": emh
});
```

### 5. Confirm in Meta

After configuring events:

* Meta Events Manager will display each event.
* Ensure parameters are received and mapped correctly.
* Use the **Test Event Code** for real-time debugging before going live.

{% hint style="success" %}
Now your events and parameters are defined in Meta.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jentis.com/data-activation/connectors/meta/event-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
