Keitaro integration: create a Traffic Source for darkcore
Create a darkcore source in Keitaro, pass click_id in the Campaign URL, and return the conversion for the matching click_id.
In Keitaro, create a Traffic Source named darkcore.
Follow these steps
1. Create the darkcore Traffic Source in Keitaro
- In Keitaro, open Traffic Sources → Create.
- Do not choose a Facebook, TikTok, or other ad-network template. Create a custom source called
darkcore. - In Parameters, fill in more than External ID. Add the full darkcore mapping:
| Keitaro name | Parameter | Placeholder |
|---|---|---|
| External ID | external_id | {click_id} |
| Sub Id 1 | sub1 | {sub1} |
| Sub Id 2 | sub2 | {sub2} |
| Sub Id 3 | sub3 | {sub3} |
| Sub Id 4 | sub4 | {sub4} |
| Sub Id 5 | sub5 | {sub5} |
| Sub Id 6 | sub6 | {sub6} |
If you use more subs, fill sub7–sub10 by the same rule. darkcore supports all ten.
- In S2S postback, enter darkcore's postback receiver URL:
https://edge.darkcorepwa.com/p?click_id={external_id}&status={status}&payout={revenue}&transaction_id={tid}- In “Only with statuses”, select the statuses darkcore should receive, usually
leadandsale. If your workspace has other conversion types, add their matching aliases first. - Save the source.
2. Create a Campaign in Keitaro
- Open Campaigns → Create.
- Select the
darkcoresource you created in Source. - Add your affiliate offers and distribution rules to the Campaign.
- Save the Campaign and copy its Campaign URL.
The copied URL must contain every parameter from the source:
https://YOUR_KEITARO_DOMAIN/YOUR_CAMPAIGN?external_id={click_id}&sub1={sub1}&sub2={sub2}&sub3={sub3}&sub4={sub4}&sub5={sub5}&sub6={sub6}If external_id or a required sub is absent, return to the Traffic Source and click Update parameters in attached campaigns. Without external_id, Keitaro cannot return a conversion; without sub, Keitaro loses traffic context.
3. Add the Keitaro Campaign as an offer in the darkcore stream
In Stream → Tracking links, create a link to the Campaign URL from step 2. Keep {click_id} in the URL as a darkcore macro:
https://YOUR_KEITARO_DOMAIN/YOUR_CAMPAIGN?external_id={click_id}&sub1={sub1}&sub2={sub2}&sub3={sub3}&sub4={sub4}&sub5={sub5}&sub6={sub6}Now the stream rule takes traffic to a PWA or Direct Link, and its tracking link takes traffic to Keitaro.
One default offer for all Keitaro Campaigns
Create one universal offer and pass the Campaign ID in sub1.
- In Offers → Create, add an offer such as
Keitaro universal. - In its URL, insert your Keitaro domain and darkcore macros:
https://YOUR_KEITARO_DOMAIN/{sub1}?external_id={click_id}&sub1={sub1}&sub2={sub2}&sub3={sub3}&sub4={sub4}&sub5={sub5}&sub6={sub6}- In Stream → Traffic distribution → Tracking links, create a tracking link without filters, select this offer, and put it last. It becomes the default offer for all traffic not caught by earlier rules.
- When launching, put only the required Keitaro Campaign ID or alias in the stream link's
sub1:
https://YOUR_STREAM_DOMAIN/?sub1=123In this example, darkcore sends traffic to https://YOUR_KEITARO_DOMAIN/123.
The universal offer reserves sub1 for the Keitaro Campaign ID or alias. Do not pass an ad-set ID, creative ID, or another value there. Use sub2–sub10 for those.
Before saving, open a real Keitaro Campaign URL and check its form. Replace with {sub1} only the part of the URL that actually contains the Campaign ID or alias. Do not put a full URL into sub1.
Make one test click
- Open the exact stream URL that will be used in ads, for example
https://YOUR_STREAM_DOMAIN/?sub1=123. - After the PWA or Direct Link, the browser should open
https://keitaro.example/123, and its URL must no longer contain{click_id}or{sub1}in braces. - In Keitaro → Logs → Clicks, open that click and compare:
- External ID equals the
click_idfor this click in darkcore; - Sub Id 1 equals
123; - other Sub Ids contain the values passed into the stream.
- External ID equals the
- Send a test conversion in Keitaro. darkcore must show a conversion for the same
click_id.
What to fix after the test
| What you see | What to do |
|---|---|
| A Keitaro 404 or another error opens instead of the intended Campaign | The stream URL does not have sub1=CAMPAIGN_ID, or the ID in sub1 does not match Keitaro's Campaign URL. |
| No click in Keitaro | Confirm that the default offer is selected in the stream tracking link and that another rule above does not override it. |
| External ID is empty | The source must have external_id = {click_id}. After changing it, click Update parameters in attached campaigns. |
| Sub Id 1 is empty | The source must have sub1 = {sub1}, and the stream URL must include ?sub1=CAMPAIGN_ID. |
| A conversion appears in Keitaro but not darkcore | Check the S2S URL in the source: it must contain click_id={external_id}. |
| darkcore rejects a conversion | In the source's Only with statuses, keep statuses that match darkcore aliases, such as lead and sale. |