Setup guide

Meta ads to an affiliate offer

Track Facebook and Instagram ads to a network offer and see profit per ad.

You need

  • A ClickMesh account (Free works)
  • An offer link from your affiliate network
  • Access to the network’s postback settings
  • A Meta Ads Manager account
  1. Step 1: Add the offer and pass the ClickMesh click ID

    In ClickMesh, create an offer and paste your affiliate link. Put {click_id} in the sub-ID parameter your network sends back in postbacks. ClickMesh replaces it with a unique click ID on every click.

    The parameter name depends on the network: TUNE-based networks use aff_sub, Everflow uses sub1, others use s1, subid or clickid.

    Offer URL (example)
    https://network.example/aff_c?offer_id=123&aff_id=456&aff_sub={click_id}
  2. Step 2: Create a campaign with the Meta template

    Create a campaign, choose the Meta traffic source and select the offer. ClickMesh gives you a tracking link with Meta’s URL macros already mapped: ad ID to sub1 (the column reports break down by), ad set to sub2, campaign to sub3, placement to sub4 and site source to sub5.

    Meta has no click-ID URL macro, so the template leaves ext empty. The fbclid Meta adds to the link is stored as the external click ID automatically.

    Tracking link
    https://hopwire.xyz/c/ab12cd?sub1={{ad.id}}&sub2={{adset.id}}&sub3={{campaign.id}}&sub4={{placement}}&sub5={{site_source_name}}
  3. Step 3: Paste it into Ads Manager

    In the ad, put the link without parameters in Website URL, and the parameters in the URL parameters field under Tracking. Meta fills in the macros when someone clicks.

    Website URL
    https://hopwire.xyz/c/ab12cd
    URL parameters
    sub1={{ad.id}}&sub2={{adset.id}}&sub3={{campaign.id}}&sub4={{placement}}&sub5={{site_source_name}}
  4. Step 4: Set the postback at your network

    In the network’s postback (or “S2S pixel”) settings, paste the ClickMesh postback URL. cid must carry back the value you put in the offer URL, payout the commission, and txid the network’s unique conversion ID so duplicates are ignored.

    Swap the macros below for the ones your network uses. The free postback URL builder has presets.

    Postback URL (TUNE-style macros)
    https://hopwire.xyz/postback?cid={aff_sub}&payout={payout}&txid={transaction_id}
  5. Step 5: Send a test click and a test conversion

    Open the campaign in ClickMesh and use Test click to send a click through your tracking link. Check that it lands on the right page.

    Then press Send test conversion and watch the live postback log: it shows each postback as it arrives and whether it matched a click. When real conversions come in from your network, they show up in the same log, so you can see exactly what the network sent.

  6. Step 6: Add your ad spend

    In Ads Manager, export a report by day with campaign, ad set and amount spent as CSV. In ClickMesh, open Costs, choose the Meta format and upload it. You can also type in daily spend by hand.

    Automatic Meta cost sync and Meta Conversions API are coming soon on Starter and up. Until then, CSV import is the way to get spend in.

  7. Step 7: Read profit by source and campaign

    Reports show clicks, conversions, revenue, cost, profit and ROI by source, campaign, sub1, country and day. With the template above, sub1 is the Meta campaign ID, so you can see which Meta campaign made money. Export any view as CSV.

Follow Meta’s advertising policies. The page people land on must match your ad. ClickMesh does not offer cloaking, and our acceptable use policy bans it.

Questions about this setup? Email [email protected].

More guides

Set it up on the free plan

120k clicks and 50k pageviews a month, Stripe revenue for one site, no time limit.

Start free