From 211eb5a0e861d1ff6ba017516e3845d75cb0c9c3 Mon Sep 17 00:00:00 2001 From: martbost Date: Mon, 12 Oct 2026 11:16:24 -0500 Subject: [PATCH] Traffic sources: network macros, campaign URLs, per-source postbacks, Reports dimension A Source is a first-class record of a network a member buys traffic on (PropellerAds, Zeropark, Adsterra, ExoClick and 25 more from the shipped catalog, or defined by hand). It remembers the network's macro tokens and conversion postback, attaches to spin links, builds the exact campaign URL to paste into the network, fires that network's own postback only for clicks that came through it, and shows up in Reports by source and by the zone / placement / site the macro carried. - data/traffic-sources.json: catalog of 29 networks (BeMob template harvest), un-ignored via data/* + !data/traffic-sources.json; loader tolerates missing fields, null costModel, {{slot}} labels with spaces and parentheses, optional slots, unknown single-brace macros - sources.js: DATA_DIR/sources.json model, 30 per account, 20 params, key allow-list, postbacks.validateUrl on the filled postback; list/create/update/get/urlFor/test - rotator.js: update() takes sourceId (owner-checked), pub() exposes it, hits and conversions are stamped with the source at click time (sr), wider query allow-list (cost, creative, site, banner, keyword, geo, os, browser, device, carrier, format, external_id, visitor_id), summary() adds sources[] and placements[], sourceCounts(), detachSource() - postbacks.js: fire() delivers the matching source's postback after the manual ones through the same deliver() (guards, retry, rate cap, auto-disable); log rows carry source; convertFor, inbound and the page lead path pass sourceId; fill/deliver/logForSource exported - routes (GET and POST): /api/sources/catalog, /api/my/sources, /api/my/sources/, /api/my/sources//url; /sources screen - /sources Control Room screen (list + Campaign URL / Postback / Settings tabs, two-step New source dialog); Links share kit gets a source select and a "Campaign URL for " first row; Reports gets Traffic sources and Placements; rail entry; chatbot canned answer, FACTS line and KNOWLEDGE_DATE 2026-10-12 - cr.css: phone rail icons only at 34px so ten entries fit; cache tags bumped to 20261012a Co-Authored-By: Claude Fable 5.1 --- .gitignore | 6 +- chatbot.js | 5 +- data/traffic-sources.json | 1892 +++++++++++++++++++++++++++++++ postbacks.js | 30 +- public/ads.html | 4 +- public/assets/cr-shell.js | 3 +- public/assets/cr.css | 1 + public/assets/links.js | 14 +- public/assets/reports.js | 4 + public/assets/sources-screen.js | 139 +++ public/credits.html | 4 +- public/links.html | 6 +- public/my.html | 4 +- public/pages.html | 4 +- public/reports.html | 13 +- public/sources.html | 129 +++ public/team.html | 4 +- public/wallet.html | 4 +- public/zones.html | 4 +- rotator.js | 42 +- server.js | 25 +- sources.js | 141 +++ 22 files changed, 2429 insertions(+), 49 deletions(-) create mode 100644 data/traffic-sources.json create mode 100644 public/assets/sources-screen.js create mode 100644 public/sources.html create mode 100644 sources.js diff --git a/.gitignore b/.gitignore index 720089c..a99847f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules/ -data/ +data/* *.log -qa/out/ +qa/out/ + +!data/traffic-sources.json diff --git a/chatbot.js b/chatbot.js index 1268adc..de6aa85 100644 --- a/chatbot.js +++ b/chatbot.js @@ -16,6 +16,7 @@ let DATA_DIR = null; let chain = null; const MODEL = process.env.OPENROUTER_MODEL || 'deepseek/deepseek-v4-flash:nitro'; const CONTRACT = '0x26Bdc556b94399bEdd69ae3ACA5aA6c54D946e8b'; +const KNOWLEDGE_DATE = '2026-10-12'; // the day the CANNED answers and FACTS below were last checked against the site function init(opts) { DATA_DIR = opts.dataDir; chain = opts.chain; } function key() { @@ -40,6 +41,8 @@ const CANNED = [ a: 'Level 1, half of every package your direct referrals buy, pays from their first qualifying purchase once your payouts are on. Level 2 (20 percent) opens after two of your people buy a qualifying package, $25 or larger. Level 3 (10 percent) opens after five. The $10 door package is for trying the ads and does not count toward opening levels. Until a level opens, its share passes up the line to the next qualified member, then to the platform, and it never comes back, so leaders qualify before their teams\' teams buy. Qualification is counted by the contract, never expires and cannot be bought.' }, { re: /(what('s| is) (a |an )?(ad )?zone|zones?\b|embed|script tag|publisher|site owner|my (own )?(web)?site|ad slot|viewable)/i, a: 'A zone is an ad slot on your own site: one script tag, nine standard sizes (728x90, 468x60, 300x250, 336x280, 250x250, 125x125, 160x600, 120x600, 320x50). Each load shows a LinkSpin member campaign first, then a network ad, then our house banner if nothing paid fits. You earn ad credits per viewable impression (half the banner on screen for one second, bots never, 50 credited views per visitor per zone per day): 1 credit per 5 viewable member-ad views and 1 per 10 network-ad views, or 1 per 8 on a Verified zone the admin has reviewed. A new zone earns after its first 100 on-site views with at least 40 percent viewable, and paid ads serve only on the site you declared, so copying the tag elsewhere earns nothing. Everything is explained at ' + SITE_URL + '/publishers and you add zones under Zones in your Control Room.' }, + { re: /(traffic ?sources?|postback|macros?|propeller ?ads|zeropark|adsterra|exoclick|hilltop ?ads|rich ?ads|traffic ?stars|pop ?ads|campaign url|buy(ing)? traffic|paid traffic|ad network|s2s|conversion (pixel|tracking))/i, + a: 'Sources, in your Control Room, is for traffic you buy on networks like PropellerAds, Zeropark, Adsterra or ExoClick. Pick the network from the catalog (or define your own), fill in your account details, and the source remembers that network\'s macros and conversion postback. Point a spin link at it and the Share kit gives you the exact campaign URL to paste into the network, macros included. When a click from that source joins, leaves a lead, links a wallet or buys, LinkSpin fires the network\'s own postback with its click id, so the network learns what converts, and Reports breaks clicks and conversions down by source and by the zone or placement the macro carried. The older account-level Postbacks on the Links screen still work for your tracker.' }, { re: /(spin ?link|rotat|short link|one link|weights?|fallback|split test|sub ?id|click ?id|daypart|health check|dead link|redirect)/i, a: 'A spin link is one short link that rotates between every page you promote. Behind it you set destinations with weights, pause any of them, and name a fallback for when everything else is off. Every click is recorded in one hop with the day, country, source and device, bots are filtered on the server, and click ids and sub ids (clickid, subid, s1 to s4 and the usual tracker names) ride through to the destination, so you can split-test by tagging the same link with different sub ids. Reports show it per link and across all of them. Set the hours of the day and week a spin or a destination runs (the local time of your visitor by default), and automatic health checks pause a dead or parked destination for you. You can try a spin with no account on the home page.' }, { re: /(page builder|bridge page|squeeze page|review page|sales page|advertorial|press release|landing page|build (a|me a) page|my pages?|lead capture|leads?\b)/i, @@ -85,7 +88,7 @@ function systemPrompt() { return `You are the assistant on LinkSpin (${SITE_URL}), a link rotator, page builder and advertising network for marketers, a Crypto Team Build Network property. FACTS: -- PRODUCT, all free with an email account: SPIN LINKS (the rotator: one short link, /r/, rotates between destinations by weight; pause any destination; a fallback for when all are off; one-hop redirect; every click recorded with day, country, source, device and a daily-salted visitor hash; bots filtered on the server; click ids and sub ids such as clickid, subid, s1 to s4 pass through to the destination; split tests by tagging the same link with different sub ids; a demo spin on the home page needs no account; DAYPARTING is live: a 7x24 hours grid per spin and per destination, time zone by name or the local time of the visitor, presets, and 'my best hours' from the clicks of the member after 200 clicks; automatic HEALTH CHECKS are live: every destination is checked every 30 minutes, a dead or parked one is paused after three failing checks and resumed when it passes twice, the owner is told once, and Check now runs it on demand). PAGES (page builder: scan any offer URL, get a bridge, review or squeeze page; designs, palettes, layouts and niche presets with hero images; leads to the member's own list, CSV or webhook; published on the pages domain lookfirst.page; sales, advertorial and press-release layouts are coming). ZONES (an ad slot on the member's own site: one async script tag, nine sizes 728x90, 468x60, 300x250, 336x280, 250x250, 125x125, 160x600, 120x600, 320x50; waterfall = LinkSpin member campaign, then a network ad for 728x90 and 468x60, then the LinkSpin house banner; pays ad credits per VIEWABLE impression, half the banner on screen for one second, bots never, 50 credited views per visitor per zone per day; rates 1 credit per 5 viewable member-ad views and 1 per 10 network-ad views, 1 per 8 on a Verified zone; warm-up: a zone earns after its first 100 on-site views with at least 40 percent viewable and goes on hold below that; origin lock: paid ads serve only on the declared site and its subdomains, elsewhere the house banner shows and nothing is earned; up to 50 zones per account; PUBLISHER PROGRAM at /publishers for site owners, tiers Standard (default) and Verified (admin-reviewed site, better network rate)). AUDIENCES (first-party retargeting: "My visitors" collects everyone who viewed the member's pages and zones for 30 days; a pixel tag /p.js for other sites; campaigns can "show only to" or "never show to" an audience; nothing personal stored). PROMO TOOLS at /tools#promo (social posts, text-a-friend, email swipes, banners, objection bank, hook videos; five hook angles with videos: links, pages, zones, audiences, stack; angle links are the invite link plus ?v=). REPORTS (every link in one view). BLOG at /blog with RSS at /blog/feed.xml. +- PRODUCT, all free with an email account: SPIN LINKS (the rotator: one short link, /r/, rotates between destinations by weight; pause any destination; a fallback for when all are off; one-hop redirect; every click recorded with day, country, source, device and a daily-salted visitor hash; bots filtered on the server; click ids and sub ids such as clickid, subid, s1 to s4 pass through to the destination; split tests by tagging the same link with different sub ids; a demo spin on the home page needs no account; DAYPARTING is live: a 7x24 hours grid per spin and per destination, time zone by name or the local time of the visitor, presets, and 'my best hours' from the clicks of the member after 200 clicks; automatic HEALTH CHECKS are live: every destination is checked every 30 minutes, a dead or parked one is paused after three failing checks and resumed when it passes twice, the owner is told once, and Check now runs it on demand). PAGES (page builder: scan any offer URL, get a bridge, review or squeeze page; designs, palettes, layouts and niche presets with hero images; leads to the member's own list, CSV or webhook; published on the pages domain lookfirst.page; sales, advertorial and press-release layouts are coming). ZONES (an ad slot on the member's own site: one async script tag, nine sizes 728x90, 468x60, 300x250, 336x280, 250x250, 125x125, 160x600, 120x600, 320x50; waterfall = LinkSpin member campaign, then a network ad for 728x90 and 468x60, then the LinkSpin house banner; pays ad credits per VIEWABLE impression, half the banner on screen for one second, bots never, 50 credited views per visitor per zone per day; rates 1 credit per 5 viewable member-ad views and 1 per 10 network-ad views, 1 per 8 on a Verified zone; warm-up: a zone earns after its first 100 on-site views with at least 40 percent viewable and goes on hold below that; origin lock: paid ads serve only on the declared site and its subdomains, elsewhere the house banner shows and nothing is earned; up to 50 zones per account; PUBLISHER PROGRAM at /publishers for site owners, tiers Standard (default) and Verified (admin-reviewed site, better network rate)). AUDIENCES (first-party retargeting: "My visitors" collects everyone who viewed the member's pages and zones for 30 days; a pixel tag /p.js for other sites; campaigns can "show only to" or "never show to" an audience; nothing personal stored). PROMO TOOLS at /tools#promo (social posts, text-a-friend, email swipes, banners, objection bank, hook videos; five hook angles with videos: links, pages, zones, audiences, stack; angle links are the invite link plus ?v=). REPORTS (every link in one view, plus Pages, Zones, and since 2026-10-12 Traffic sources and Placements). BLOG at /blog with RSS at /blog/feed.xml. TRAFFIC SOURCES at /sources (2026-10-12): a source is a record of a network the member buys traffic on, created from a catalog of networks (PropellerAds, Zeropark, Adsterra, ExoClick, HilltopAds, TrafficStars, PopAds and more, with each network's macro tokens and conversion postback URL; account-specific slots such as a goal id are filled in at creation) or defined by hand; a spin link is pointed at one source (Share kit on the Links screen, or the Sources screen), and then the Share kit's first row is the exact campaign URL for that network with its macros already in place; when a click that came through that source converts (join, lead, wallet, purchase, or a partner-reported conversion; the member picks which) LinkSpin fires that network's own postback with the network's click id and the payout, server to server, and only the network that sent the click is told; Reports show clicks, uniques and conversions by source and by placement (the value the network's zone, placement, site, campaign, creative, banner or keyword macro carried); up to 30 sources per account, 20 params each; a source with no postback still builds the campaign URL and shows in Reports; the account-level Postbacks list on the Links screen (for the member's own tracker) still works alongside. Knowledge checked on ${KNOWLEDGE_DATE}. - PACKAGES (priced in dollars, settled in POL at the live rate, 1 credit = 1 cent of ad delivery): $10 door = 1,000 credits, for trying the ads, does NOT count toward qualification; $25 Starter = 2,500; $50 Builder = 5,000; $100 Growth = 10,000; $250 Leader = 25,000; $500 Network = 50,000. Any package of $25 or more makes the buyer a qualifying buyer for their sponsor. - THE SPLIT, same transaction on Polygon, fixed in the contract: 50 percent direct sponsor, 20 percent level 2, 10 percent level 3, 10 percent + 10 percent to the two admin wallets. Level 1 pays from a referral's first qualifying purchase once the sponsor's payouts are on. Level 2 opens after two of the member's people buy a qualifying ($25 or larger) package, level 3 after five. An unfilled tier passes up the line to the next qualified member, then to the platform. Nothing is held, there are no withdrawals, no pending balances. Contract ${CONTRACT} on Polygon, verified on Polygonscan; plain-language review at ${SITE_URL}/contract; live ledger at ${SITE_URL}/ledger with a verify link on every row. - CREDITS VS POL: every member, free ones included, earns CREDITS (zones, the daily ad set with a claim streak, watch-to-earn videos, verified visits, a daily sign-in bonus). Credits buy the member's own banner and text ads (the login spot takes purchased credits) and NEVER cash out or convert to crypto. POL only reaches a wallet through the contract split when a package sells in the member's line. Never promise or estimate income. diff --git a/data/traffic-sources.json b/data/traffic-sources.json new file mode 100644 index 0000000..0e7b562 --- /dev/null +++ b/data/traffic-sources.json @@ -0,0 +1,1892 @@ +[ + { + "key": "7search-ppc", + "name": "7Search PPC", + "site": "7searchppc.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{click_id}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{cost}", + "label": "Cost", + "role": "cost" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "format", + "token": "{ad_format}", + "label": "Ad Format", + "role": "param" + }, + { + "key": "s1", + "token": "{source_id}", + "label": "Source ID", + "role": "param" + }, + { + "key": "browser", + "token": "{browser}", + "label": "Browser", + "role": "param" + }, + { + "key": "geo", + "token": "{country}", + "label": "Country", + "role": "param" + }, + { + "key": "s2", + "token": "{city}", + "label": "City", + "role": "param" + }, + { + "key": "s3", + "token": "{state}", + "label": "State", + "role": "param" + }, + { + "key": "device", + "token": "{device}", + "label": "Device", + "role": "param" + } + ], + "postbackUrl": "https://pb.7searchppc.com/conversion.php?adv={{adv}}&visitor_id={clickid}&payout={payout}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "activerevenue", + "name": "ActiveRevenue", + "site": "activerevenue.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{conversion}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{bid}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{source_subid}", + "label": "Source Subid", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign}", + "label": "Campaign", + "role": "param" + }, + { + "key": "s2", + "token": "{search_referrer_domain}", + "label": "Search Referrer Domain", + "role": "param" + }, + { + "key": "s3", + "token": "{pubfeed}", + "label": "Pubfeed", + "role": "param" + }, + { + "key": "s4", + "token": "{query}", + "label": "Query", + "role": "param" + }, + { + "key": "carrier", + "token": "{carrier}", + "label": "Carrier", + "role": "param" + }, + { + "key": "s5", + "token": "{state}", + "label": "State", + "role": "param" + }, + { + "key": "creative", + "token": "{banner}", + "label": "Banner", + "role": "param" + } + ], + "postbackUrl": "http://xml.activerevenue.com/conversion?c={clickid}&count=1&value={payout}", + "notes": "", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "adskeeper", + "name": "AdsKeeper", + "site": "adskeeper.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{click_id}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{click_price}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{widget_id}", + "label": "Widget ID", + "role": "param" + }, + { + "key": "s2", + "token": "{teaser_id}", + "label": "Teaser ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + } + ], + "postbackUrl": "http://a.adskeeper.co.uk/postback?e={{e}}&r={payout}&c={clickid}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "adsterra", + "name": "AdsTerra", + "site": "adsterra.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "##SUB_ID_SHORT(action)##", + "label": "External ID", + "role": "externalId" + }, + { + "key": "placement", + "token": "##PLACEMENT_ID##", + "label": "Placement ID", + "role": "param" + }, + { + "key": "campaign", + "token": "##CAMPAIGN_ID##", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "creative", + "token": "##BANNER_ID##", + "label": "Banner ID", + "role": "param" + }, + { + "key": "source", + "token": "##PUBLISHER_ID##", + "label": "Publisher ID", + "role": "param" + }, + { + "key": "site", + "token": "##ZONE_ID##", + "label": "Publisher's site ID", + "role": "param" + }, + { + "key": "browser", + "token": "##BROWSER_NAME##", + "label": "Browser Name", + "role": "param" + }, + { + "key": "os", + "token": "##USER_OS##", + "label": "OS", + "role": "param" + }, + { + "key": "geo", + "token": "##REMOTE_COUNTRY##", + "label": "Country", + "role": "param" + }, + { + "key": "s1", + "token": "##REMOTE_LANGUAGE##", + "label": "Language", + "role": "param" + } + ], + "postbackUrl": "http://www.pbterra.com/name/{{Advertiser name}}/at?subid_short={clickid}&atpay={payout}", + "notes": "This network passes no cost macro. no Cost token preset (cost must be entered manually or via integration/API)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "bidvertiser", + "name": "BidVertiser", + "site": "bidvertiser.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{BV_CLICKID}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{BV_BID}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{BV_SRCID}", + "label": "Traffic Source ID", + "role": "param" + }, + { + "key": "creative", + "token": "{BV_ADNAME}", + "label": "Ad ID", + "role": "param" + }, + { + "key": "s2", + "token": "{BV_CATEGORY}", + "label": "Category ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{BV_CAMPID}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s3", + "token": "{BV_DBKEYWORD}", + "label": "Search Term / Contextual Data", + "role": "param" + }, + { + "key": "keyword", + "token": "{BV_KEYWORD}", + "label": "Your Keyword", + "role": "param" + }, + { + "key": "geo", + "token": "{BV_COUNTRY}", + "label": "Country", + "role": "param" + }, + { + "key": "s4", + "token": "{BV_GEO}", + "label": "Country Code", + "role": "param" + } + ], + "postbackUrl": "http://secure.bidvertiser.com/performance/pc.dbm?ver=1.0&AID={{AID}}&revenue={payout}&CLICKID={clickid}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "clickadu", + "name": "Clickadu", + "site": "clickadu.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "${SUBID}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{cost}", + "label": "Cost", + "role": "cost" + }, + { + "key": "zone", + "token": "{zoneid}", + "label": "Zone ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaignid}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "creative", + "token": "{bannerid}", + "label": "Banner ID", + "role": "param" + }, + { + "key": "os", + "token": "{os}", + "label": "OS", + "role": "param" + }, + { + "key": "s1", + "token": "{os_version}", + "label": "OS Version", + "role": "param" + }, + { + "key": "device", + "token": "{device}", + "label": "Device", + "role": "param" + }, + { + "key": "browser", + "token": "{browser}", + "label": "Browser", + "role": "param" + }, + { + "key": "s2", + "token": "{connection_type}", + "label": "Connection Type", + "role": "param" + } + ], + "postbackUrl": "http://sconvtrk.com/conversion/{{Your hash}}/?aid={{aid}}&visitor_id={clickid}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "exoclick", + "name": "ExoClick", + "site": "exoclick.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{conversions_tracking}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{actual_cost}", + "label": "Cost", + "role": "cost" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s1", + "token": "{variation_id}", + "label": "Variation ID", + "role": "param" + }, + { + "key": "s2", + "token": "{src_hostname}", + "label": "Domain", + "role": "param" + }, + { + "key": "site", + "token": "{site_id}", + "label": "Site ID", + "role": "param" + }, + { + "key": "zone", + "token": "{zone_id}", + "label": "Zone ID", + "role": "param" + }, + { + "key": "s3", + "token": "{category_id}", + "label": "Category ID", + "role": "param" + }, + { + "key": "geo", + "token": "{country}", + "label": "Country", + "role": "param" + }, + { + "key": "format", + "token": "{format}", + "label": "Format", + "role": "param" + } + ], + "postbackUrl": "http://syndication.exoclick.com/tag.php?goal={{goal}}&tag={clickid}&value={payout}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "ezmob", + "name": "EZmob", + "site": "ezmob.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{conversion}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{bid}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{pubfeed}", + "label": "Publisher Feed ID", + "role": "param" + }, + { + "key": "s2", + "token": "{subid}", + "label": "Publisher Feed Subid", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "creative", + "token": "{banner}", + "label": "Banner ID", + "role": "param" + }, + { + "key": "s3", + "token": "{keyword}", + "label": "Keyword matched on campaign", + "role": "param" + }, + { + "key": "s4", + "token": "{offer}", + "label": "Offer ID", + "role": "param" + }, + { + "key": "keyword", + "token": "{query}", + "label": "Keyword sent by publisher", + "role": "param" + }, + { + "key": "s5", + "token": "{source_subid}", + "label": "Source Sub ID", + "role": "param" + } + ], + "postbackUrl": "https://xml.ezmob.com/conversion?c={clickid}&value={payout}", + "notes": "", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "facebook", + "name": "Facebook", + "site": "facebook.com", + "costModel": null, + "params": [ + { + "key": "creative", + "token": "{{ad.id}}", + "label": "Ad ID", + "role": "param" + }, + { + "key": "s1", + "token": "{{adset.id}}", + "label": "Adset ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{{campaign.id}}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s2", + "token": "{{ad.name}}", + "label": "Ad Name", + "role": "param" + }, + { + "key": "s3", + "token": "{{adset.name}}", + "label": "Adset Name", + "role": "param" + }, + { + "key": "s4", + "token": "{{campaign.name}}", + "label": "Campaign Name", + "role": "param" + } + ], + "postbackUrl": "", + "notes": "No click id macro: conversions cannot be matched back to this network. This network passes no cost macro. no postback URL preset in template; no External ID (click id) parameter preset; network has no s2s click-id macro in this template; no Cost token preset (cost must be entered manually or via integration/API)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "google-adwords", + "name": "Google Adwords", + "site": "ads.google.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{gclid}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "campaign", + "token": "{campaignid}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s1", + "token": "{adgroupid}", + "label": "Ad group ID", + "role": "param" + }, + { + "key": "s2", + "token": "{adposition}", + "label": "Ad position", + "role": "param" + }, + { + "key": "s3", + "token": "{targetid}", + "label": "Target ID", + "role": "param" + }, + { + "key": "s4", + "token": "{matchtype}", + "label": "Match type", + "role": "param" + }, + { + "key": "creative", + "token": "{creative}", + "label": "Creative", + "role": "param" + }, + { + "key": "placement", + "token": "{placement}", + "label": "Placement", + "role": "param" + }, + { + "key": "s5", + "token": "{network}", + "label": "Network", + "role": "param" + }, + { + "key": "keyword", + "token": "{keyword}", + "label": "Keyword", + "role": "param" + } + ], + "postbackUrl": "", + "notes": "This network passes no cost macro. no postback URL preset in template; no Cost token preset (cost must be entered manually or via integration/API)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "hilltopads", + "name": "HilltopAds", + "site": "hilltopads.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{{ctoken}}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{{price}}", + "label": "Cost", + "role": "cost" + }, + { + "key": "zone", + "token": "{{zoneid}}", + "label": "Zone ID", + "role": "param" + }, + { + "key": "creative", + "token": "{{adid}}", + "label": "Ad ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{{campaignid}}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s1", + "token": "{{category}}", + "label": "Category", + "role": "param" + }, + { + "key": "geo", + "token": "{{geo}}", + "label": "GEO", + "role": "param" + }, + { + "key": "s2", + "token": "{{cpmbid}}", + "label": "CPM Bid", + "role": "param" + }, + { + "key": "s3", + "token": "{{lang}}", + "label": "Language", + "role": "param" + } + ], + "postbackUrl": "https://trackhta.com/close/?token={clickid}&price={payout}¤cy={currency}&advertiserId={{advertiserId}}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "mgid", + "name": "MGID", + "site": "mgid.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{click_id}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{click_price}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{teaser_id}", + "label": "Teaser ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s2", + "token": "{widget_id}", + "label": "Widget ID", + "role": "param" + }, + { + "key": "geo", + "token": "{geo}", + "label": "Geo", + "role": "param" + }, + { + "key": "s3", + "token": "{category_id}", + "label": "Category ID", + "role": "param" + } + ], + "postbackUrl": "https://a.mgid.com/postback?e={{Lead id}}&r={payout}&c={clickid}", + "notes": "", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "microsoft-advertising", + "name": "Microsoft Advertising", + "site": "ads.microsoft.com", + "costModel": null, + "params": [ + { + "key": "s1", + "token": "{AdGroupId}", + "label": "Adgroup ID", + "role": "param" + }, + { + "key": "creative", + "token": "{AdId}", + "label": "Ad ID", + "role": "param" + }, + { + "key": "s2", + "token": "{BidMatchType}", + "label": "Match type of the bid", + "role": "param" + }, + { + "key": "campaign", + "token": "{CampaignId}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "keyword", + "token": "{OrderItemId}", + "label": "Keyword ID", + "role": "param" + }, + { + "key": "device", + "token": "{Device}", + "label": "Device type", + "role": "param" + }, + { + "key": "s3", + "token": "{MatchType}", + "label": "Match type", + "role": "param" + }, + { + "key": "s4", + "token": "{TargetId}", + "label": "Target ID", + "role": "param" + }, + { + "key": "s5", + "token": "{QueryString}", + "label": "Query String", + "role": "param" + } + ], + "postbackUrl": "", + "notes": "No click id macro: conversions cannot be matched back to this network. This network passes no cost macro. no postback URL preset in template; no External ID (click id) parameter preset; network has no s2s click-id macro in this template; no Cost token preset (cost must be entered manually or via integration/API)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "mondiad", + "name": "Mondiad", + "site": "mondiad.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "[clickid]", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "[bid]", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "[subid]", + "label": "Subids", + "role": "param" + }, + { + "key": "zone", + "token": "[zoneid]", + "label": "Zone ID", + "role": "param" + }, + { + "key": "campaign", + "token": "[campaignid]", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "creative", + "token": "[creativeid]", + "label": "Creative ID", + "role": "param" + }, + { + "key": "s2", + "token": "[subscriptionage]", + "label": "Date of subscription", + "role": "param" + }, + { + "key": "geo", + "token": "[country]", + "label": "Country", + "role": "param" + }, + { + "key": "os", + "token": "[os]", + "label": "OS", + "role": "param" + }, + { + "key": "browser", + "token": "[browser]", + "label": "Browser", + "role": "param" + } + ], + "postbackUrl": "https://postback.pbmnd.com/track?uid={{uid}}&clickid={clickid}&payout={payout}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "mybid", + "name": "MyBid", + "site": "mybid.io", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{%click_id%}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{%cost%}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{%source_id%}", + "label": "Source ID", + "role": "param" + }, + { + "key": "s2", + "token": "{%utm_source%}", + "label": "UTM Source", + "role": "param" + }, + { + "key": "s3", + "token": "{%ad_type%}", + "label": "Ad Type", + "role": "param" + }, + { + "key": "s4", + "token": "{%utm_medium%}", + "label": "UTM Medium", + "role": "param" + }, + { + "key": "s5", + "token": "{%utm_campaign%}", + "label": "UTM Campaign", + "role": "param" + }, + { + "key": "creative", + "token": "{%creative_id%}", + "label": "Creative ID", + "role": "param" + } + ], + "postbackUrl": "https://postback.mb-d.com/api/v1/postback?click_id={clickid}&cost={payout}&goal_id={{goal_id}}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "plugrush", + "name": "PlugRush", + "site": "plugrush.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{$click_id}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{$cpv}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{$source_id}", + "label": "Source ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{$campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "geo", + "token": "{$cc}", + "label": "Country code", + "role": "param" + }, + { + "key": "browser", + "token": "{$browser}", + "label": "Browser", + "role": "param" + }, + { + "key": "os", + "token": "{$os}", + "label": "Operating system", + "role": "param" + }, + { + "key": "s2", + "token": "{$orientation}", + "label": "Orientation", + "role": "param" + }, + { + "key": "creative", + "token": "{$creative_id}", + "label": "Creative ID", + "role": "param" + }, + { + "key": "s3", + "token": "{$domain_id}", + "label": "Domain ID", + "role": "param" + } + ], + "postbackUrl": "https://prprocess.com/conversion/?user_id={{user_id}}&click_id={clickid}¤cy=USD&payout={payout}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "popads", + "name": "PopAds", + "site": "popads.net", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "[IMPRESSIONID]", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "[BID]", + "label": "Cost", + "role": "cost" + }, + { + "key": "site", + "token": "[WEBSITEID]", + "label": "Website ID", + "role": "param" + }, + { + "key": "s1", + "token": "[QUALITY]", + "label": "Quality Score", + "role": "param" + }, + { + "key": "s2", + "token": "[CATEGORYID]", + "label": "Category ID", + "role": "param" + }, + { + "key": "geo", + "token": "[COUNTRY]", + "label": "Country", + "role": "param" + }, + { + "key": "device", + "token": "[FORMFACTORNAME]", + "label": "Form Factor Name", + "role": "param" + }, + { + "key": "campaign", + "token": "[CAMPAIGNID]", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s3", + "token": "[CAMPAIGNNAME]", + "label": "Campaign Name", + "role": "param" + }, + { + "key": "s4", + "token": "[SCREENRESOLUTION]", + "label": "Screen Resolution", + "role": "param" + } + ], + "postbackUrl": "http://serve.popads.net/cpixel.php?s2s=1&aid={{aid}}&id={clickid}&value={payout}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "popcash", + "name": "PopCash", + "site": "popcash.net", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "[clickid]", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "[bid]", + "label": "Cost", + "role": "cost" + }, + { + "key": "campaign", + "token": "[campaignid]", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s1", + "token": "[campaignname]", + "label": "Campaign name", + "role": "param" + }, + { + "key": "site", + "token": "[siteid]", + "label": "Publisher site ID", + "role": "param" + }, + { + "key": "s2", + "token": "[category]", + "label": "Category name", + "role": "param" + }, + { + "key": "s3", + "token": "[connection]", + "label": "Connection type", + "role": "param" + }, + { + "key": "os", + "token": "[operatingsystem]", + "label": "Operating system", + "role": "param" + }, + { + "key": "device", + "token": "[device]", + "label": "Device type", + "role": "param" + }, + { + "key": "browser", + "token": "[browser]", + "label": "Browser", + "role": "param" + } + ], + "postbackUrl": "https://ct.popcash.net/click?aid={{aid}}&clickid={clickid}&payout={payout}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "propellerads", + "name": "PropellerAds", + "site": "propellerads.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "${SUBID}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "zone", + "token": "{zoneid}", + "label": "Zone ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaignid}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "creative", + "token": "{bannerid}", + "label": "Banner ID", + "role": "param" + } + ], + "postbackUrl": "http://ad.propellerads.com/conversion.php?aid={{aid}}&pid={{pid}}&tid={{tid}}&visitor_id={clickid}&payout={payout}", + "notes": "This network passes no cost macro. no Cost token preset (cost must be entered manually or via integration/API); postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "pushground", + "name": "Pushground", + "site": "pushground.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{click_id}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{bid}", + "label": "Cost", + "role": "cost" + }, + { + "key": "source", + "token": "{source}", + "label": "Source", + "role": "param" + }, + { + "key": "s1", + "token": "{supply_id}", + "label": "Supply ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s2", + "token": "{creativity_id}", + "label": "Creativity ID", + "role": "param" + }, + { + "key": "site", + "token": "{site_id}", + "label": "Site ID", + "role": "param" + }, + { + "key": "s3", + "token": "{language}", + "label": "Language", + "role": "param" + }, + { + "key": "device", + "token": "{deviceName}", + "label": "Device Name", + "role": "param" + }, + { + "key": "geo", + "token": "{country}", + "label": "Country", + "role": "param" + } + ], + "postbackUrl": "https://lupush.com/conversion?click_id={clickid}&amount={payout}", + "notes": "", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "reacheffect", + "name": "ReachEffect", + "site": "reacheffect.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "[tracking]", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "[cost]", + "label": "Cost", + "role": "cost" + }, + { + "key": "creative", + "token": "{adid}", + "label": "Ad ID", + "role": "param" + }, + { + "key": "source", + "token": "{pid}", + "label": "Publisher ID", + "role": "param" + }, + { + "key": "s1", + "token": "{creative_id}", + "label": "Creative ID", + "role": "param" + }, + { + "key": "site", + "token": "{siteid}", + "label": "Site ID", + "role": "param" + }, + { + "key": "s2", + "token": "{campaign_name}", + "label": "Campaign Name", + "role": "param" + }, + { + "key": "s3", + "token": "{admethod}", + "label": "Ad Method", + "role": "param" + }, + { + "key": "keyword", + "token": "{keywords}", + "label": "Keywords", + "role": "param" + }, + { + "key": "geo", + "token": "{country_name}", + "label": "Country Name", + "role": "param" + } + ], + "postbackUrl": "https://go1.reacheffecti.work/conversion.go?pid={{pid}}&cid={clickid}&conv_type=b", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "revcontent", + "name": "Revcontent", + "site": "revcontent.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "", + "label": "External ID", + "role": "externalId" + }, + { + "key": "s1", + "token": "{widget_id}", + "label": "Widget ID", + "role": "param" + }, + { + "key": "s2", + "token": "{content_id}", + "label": "Content ID", + "role": "param" + }, + { + "key": "s3", + "token": "{boost_id}", + "label": "Boost ID", + "role": "param" + }, + { + "key": "s4", + "token": "{adv_targets}", + "label": "Adv Targets", + "role": "param" + } + ], + "postbackUrl": "https://trends.revcontent.com/api/v1/conversion.php?api_key={{api_key}}&uuid={clickid}&amount={payout}", + "notes": "This network passes no cost macro. no Cost token preset (cost must be entered manually or via integration/API); postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "taboola", + "name": "Taboola", + "site": "taboola.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{click_id}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "site", + "token": "{site}", + "label": "Site", + "role": "param" + }, + { + "key": "s1", + "token": "{thumbnail}", + "label": "Thumbnail", + "role": "param" + }, + { + "key": "s2", + "token": "{title}", + "label": "Title", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s3", + "token": "{site_id}", + "label": "Site ID", + "role": "param" + }, + { + "key": "s4", + "token": "{campaign_item_id}", + "label": "Campaign Item ID", + "role": "param" + } + ], + "postbackUrl": "https://trc.taboola.com/actions-handler/log/3/s2s-action?name={{name}}¤cy={currency}&revenue={payout}&click-id={clickid}", + "notes": "This network passes no cost macro. no Cost token preset (cost must be entered manually or via integration/API); postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "tonic", + "name": "Tonic", + "site": "tonic.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "[clickid]", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "[cpc]", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "[sourceid]", + "label": "Source ID", + "role": "param" + }, + { + "key": "keyword", + "token": "[match]", + "label": "Keywords", + "role": "param" + }, + { + "key": "carrier", + "token": "[carrier]", + "label": "Carrier", + "role": "param" + }, + { + "key": "s2", + "token": "[mob_pf]", + "label": "Mobile Platform", + "role": "param" + }, + { + "key": "geo", + "token": "[country]", + "label": "Country", + "role": "param" + }, + { + "key": "browser", + "token": "[browser]", + "label": "Browser", + "role": "param" + }, + { + "key": "os", + "token": "[os]", + "label": "OS", + "role": "param" + }, + { + "key": "device", + "token": "[device]", + "label": "Device", + "role": "param" + } + ], + "postbackUrl": "https://tnccv.com/conversion/postback?value={payout}&clickid={clickid}", + "notes": "", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "trafficjunky", + "name": "TrafficJunky", + "site": "trafficjunky.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{ACLID}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{BidValue}", + "label": "Cost", + "role": "cost" + }, + { + "key": "creative", + "token": "{AdID}", + "label": "Ad ID", + "role": "param" + }, + { + "key": "s1", + "token": "{BanID}", + "label": "Ban ID", + "role": "param" + }, + { + "key": "s2", + "token": "{BanName}", + "label": "Ban Name", + "role": "param" + }, + { + "key": "campaign", + "token": "{CampaignID}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s3", + "token": "{Location}", + "label": "Location", + "role": "param" + }, + { + "key": "site", + "token": "{SiteName}", + "label": "Site Name", + "role": "param" + }, + { + "key": "s4", + "token": "{SpotName}", + "label": "Spot Name", + "role": "param" + }, + { + "key": "s5", + "token": "{CampaignName}", + "label": "Campaign Name", + "role": "param" + } + ], + "postbackUrl": "http://ads.trafficjunky.net/tj_ads_pt?a={{a (optional)}}&member_id={{member_id (optional)}}&cti={transactionId}&aclid={clickid}", + "notes": "", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "trafficshop", + "name": "TrafficShop", + "site": "trafficshop.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{s2s_token}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{cost}", + "label": "Cost", + "role": "cost" + }, + { + "key": "site", + "token": "{site}", + "label": "Site", + "role": "param" + }, + { + "key": "s1", + "token": "{site_id}", + "label": "Site ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "geo", + "token": "{country}", + "label": "Country", + "role": "param" + }, + { + "key": "s2", + "token": "{timestamp}", + "label": "Timestamp", + "role": "param" + } + ], + "postbackUrl": "https://ad.trafficshop.com/track.php?track_id={{track_id}}&ts_subid={clickid}&atpay={payout}", + "notes": "postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "trafficstars", + "name": "TrafficStars", + "site": "trafficstars.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{click_id}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{cost}", + "label": "Cost", + "role": "cost" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "creative", + "token": "{creative_id}", + "label": "Creative ID", + "role": "param" + }, + { + "key": "s1", + "token": "{category}", + "label": "Category", + "role": "param" + }, + { + "key": "keyword", + "token": "{keywords}", + "label": "Keywords", + "role": "param" + }, + { + "key": "s2", + "token": "{referrer}", + "label": "Referrer", + "role": "param" + }, + { + "key": "site", + "token": "{site_id}", + "label": "Site ID", + "role": "param" + }, + { + "key": "format", + "token": "{format}", + "label": "Creative Format", + "role": "param" + }, + { + "key": "s3", + "token": "{ip}", + "label": "IP", + "role": "param" + } + ], + "postbackUrl": "https://tsyndicate.com/api/v1/cpa/action/{clickid}?value={payout}", + "notes": "", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "ungads", + "name": "UngAds", + "site": "ungads.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{subid}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "source", + "token": "{site}", + "label": "Publisher ID", + "role": "param" + }, + { + "key": "creative", + "token": "{creativeid}", + "label": "Creative ID", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaignid}", + "label": "Campaign ID", + "role": "param" + }, + { + "key": "s1", + "token": "{pricemodel}", + "label": "Price model", + "role": "param" + }, + { + "key": "s2", + "token": "{campaigntype}", + "label": "Campaign type", + "role": "param" + }, + { + "key": "os", + "token": "{os}", + "label": "OS", + "role": "param" + }, + { + "key": "geo", + "token": "{geo}", + "label": "Geo", + "role": "param" + }, + { + "key": "browser", + "token": "{browser}", + "label": "Browser", + "role": "param" + }, + { + "key": "device", + "token": "{device}", + "label": "Device", + "role": "param" + } + ], + "postbackUrl": "https://ungads-postback.com/c/{{Postback token}}?subid={clickid}", + "notes": "This network passes no cost macro. no Cost token preset (cost must be entered manually or via integration/API); postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + }, + { + "key": "zeropark", + "name": "Zeropark", + "site": "zeropark.com", + "costModel": null, + "params": [ + { + "key": "clickid", + "token": "{cid}", + "label": "External ID", + "role": "externalId" + }, + { + "key": "cost", + "token": "{visit_cost}", + "label": "Cost", + "role": "cost" + }, + { + "key": "s1", + "token": "{target}", + "label": "Target", + "role": "param" + }, + { + "key": "source", + "token": "{source}", + "label": "Source", + "role": "param" + }, + { + "key": "keyword", + "token": "{keyword}", + "label": "Keyword", + "role": "param" + }, + { + "key": "format", + "token": "{traffic_type}", + "label": "Traffic Type", + "role": "param" + }, + { + "key": "s2", + "token": "{keyword_match}", + "label": "Keyword Match", + "role": "param" + }, + { + "key": "s3", + "token": "{visitor_type}", + "label": "Visitor Type", + "role": "param" + }, + { + "key": "s4", + "token": "{target_url}", + "label": "Target URL", + "role": "param" + }, + { + "key": "campaign", + "token": "{campaign_id}", + "label": "Campaign ID", + "role": "param" + } + ], + "postbackUrl": "http://traffic.zeropark.codewise.dev/zppostback/{{Postback token}}?cid={clickid}&payout={payout}", + "notes": "Zeropark moved its postback host; take the host and token from your Zeropark account (Tracking > Postback) if traffic.zeropark.codewise.dev stops answering. postback URL contains REPLACE placeholders for account-specific ids (aid/pid/tid etc.)", + "verified": true, + "source": "bemob-templates 2026-10-12" + } +] \ No newline at end of file diff --git a/postbacks.js b/postbacks.js index 4aeff1d..891fb6b 100644 --- a/postbacks.js +++ b/postbacks.js @@ -11,11 +11,11 @@ const crypto = require('crypto'); const dns = require('dns').promises; const net = require('net'); -let DATA_DIR = null, ownHosts = () => [], rotator = null; +let DATA_DIR = null, ownHosts = () => [], rotator = null, SOURCES = null; // SOURCES = sources.js: a traffic source's own postback fires for its own clicks (2026-10-12) const J = { db: null, FILE: () => path.join(DATA_DIR, 'postbacks.json'), load() { try { this.db = JSON.parse(fs.readFileSync(this.FILE(), 'utf8')); } catch (e) { this.db = { v: 1, items: [], log: [], keys: {}, clicks: {} }; } for (const k of ['items', 'log']) if (!Array.isArray(this.db[k])) this.db[k] = []; for (const k of ['keys', 'clicks']) if (!this.db[k]) this.db[k] = {}; }, save() { try { fs.writeFileSync(this.FILE(), JSON.stringify(this.db)); } catch (e) {} } }; -function init(opts) { DATA_DIR = opts.dataDir; ownHosts = opts.ownHosts || (() => []); rotator = opts.rotator; J.load(); } +function init(opts) { DATA_DIR = opts.dataDir; ownHosts = opts.ownHosts || (() => []); rotator = opts.rotator; SOURCES = opts.sources || null; J.load(); } const norm = e => String(e || '').trim().toLowerCase(); const EVENTS = ['join', 'lead', 'wallet', 'purchase', 'external']; const MACRO = /\{([a-z0-9_]{1,24})\}/gi; @@ -67,6 +67,7 @@ async function update(owner, id, body) { J.save(); return { ok: true, postback: pubItem(p) }; } async function logFor(owner, n) { return J.db.log.filter(l => l.owner === norm(owner)).slice(-(n || 50)).reverse(); } +async function logForSource(owner, sid, n) { return J.db.log.filter(l => l.owner === norm(owner) && l.source === String(sid)).slice(-(n || 30)).reverse(); } // -- partner key (inbound) function partnerKey(owner) { const o = norm(owner); if (!J.db.keys[o]) { J.db.keys[o] = crypto.randomBytes(12).toString('hex'); J.save(); } return J.db.keys[o]; } @@ -91,23 +92,34 @@ async function deliver(p, url, ctx) { } } catch (e) { note = String(e && e.message || e).slice(0, 120); } p.lastStatus = status || note.slice(0, 40); p.lastAt = Date.now(); if (ok) { p.sent = (p.sent || 0) + 1; p.fails = 0; } else { p.fails = (p.fails || 0) + 1; if (p.fails >= 10) p.enabled = false; } - J.db.log.push({ ts: t0, owner: p.owner, pb: p.id, name: p.name, event: ctx.event, lsid: ctx.lsid || '', url: url.slice(0, 300), status, ok, ms: Date.now() - t0, note, test: !!ctx.test }); + J.db.log.push({ ts: t0, owner: p.owner, pb: p.id, name: p.name, event: ctx.event, lsid: ctx.lsid || '', url: url.slice(0, 300), status, ok, ms: Date.now() - t0, note, test: !!ctx.test, source: ctx.viaSource || undefined }); if (J.db.log.length > 2000) J.db.log = J.db.log.slice(-1500); J.save(); return { ok, status, note }; } // fire every enabled postback of `owner` that listens to `event`; ctx carries the click's params and the event facts async function fire(owner, event, ctx) { const o = norm(owner); const out = []; + const q = (ctx.q || {}); + const vals = { clickid: q.clickid || q.cid || q.click_id || q.external_id || q.visitor_id || '', subid: q.subid || q.sub_id || q.s1 || '', s1: q.s1 || q.sub1 || '', s2: q.s2 || q.sub2 || '', s3: q.s3 || q.sub3 || '', s4: q.s4 || q.sub4 || '', s5: q.s5 || q.sub5 || '', source: ctx.source || '', event, payout: ctx.payout != null ? ctx.payout : '', currency: ctx.currency || 'USD', txid: ctx.txid || '', lsid: ctx.lsid || '', code: ctx.code || '', country: ctx.country || '', device: ctx.device || '' }; + for (const [k, v] of Object.entries(q)) if (/^(utm_[a-z]+|sub\d|s\d|aff_sub\d?|t\d|cost|zone|placement|site|campaign|creative|banner|keyword|geo|os|browser|carrier|format)$/.test(k) && vals[k] == null) vals[k] = v; for (const p of J.db.items.filter(x => x.owner === o && x.enabled && x.events.includes(event))) { if (!rateOk(o)) break; - const q = (ctx.q || {}); - const vals = { clickid: q.clickid || q.cid || q.click_id || '', subid: q.subid || q.sub_id || q.s1 || '', s1: q.s1 || q.sub1 || '', s2: q.s2 || q.sub2 || '', s3: q.s3 || q.sub3 || '', s4: q.s4 || q.sub4 || '', s5: q.s5 || q.sub5 || '', source: ctx.source || '', event, payout: ctx.payout != null ? ctx.payout : '', currency: ctx.currency || 'USD', txid: ctx.txid || '', lsid: ctx.lsid || '', code: ctx.code || '', country: ctx.country || '', device: ctx.device || '' }; - for (const [k, v] of Object.entries(q)) if (/^(utm_[a-z]+|sub\d|s\d|aff_sub\d?|t\d)$/.test(k) && vals[k] == null) vals[k] = v; const url = fill(p.url, vals); let r = await deliver(p, url, Object.assign({}, ctx, { event })); if (!r.ok && !ctx.test) { await new Promise(res => setTimeout(res, 4000)); r = await deliver(p, url, Object.assign({}, ctx, { event })); } out.push({ id: p.id, name: p.name, ok: r.ok, status: r.status, note: r.note }); } + // the traffic source that sent this click (and only that one) hears about it through its own postback + if (ctx.sourceId && SOURCES) { + const s = SOURCES.forFire(o, ctx.sourceId); + if (s && (s.events || []).includes(event) && rateOk(o)) { + const url = fill(s.postbackUrl, vals); + let r = await deliver(s, url, Object.assign({}, ctx, { event, viaSource: s.id })); + if (!r.ok && !ctx.test) { await new Promise(res => setTimeout(res, 4000)); r = await deliver(s, url, Object.assign({}, ctx, { event, viaSource: s.id })); } + SOURCES.save(); + out.push({ id: s.id, name: s.name, source: true, ok: r.ok, status: r.status, note: r.note }); + } + } return out; } async function test(owner, id) { @@ -122,7 +134,7 @@ async function convertFor(email, event, facts) { const c = clickOf(email); if (!c) return null; const hit = rotator && rotator.convert ? await rotator.convert(c.lsid, event, facts || {}) : null; if (!hit) return null; - const ctx = Object.assign({ q: hit.q || {}, source: hit.s, country: hit.c, device: hit.dv, lsid: c.lsid, code: hit.code }, facts || {}); + const ctx = Object.assign({ q: hit.q || {}, source: hit.s, country: hit.c, device: hit.dv, lsid: c.lsid, code: hit.code, sourceId: hit.sourceId || '' }, facts || {}); try { await fire(hit.owner, event, ctx); } catch (e) {} return hit; } @@ -134,8 +146,8 @@ async function inbound(key, body) { const hit = rotator && rotator.convert ? await rotator.convert(lsid, event, { payout: value, label }) : null; if (!hit) return { error: 'No click with that lsid.' }; if (hit.owner !== owner) return { error: 'That click is not yours.' }; - const ctx = { q: hit.q || {}, source: hit.s, country: hit.c, device: hit.dv, lsid, code: hit.code, payout: value, currency: String(body.currency || 'USD').slice(0, 6), txid: String(body.txid || '').slice(0, 80), label }; + const ctx = { q: hit.q || {}, source: hit.s, country: hit.c, device: hit.dv, lsid, code: hit.code, sourceId: hit.sourceId || '', payout: value, currency: String(body.currency || 'USD').slice(0, 6), txid: String(body.txid || '').slice(0, 80), label }; try { await fire(owner, event, ctx); } catch (e) {} return { ok: true, recorded: event, lsid }; } -module.exports = { init, EVENTS, validateUrl, list, create, update, logFor, partnerKey, rotateKey, bindClick, clickOf, fire, test, convertFor, inbound }; +module.exports = { init, EVENTS, validateUrl, fill, deliver, list, create, update, logFor, logForSource, partnerKey, rotateKey, bindClick, clickOf, fire, test, convertFor, inbound }; diff --git a/public/ads.html b/public/ads.html index 2a16c20..8bc9375 100644 --- a/public/ads.html +++ b/public/ads.html @@ -6,7 +6,7 @@ Ads · LinkSpin - + @@ -1008,7 +1008,7 @@ - + diff --git a/public/pages.html b/public/pages.html index 6133674..c8b68b6 100644 --- a/public/pages.html +++ b/public/pages.html @@ -6,7 +6,7 @@ Pages · LinkSpin - + @@ -51,6 +52,12 @@

By page

PageViewsUniqueClicksLeads
Views exclude bots. Clicks are people who pressed the button on the page. Leads came in through the page's own form. Open Pages
+ +
Traffic sources
+
+

By traffic source

SourceClicksUniqueConv.
A click counts for a source when the link it hit was pointed at that source at the time. Conversions are joins, leads, wallets, purchases and partner reports matched to those clicks. Open Sources
+

Placements

Source · placementClicksConv.
The value the network's zone, placement, site, campaign, creative, banner or keyword macro carried on the click, top 12. Use it to cut the placements that click and never convert.
+
Zones
@@ -63,7 +70,7 @@
- - + + diff --git a/public/sources.html b/public/sources.html new file mode 100644 index 0000000..870bed8 --- /dev/null +++ b/public/sources.html @@ -0,0 +1,129 @@ + + + + + + +Traffic sources · LinkSpin + + + + + +
+
+
+

Sources

30 days
+
+
+
+
+
+
No traffic sources yet
+
A source remembers a network's macros and postback so every link you point at it is tracked and the network learns what converts.
+ +
+ +
+
+
+ + + + diff --git a/public/team.html b/public/team.html index 6c86e8a..8f56efb 100644 --- a/public/team.html +++ b/public/team.html @@ -6,7 +6,7 @@ Team · LinkSpin - +