# Conversions API: tell Meta and TikTok about the confirmed sale

> In Algeria most sales don’t happen in a single moment: the student transfers by CCP or BaridiMob, uploads the receipt and closes the page, and you approve the receipt hours later or the next day. At that moment no browser is open, so the pixel **cannot** report the sale. The **Conversions API** (Meta) and the **Events API** (TikTok) solve this: Dirassa Plus’s own servers tell the ad network about the order when it is sent and about the confirmed sale when you approve it, and tie both to the ad click. Your part: generate a **token** in Events Manager and paste it in “Tracking”. One complete example: Sara Makhloufi, a video-editing trainer at “En-Nadjah Academy”, advertises “Video editing from scratch” (4,500 DZD). Yacine Bouzid pays by CCP receipt on Tuesday evening, Karim Haddad approves it on Wednesday morning, and the sale reaches Meta tied to the Instagram ad Yacine clicked. The same goes for a marketing coach selling a workshop, or a photographer selling a pack of sessions.

- Time: About 10 minutes to set up
- Who can do it: The token goes in “Tracking”, which needs the “SEO and tracking” permission (owner and Admin by default). At Meta or TikTok you need admin access to the pixel to generate the token.
- Updated: 2026-10-27
- URL: https://www.dirassaplus.com/en/guide/conversions-api

## In short
1. Why: a receipt sale is confirmed after the student closed the page, so only the server can report it.
2. The token: generated in the pixel’s settings in Events Manager, pasted into “Conversions API token”, and the badge turns “Ready”.
3. Events: Lead when the student sends an order by receipt or delivery, Purchase when the sale is confirmed: your approval, online payment, delivery or cash collection.
4. No double counting: the order carries the same ID from the browser and from the server, so it counts once.
5. Matching: email, phone and name hashed, click data kept with the order until the day it is approved.
6. Testing: “Test codes” from Test events, then clear them as soon as the test is over.
7. Following up: in Events Manager, since Dirassa Plus shows no event log.

## Before you start
- The pixel ID typed in “Tracking”: the “Meta and TikTok pixels” lesson.
- Admin access to the pixel in Business Manager or TikTok Ads Manager, to generate the token.
- The “SEO and tracking” permission in your workspace.
- A payment method ready: CCP and BaridiMob by receipt, or EDAHABIA and CIB: the “Payment methods” lesson.

## The steps

### 1. Why the pixel isn’t enough
Follow one order: Yacine clicks Sara’s Instagram ad on Tuesday at 21:40, opens the course page, transfers 4,500 DZD by BaridiMob, uploads the receipt and puts his phone down. The pixel saw the visit and the order (Lead). On Wednesday at 09:15, Karim approves the receipt in “Incoming”: that is the real sale, and Yacine isn’t on the page. Without the server, Meta never learns that this ad brought 4,500 DZD. With the token, Dirassa Plus’s server sends Purchase at the very moment of approval. On top of that, ad blockers and some browsers’ privacy protections sometimes stop the pixel; the server doesn’t go through the browser. That is why the badge only turns “Ready” with both: the “Pixel ID” and the “Conversions API token”.
On screen: «Incoming»، «Ready»، «Pixel ID»، «Conversions API token»
Tip: If all your sales go through receipts, the token matters more than the pixel itself: without it, your campaigns count orders and know nothing about confirmed sales.
Heads-up: The “Incomplete” badge means Purchase is never sent. A campaign optimised for Purchase without the token learns from nothing.

### 2. Generate the token and paste it
At Meta: Events Manager → the pixel → “Settings” → the Conversions API section → “Generate access token”. The token shows once: copy it right away. At TikTok: Events Manager → “Web Events” → the pixel → “Settings” → Events API → “Generate Access Token”. Then in Dirassa Plus: “Settings” → “Tracking”, paste the token into “Conversions API token” (“Paste the token”) under the same network, and leave the field. The badge turns “Ready”. Once saved, the token shows as dots (••••••••) and never comes back to the browser. To change it, paste a new one over the dots; to stop it, empty the field. Note: the platform doesn’t test the token on save, so a wrong token saves without error and is then silently refused by Meta.
On screen: «Generate access token»، «Generate Access Token»، «Settings»، «Tracking»، «Conversions API token»، «Paste the token»، «Ready»
Tip: Paste the token in the right place: Meta’s under “Facebook / Instagram (Meta)”, TikTok’s under “TikTok”. A network’s token only works with its own pixel.
Heads-up: The token is a key that lets anyone send events in your pixel’s name. Don’t send it in a message or a screenshot; if it leaks, revoke it in Events Manager and generate another.

### 3. What the server sends, and when
Lead (SubmitForm at TikTok): when the student sends a pending order: uploads a CCP or BaridiMob receipt for a course, from checkout or from inside their portal, or orders an activation card by delivery. Purchase (CompletePayment at TikTok): when the sale is confirmed, at one of four moments: when you press “Approve” on an order in “Incoming” (a course, a session pack, a paid community, a product, or a transfer from abroad); when an online payment by EDAHABIA, CIB or PayPal is confirmed, with nothing for you to do; when you press “Mark delivered” on the activation card; or when the cash collection for a cash-on-delivery product is confirmed, not before. The value is the order amount, in dinars, or in the student’s currency for international sales (30 EUR, say), with the ID and name of the course, product, community or pack. Nothing is sent for a rejection, a free enrolment or a code activation.
On screen: «Approve»، «Incoming»، «Mark delivered»
Tip: Sara’s week: 12 Leads (receipts uploaded), Karim approves 10, so 10 Purchases worth 45,000 DZD. The two rejections sent nothing, so her campaign learns only from real buyers.
Heads-up: Purchase goes out at approval, not at transfer. A receipt left waiting three days reaches Meta three days later: approve receipts every day, or your campaigns will look weaker than they are.

