یکپارچه سازی و اتصال به شیوه JS Pixel Integration
(چنانچه شما یا Developer تان راحت تر هستید این مقاله به زبان انگلیسی نیز در انتهای متن موجود است)
JS Pixel چیست؟
این قابلیت (JS Pixel) برای ردیابی نرخ تبدیل در وبسایت شما و با استفاده از یک قطعهکد جاوااسکریپت طراحی شده است. هنگامی که بازدیدکننده پس از کلیک بر روی لینک همکاری در فروش (Affiliate Link) وارد سایت شما میشود، این پیکسل در لحظه وقوعتبدیل (مانند انجام خرید) فعال میگردد. برای استفاده از آن نیازی به پیادهسازی در سمت سرور نیست و تنها کافی است کد مربوطه را به وبسایت خود اضافه کنید.
کجا آن را تنظیم یا Configure کنم؟
همه روشهای ادغام در فرم کمپین، در زیر تب تنظیمات ادغام، قرار دارند. از بخش مدیریت برنامه AffiliatePro (جایی که کمپینها را مدیریت میکنید) استفاده کنید، نه از بخش مدیریت وردپرس.
نحوه باز کردن Form و انتخاب JS Pixel
۱. وارد بخش مدیریت برنامه AffiliatePro شوید.
۲. در نوار بالا، منوی کشویی بازاریابی را باز کنید → روی کمپینها کلیک کنید.
۳. در صفحه کمپینها، چهار کارت نوع کمپین خواهید دید: کمپین بنری، کمپین متنی، کمپین لینکی، کمپین ویدیویی. برای ایجاد یک کمپین، روی هر کارتی روی «ایجاد جدید» کلیک کنید، یا برای باز کردن یک کمپین موجود، روی دکمه «ویرایش» کلیک کنید.
۴. در برگه «تنظیمات عمومی»، نام کمپین را وارد کنید و نوع ابزار (آنچه ردیابی میشود: ادغام فروش، ادغام تکعملی، ادغام چندعملی یا ادغام کلیکی) را تنظیم کنید. URL هدف و سایر تنظیمات را اضافه کنید.
۵. روی برگه «تنظیمات ادغام» (آیکون افزونه) کلیک کنید.
۶. در زیر «روش ادغام خود را انتخاب کنید»، روی کارت «وبسایت (JS Pixel)» کلیک کنید.
پس از انتخاب JS Pixel، فرم جریان و یک اعلان سبز رنگ را نشان میدهد: ادغام JS Pixel آماده است. اگر کمپین از قبل ذخیره شده باشد، دکمه «مشاهده کد ادغام» ظاهر میشود. اگر هنوز ذخیره نشده باشد، فرم نشان میدهد: «ابتدا این کمپین را ذخیره کنید تاکد ادغام تولید شود.»
نحوه عملکرد Flow
۱. بازدیدکننده روی لینک همکاری در فروش کلیک میکند.
۲. بازدیدکننده وارد وبسایت شما میشود.
۳. پیکسل جاوااسکریپت در صفحه فعال میشود.
۴. تبدیل (Conversion) ردیابی میشود.
۵. کمیسیون ثبت میشود.
پس از انتخاب JS Pixel چه باید کرد؟
۱. اگر قبلاً برگه تنظیمات عمومی (نام کمپین، نوع ابزار، URL هدف) را پر نکردهاید، آن را پر کنید.
۲. روی ذخیره کلیک کنید (روی فرم باقی میماند) – این کد ادغام را ایجاد میکند. دکمه مشاهده کد ادغام اکنون در برگه تنظیمات ادغام ظاهر میشود.
۳. برای باز کردن پنجره کد، روی مشاهده کد ادغام کلیک کنید. قطعه کد جاوا اسکریپت را کپی کرده و آن را به وبسایت خود اضافه کنید (مثلاً صفحه تشکر یا صفحه موفقیت در پرداخت) تا هنگام وقوع تبدیل اجرا شود.
۴. پس از انجام این کار، میتوانید روی ذخیره و بستن کلیک کنید تا به لیست کمپینها برگردید.
همچنین میتوانید در هر زمان از پاورقی فرم با استفاده از دکمه دریافت کد (که در هر کمپین موجود موجود است) به کد ادغام دسترسی پیدا کنید.
دسترسی فوری از Campaigns List
در جدول کمپینها، کمپینهای JS Pixel در ستون «وضعیت یکپارچهسازی» (Integration Status) دارای نشان JS Pixel هستند. برای باز کردن مستقیم پنجره (مودال) کد یکپارچهسازی — بدون نیاز به ورود به فرم کامل — روی دکمهی آیکون کد در کنار این نشانکلیک کنید.
پیش از آنکه کد یکپارچهسازی (Integration Code) تولید شود، باید کمپین را حداقل یک بار ذخیره کنید. تا پیش از انجام این کار، فرم پیام زیر را نمایش میدهد: «برای تولید کد یکپارچهسازی، ابتدا این کمپین را ذخیره کنید.» از دکمه «ذخیره» (و نه «ذخیره وبستن») استفاده کنید تا فرم باز بماند و بتوانید بلافاصله روی گزینه «مشاهده کد یکپارچهسازی» کلیک کنید.
================================================. ENGLISH. =========================================
What Is JS Pixel?
Website (JS Pixel) is for tracking conversions on your own website using a JavaScript snippet. When a visitor lands on your site after clicking an affiliate link, the pixel fires when a conversion happens (e.g. purchase). No server-side integration is required — you only add the code to your site.
Where You Configure It
All integration methods live in the campaign form, under the Integration Setup tab. Use the AffiliatePro application admin (where you manage campaigns), not WordPress admin.
How to Open the Form and Choose JS Pixel
- 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: Sale Integration, Single Action Integration, Multi Action Integration, or Click Integration). Add the Target URL and other settings.
- Click the Integration Setup tab (plug icon).
- Under Choose Your Integration Method, click the Website (JS Pixel) card.
After selecting JS Pixel, the form shows the flow and a green notice: JS Pixel Integration is Ready. If the campaign is already saved, a View Integration Code button appears. If not yet saved, the form shows: “Save this campaign first to generate the integration code.”
How the Flow Works
- Visitor clicks the affiliate link.
- Visitor lands on your website.
- The JS pixel fires on the page.
- Conversion is tracked.
- Commission is recorded.
What to Do After Selecting JS Pixel
- Fill in the General Settings tab (Campaign Name, Tool Type, Target URL) if you have not already.
- Click Save (stays on the form) — this generates the integration code. The View Integration Codebutton will now appear in the Integration Setup tab.
- Click View Integration Code to open the code modal. Copy the JavaScript snippet and add it to your website (e.g. the thank-you or checkout success page) so it runs when a conversion happens.
- Once done, you can click Save & Close to return to the Campaigns list.
You can also access the integration code at any time from the form footer using the Get Code button (available on any existing campaign).
Quick Access from the Campaigns List
In the Campaigns table, JS Pixel campaigns show a JS Pixel badge in the Integration Status column. Click the code icon button next to the badge to open the integration code modal directly — without entering the full form.
You must save the campaign at least once before the integration code is generated. Until then, the form shows: “Save this campaign first to generate the integration code.” Use the Save button (not Save & Close) so the form stays open and you can immediately click View Integration Code.