Skip to main content

Registration on your own site → Facebook and the source

Here the registration and the payment happen not at an affiliate network but on your own site: in your product, store or service. The site itself — its page or its server — has to tell Qubix about them. Then Qubix sends the conversion to Facebook or by postback to the traffic source. If the registration happens at a network, the network reports it — see The path of a visitor and a conversion.

What you need beforehand: a site — hosted in Qubix or on your own hosting — and a tracker campaign whose entry point covers its address.

1. Qubix code on the site​

  • The site is hosted in Qubix — the code is already there, ติดตามอีเวนต์ is on from the start (a site of the Whitepage type gets no code at all). More — A hosted site counts itself.
  • The site is on your own hosting — in เว็บไซต์ add it with the + เว็บไซต์ภายนอก button and put the code from the Connect the site block on every page. More — Connecting a website hosted elsewhere.

Check: visits appear on the Statistics tab of the website card.

2. The campaign and the source​

The campaign's entry point is the domain and path of your site. The campaign's traffic source decides where the conversion goes:

3. Tell Qubix about the registration and the payment​

Pick one way — Qubix handles them alike.

From the page. In the site code, at the place where the registration was accepted or the payment went through, add a call:

JavaScript
// the registration was accepted
sdk.sendEvent('reg')

// the payment went through
sdk.sendEvent('dep', { payout: '50', currency: 'USD', txid: 'order-123' })

txid is the order or deal number: by it Qubix does not count a repeat. More — Report a registration or a deposit.

From the site server. The page takes the visitor identifier from the Qubix code — sdk.getPiuid() — when the lead is sent and passes it to the server together with the lead, for example in a hidden form field. On a site connected with the script from a Qubix domain the identifier appears once Qubix has answered the page's first event, so do not read it when the page loads. When the server has accepted the registration or the payment, it calls the postback address from the card of a domain with the Postback role:

Bash
# registration
curl "https://pb.your-domain.com/<code>/postback?subid=CLICK_ID&status=lead&from=mysite"
# deposit
curl "https://pb.your-domain.com/<code>/postback?subid=CLICK_ID&status=sale&payout=50&currency=USD&from=mysite"

The ready address with the code is in the Postback URL block of the domain card; it is shown only to those who see all domains. More — If your website has its own backend.

From a handler of a site hosted in Qubix. The handler knows the visitor of the request by itself:

JavaScript
Qubix.conversion('reg');
Qubix.conversion('dep', { payout: '50', currency: 'USD', txid: 'order-123' });

More — Site backend.

4. Check every step​

What to checkWhere
ad visits land in the campaigntracker campaign card → คลิก
the registration and the deposit are recordedcampaign card → การลงทะเบียน and เงินฝาก; Audience → the visitor card
the server postback arrivedAudience → โพสต์แบ็ก
the conversion went to Facebookthe Facebook window → the Reconcile tab — the delivery strip above the table; แหล่งที่มา — the Not sent to Facebook: N label in the Facebook: no tracker campaign row

The campaign card tabs show visits with an ad number in the address and conversions of such visits. A test visit opened by hand without an ad number is found in Audience and on the Statistics tab of the website card. An administrator sees it; with limited access you see visits and events only of the ads of your campaigns.

What's next​