### 4. An order never counts twice
When Yacine uploads his receipt, Lead goes out twice: from the browser (the pixel) and from the server. If Meta counted them as two events, your orders would double. So both carry the same event ID, built on the order number: Meta and TikTok know it is one event and count it once. Purchase is sent by the server alone, with its own ID, so it cannot repeat. And if two people on your team press “Approve” on the same order, or the payment provider resends its confirmation, Purchase still goes out once per order.
On screen: «Approve»
Tip: In Meta’s Events Manager, a dropped duplicate shows in the event’s details under “Deduplication”. That is a sign the setup is right, not a problem.
Heads-up: Don’t install the same pixel by hand in an outside tool that also sends Purchase: that tool doesn’t know the event ID, and the sale would count twice.

### 5. How Meta knows the buyer saw the ad
Each server event carries the buyer’s data, hashed with SHA-256 before it leaves Dirassa Plus’s servers: the email, the phone (a number starting with 0 gets Algeria’s 213 code), the name (at Meta) and their account number in your school. Meta and TikTok compare the fingerprint with their accounts without seeing the data itself. On top come the click data: Meta’s _fbp and _fbc cookies, TikTok’s ttclid and _ttp, the browser, the IP address and the page link. These are captured when the order is sent and kept with it, so when Karim approves the receipt the next day, Purchase goes out tied to yesterday’s click. In Events Manager, each event shows an “Event Match Quality” score: the more complete the data, the higher it is.
On screen: «Event Match Quality»
Tip: Ask for a phone number at sign-up and make sure it is real: in Algeria many people use Facebook with their number, so it is one of the strongest matching signals.
Heads-up: A delivery order from a visitor without an account sends only the order’s phone and name. And purchases a student makes from inside their portal carry no click data, since they don’t pass through an ad page.

### 6. Test before you spend
In Meta’s Events Manager open “Test events”: a code such as TEST12345 shows. In “Tracking”, unfold “Test codes” and paste it into “Facebook / Instagram (Meta) — Test code (optional)”: “Use it to verify in Events Manager, then clear it.” Then run a full order: open your course page through its public link, pay and upload a receipt; Lead shows in Test events, from “server” and from “browser”. Then approve it in “Incoming”: Purchase shows from the server. For TikTok, the same path: the test code from “Test events” into “TikTok — Test code (optional)”. Done? Empty the code field and leave it.
On screen: «Test events»، «Test codes»، «Facebook / Instagram (Meta) — Test code (optional)»، «TikTok — Test code (optional)»، «Incoming»
Tip: Run the test with a test student account and a small amount, then unenrol it from the student’s page, so no fake student stays in your numbers.
Heads-up: The test code applies to every server event. A forgotten code can make real sales be treated as test events. Clear it as soon as the test is over.

### 7. Follow the result in Events Manager
Dirassa Plus shows no log of sent events or their errors: Events Manager is the reference. At Meta, open the pixel → “Overview”: for each event you see the connection method (browser, server or both), the volume and the match quality. If Lead arrives only from the browser, or no Purchase shows after you approve orders, the server isn’t getting through. Check in order: the badge reads “Ready”; the token was generated for the pixel whose ID is in the field; it hasn’t been revoked in Business Manager; the test code field is empty. If you revoke or change the token at Meta, paste the new one at once: the platform doesn’t resend what failed earlier.
On screen: «Ready»
Tip: Once a week, compare the orders approved in the “Payments log” with the number of Purchases in Events Manager for the same period. A big gap is worth a check.
Heads-up: Meta credits the sale to the ad according to your campaign’s attribution window (7 days after the click, say). A receipt approved after the window closes still arrives, but may not be credited to the ad.

## Once the badge reads “Ready”
- Aim campaigns at buyers: As confirmed sales pile up, try a campaign optimised for Purchase instead of Lead.
- Approve receipts every day: Purchase goes out at approval: delays weaken what the campaign learns.
- Turn on online payment: EDAHABIA and CIB confirm the sale by themselves, so Purchase goes out without waiting: the “Payment methods” lesson.
- Review the pixel: Visits and orders from the browser: the “Meta and TikTok pixels” lesson.

## Questions

**Do I need the pixel and the token together?**
Yes. The ID names the pixel, the token lets the server send to it. Without the ID nothing goes out; without the token only what the browser sees arrives, so no confirmed sales.

**When exactly is Purchase sent?**
When the sale is confirmed: when you approve the order, when an EDAHABIA, CIB or PayPal payment is confirmed, when the activation card is delivered, or when a cash-on-delivery product’s cash is collected. Nothing for a rejection or a free enrolment.

**Does my students’ data reach Meta?**
Email, phone and name go out hashed with SHA-256: Meta doesn’t see the text, it compares the fingerprint with its accounts. Click data from cookies, the browser and the IP address go too.

**Why can’t I see the token after saving it?**
Because it never comes back to the browser: it shows as dots. To change it, paste the new one over the dots.

**Does the platform check the token?**
No. Any token saves without a check. Verify it with a test code in Test events right after saving.

**Does a sale count twice if two people approve it?**
No. Purchase goes out once per order, however often the approval or the provider’s confirmation repeats.

**In which currency is the value sent?**
In Algerian dinars for sales in Algeria, and in the student’s currency for “Selling abroad” by transfer, such as euros.

**Can I see the sent events in Dirassa Plus?**
Not today. Follow them in Meta’s or TikTok’s Events Manager, under “Overview” and “Test events”.
