اتصال به شیوه Conversion API Integration
(چنانچه شما یا Developer تان راحت تر هستید این مقاله به زبان انگلیسی نیز در انتهای متن موجود است)
Conversion API چیست؟
رابط برنامهنویسی Conversion API نقاط پایانی (endpoint) REST را در اختیار شما قرار میدهد تا توسعهدهندگانتان بتوانند برای ثبت کلیکها و گزارشدهی تبدیلها (conversions)، آنها را از سمت سرور خود فراخوانی کنند. زمانی از این ابزار استفاده کنید که بهجای گزینههای آمادهای همچون JS Pixel، S2S API، Mobile یا Postback، به یکپارچهسازی کاملاً اختصاصی (مانند CRM سفارشی، ابزارهای داخلی یا یک جریان کاری غیرمعمول) نیاز دارید.
کجا آن را تنظیم یا Configure کنید
تمامی روشهای یکپارچهسازی در فرم کمپین و در زبانه «تنظیمات یکپارچهسازی» (Integration Setup) قرار دارند. از بخش مدیریت برنامه AffiliatePro استفاده کنید.
چگونه Form را باز کرده و Conversion API را برگزینیم؟
وارد بخش مدیریت برنامه AffiliatePro شوید.
در نوار بالا، منوی کشویی بازاریابی را باز کنید → روی کمپینها کلیک کنید.
در صفحه کمپینها، چهار کارت نوع کمپین خواهید دید: کمپین بنری، کمپین متنی، کمپین لینکی، کمپین ویدیویی. برای ایجاد یک کمپین، روی هر کارتی روی «ایجاد جدید» کلیک کنید، یا برای باز کردن آن روی دکمه «ویرایش» روی یک کمپین موجود کلیک کنید.
در برگه «تنظیمات عمومی»، نام کمپین را وارد کنید و نوع ابزار (آنچه ردیابی میشود – نوعی را انتخاب کنید که با ادغام شما مطابقت دارد) را تنظیم کنید. URL هدف و سایر تنظیمات را اضافه کنید.
روی برگه «تنظیمات ادغام» (آیکون افزونه) کلیک کنید.
در زیر «روش ادغام خود را انتخاب کنید»، روی کارت «API تبدیل» کلیک کنید.
فرم بلافاصله مراحل جریان و بخش «نقاط پایانی موجود» را با دو کارت نشان میدهد. بدون وابستگی به ذخیره اولیه: URLهای نقاط پایانی بلافاصله نمایش داده میشوند (آنها برای همه کمپینهای موجود در سیستم یکسان هستند).
نحوه عملکرد Conversion API
رابط برنامهنویسی تبدیل (Conversion API) نقاط پایانی REST را در اختیار شما قرار میدهد که توسعهدهندگان میتوانند برای ثبت رویدادهای کلیک و گزارش فروشهای نهاییشده یا تبدیلها، مستقیماً از سرور خود آنها را فراخوانی کنند.
خلاصه جریان
۱. توسعهدهنده مستندات نقطه پایانی را میخواند (فرم، URLها و توضیحات را نشان میدهد).
۲. یکپارچهسازی سفارشی (اسکریپت سرور، برنامه یا ماژول CRM) ایجاد میکند.
۳. دادههای تبدیل را POST میکند – و در صورت تمایل، دادههای کلیک را – به نقاط پایانی صحیح ارسال میکند.
۴. کمیسیون به طور خودکار ثبت میشود.
Endpoints های در دسترس (نمایش داده شده در Form)
ردیابی کلیک (Click Tracking) — درخواست POST به …/integration/addClick. از این مورد برای ثبت رویداد کلیک زمانی که بازدیدکننده از طریق لینک همکاری در فروش (Affiliate Link) وارد میشود، استفاده کنید.
ردیابی فروش / تبدیل (Sale / Conversion Tracking) — درخواست POST به …/integration/s2sConvert. از این مورد برای گزارش فروش یا تبدیل (Conversion) تکمیلشده استفاده کنید.
آدرسهای دقیق اندپوینت (Endpoint URLs) که شامل آدرس پایه (Base URL) نصب شما هستند، پس از انتخاب گزینه Conversion API در فرم کمپین نمایش داده میشوند. آنها را از آنجا کپی کرده و در اختیار تیم توسعه خود قرار دهید.
Saving ذخیره سازی
برای ذخیره و ماندن در فرم، روی «ذخیره» کلیک کنید؛ یا برای ذخیره و بازگشت به فهرست کمپینها، «ذخیره و بستن» را انتخاب نمایید.
دسترسی فوری از Campaigns List
در جدول کمپینها، کمپینهای Conversion API یک نشان Conversion API را در ستون وضعیت ادغام نشان میدهند. برای باز کردن مستقیم پنجره تنظیمات Conversion API – بدون وارد کردن فرم کامل – روی دکمه نماد پرانتز در کنار نشان کلیک کنید.
چه زمانی از Conversion API استفاده کنیم؟
زمانی که هیچیک از روشهای دیگر مناسب نیستند، Conversion API را انتخاب کنید: یعنی وبسایتی ندارید (بنابراین JS Pixel کاربرد ندارد)، توکن کلیک مرورگر در دسترس نیست (بنابراین S2S API کاربرد ندارد)، اپلیکیشن موبایل ندارید (بنابراین روش Mobile کاربرد ندارد) و پستبکهایی (postbacks) نیز از فروشگاهی خارجی دریافت نمیکنید. این روش منعطفترین گزینه برای توسعهدهندگانی است که قصد ایجاد یکپارچهسازیهای کاملاً اختصاصی را دارند.
آدرسهای دقیق اندپوینت (endpoint URLs) را از فرم کمپین کپی کنید (این آدرسها شامل URL پایه نصب شما هستند). آنها را در اختیار تیم توسعه خود قرار دهید؛ از آدرسهای نمونه موجود در سایر منابع استفاده نکنید.
=========================================== ENGLISH ========================================
What Is the Conversion API?
The Conversion API provides REST endpoints that your developers call from your server to register clicks and report conversions. Use it when you need a fully custom integration (e.g. custom CRM, internal tools, or a non-standard flow) rather than the ready-made JS Pixel, S2S API, Mobile, or Postback options.
Where You Configure It
All integration methods are in the campaign form, under the Integration Setup tab. Use the AffiliatePro application admin.
How to Open the Form and Choose Conversion API
- Log in to the AffiliatePro application admin.
- In the top bar, open the Marketing dropdown → click Campaigns.
- On the Campaigns page you will see four campaign type cards: Banner Campaign, Text Campaign, Link Campaign, Video Campaign. Click Create New on any card to create a campaign, or click the Edit button on an existing campaign to open it.
- In the General Settings tab, fill in the Campaign Name and set the Tool Type (what is tracked — choose the type that matches your integration). Add the Target URL and other settings.
- Click the Integration Setup tab (plug icon).
- Under Choose Your Integration Method, click the Conversion API card.
The form immediately shows the flow steps and the Available Endpoints section with two cards. No save-first dependency: the endpoint URLs are displayed right away (they are the same for all campaigns in the system).
How the Conversion API Works
The Conversion API provides REST endpoints your developers call directly from your server to register click events and report completed sales or conversions.
Flow Summary
- Developer reads the endpoint docs (the form shows URLs and descriptions).
- Builds custom integration (server script, app, or CRM module).
- POSTs conversion data — and optionally click data — to the correct endpoints.
- Commission is recorded automatically.
Available Endpoints (Shown in the Form)
- Click Tracking — POST to
.../integration/addClick. Use this to register a click event when a visitor arrives via an affiliate link. - Sale / Conversion Tracking — POST to
.../integration/s2sConvert. Use this to report a completed sale or conversion.
The exact endpoint URLs with your installation’s base URL are shown inside the campaign form after you select Conversion API. Copy them from there and share with your development team.
Saving
Click Save to save and stay on the form, or Save & Close to save and return to the Campaigns list.
Quick Access from the Campaigns List
In the Campaigns table, Conversion API campaigns show a Conversion API badge in the Integration Status column. Click the braces icon button next to the badge to open the Conversion API setup modal directly — without entering the full form.
When to Use Conversion API
Choose Conversion API when no other method fits: no website (JS Pixel does not apply), no browser click token (S2S API does not apply), not a mobile app (Mobile does not apply), and you are not receiving postbacks from an external store. It is the most flexible option for developers building fully custom integrations.
Copy the exact endpoint URLs from the campaign form (the URLs include your installation’s base URL). Share those with your development team — do not use example URLs from other sources.