# JENTIS Meta Tracking Implementation

With the Pixel, Conversion API (CAPI), and events prepared in Meta Business Manager, the last step is to configure the actual implementation in your DCP.

The JENTIS integration ensures that both **frontend (browser pixel)** and **server-side (CAPI)** tracking are aligned, deduplicated, and enriched with high-quality data.

### 1. Create and Configure the Meta Tool

1. Navigate to **Connectors** in your DCP.
2. Create a new **Tool** and select **Meta**.
3. Fill in the mandatory parameters:
   * **Pixel ID** → from your Meta Business Manager
   * **Access Token** → generated when enabling CAPI
4. Optionally set:
   * **Partner Agent String** → for debugging
   * **Test Event Code** → to verify events in Meta Test Events

👉 The Pixel ID is used for **client-side tags**, the Access Token for **server-side tags**.

### 2. Create and Configure a Meta Tracker

1. Go to **Trackers** in JTM.
2. Add a new **Meta Tracker**.
3. This tracker acts as the central reference object for all Meta-related tags.
4. It connects frontend and server-side events to the same Pixel.

### 3. Frontend Tracking Setup

1. Review the data points already available in your JENTIS setup.
2. Add extra **events and parameters** required for Meta (e.g., `Purchase`, `Lead`, PII data).
3. Make sure PII (such as email, phone) is **hashed** client-side before being submitted to JENTIS.

Example of pushing a hashed email:

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

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

In **Preview Mode** of JENTIS, you should see the event arriving with the hashed value.

### 4. Server-Side Tag and Trigger Setup

#### Create a Tag

1. Navigate to **Tag Manager** → **Tags** → Create new tag.
2. Select the **Meta Tracker** and the **event template** (e.g., `Purchase`, `Lead`).
3. Map required parameters:
   * `em` → references `emh` (hashed email from frontend event)
   * `fbc`, `fbp` → mapped automatically by JENTIS
   * Pixel ID + Access Token → reference from Tracker

#### Create a Trigger

1. Navigate to **Triggers** → Create new trigger.
2. Define the conditions for when the tag should fire.
   * Example: Fire when event group = `fbpii`.
3. Attach the trigger to the tag.

Now, whenever the event occurs, JENTIS will send the data to **Meta CAPI**.

### 5. Debugging & Verification

* Use **JTM Preview Mode** to check incoming data.
* Use the **Test Event Code** in your Pixel to verify events are arriving in Meta in real time.
* Ensure deduplication is set up if both frontend and server-side send the same events.

### 6. Go Live

Once testing is complete:

1. Remove or disable the test code.
2. Publish the configuration in JENTIS.
3. Monitor event delivery and quality in **Meta Business Manager → Events Manager**.

{% hint style="success" %}
With this implementation, JENTIS ensures that **frontend and server-side Meta tracking** are synchronized, privacy-compliant, and optimized for event quality.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jentis.com/data-activation/connectors/meta/jentis-meta-tracking-implementation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
