p202 conversion postback-url

Print the server-to-server postback URL to give your affiliate network (Setup > Postback / Pixel)

Web UISetup › Postback/Pixel
All commands

01Jobs it does

Each one is a real command line. Copy it, or open it in the builder below to change it.

postback url

Also: s2s postback, server to server postback

p202 conversion postback-url
Web UISetup › Postback/Pixel

02What you get

Captured from the real binary, run against a demo store with 30 days of traffic. Switch tabs to see the same run as JSON, the shape scripts and agents parse.

p202 conversion postback-url
$ p202 conversion postback-url
https://track.example.com/tracking202/static/gpb.php?amount=&subid=
Server-to-server postback URL, simple (give this to your network):
  subid= is empty: put your network's sub id macro after it, or rerun with --subid.
  If the network only supports sid, change ?subid= to ?sid=.
Real output · p202 1.9.77 · demo dataexit 0

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 conversion postback-url

Set flags below; the command updates as you type.

04Flags

5 flags, plus the global flags every command takes.

FlagWhat it does
--amountstringAmount: a number, or your network's payout macro such as {payout}; empty pays the campaign's payout
--campaignstringCampaign ID the advanced pixel reports under (fills cid; from p202 campaign list)
--schemestringhttp or https (default: the scheme the tracking domain is reached on): http, https
httphttps
--subidstringYour network's sub id macro, such as {aff_sub}, #s1#, xxC1xx or [=SID=]; empty leaves subid= for you to fill
--typestringPixel type: simple, advanced (default simple; advanced when --campaign is given): simple, advanced
simpleadvanced

05How it works

Prints the postback URL Setup > Postback / Pixel shows: gpb.php on this install's tracking domain, which the network calls with the conversion's sub id (and amount).

--subid the network's sub id macro, e.g. {aff_sub} (HasOffers), #s2# (Cake) --amount a number or the network's payout macro, e.g. {payout}; empty pays the campaign's payout --campaign <id> the advanced postback, which also carries cid

Stdout is the URL alone, under --quiet too; --json prints every pixel and postback the page shows. If the network only supports sid, change ?subid= to ?sid=. Needs a role with access_to_setup_section.

06For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands conversion postback-url --json.
  • With AI_AGENT, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
p202 commands conversion postback-url --json
{
  "path": "p202 conversion postback-url",
  "use": "postback-url",
  "short": "Print the server-to-server postback URL to give your affiliate network (Setup > Postback / Pixel)",
  "long": "Prints the postback URL Setup > Postback / Pixel shows: gpb.php on this install's\ntracking domain, which the network calls with the conversion's sub id (and amount).\n\n  --subid   the network's sub id macro, e.g. {aff_sub} (HasOffers), #s2# (Cake)\n  --amount  a number or the network's payout macro, e.g. {payout}; empty pays the\n            campaign's payout\n  --campaign <id>  the advanced postback, which also carries cid\n\nStdout is the URL alone, under --quiet too; --json prints every pixel and postback\nthe page shows.\nIf the network only supports sid, change ?subid= to ?sid=. Needs a role with\naccess_to_setup_section.",
  "runnable": true,
  "example": "p202 conversion postback-url --subid '{aff_sub}' --amount '{payout}'\n  p202 conversion postback-url --campaign 3 --subid '#s2#'",
  "tasks": [
    {
      "run": "p202 conversion postback-url",
      "ui_pages": [
        "Setup › Postback/Pixel"
      ],
      "phrases": [
        "postback url",
        "s2s postback",
        "server to server postback"
      ]
    }
  ],
  "flags": [
    {
      "name": "amount",
      "type": "string",
      "default": "",
      "usage": "Amount: a number, or your network's payout macro such as {payout}; empty pays the campaign's payout",
      "required": false
    },
    {
      "name": "campaign",
      "type": "string",
      "default": "",
      "usage": "Campaign ID the advanced pixel reports under (fills cid; from p202 campaign list)",
      "required": false
    },
    {
      "name": "scheme",
      "type": "string",
      "default": "",
      "usage": "http or https (default: the scheme the tracking domain is reached on): http, https",
      "allowed_values": [
        "http",
        "https"
      ],
      "required": false
    },
    {
      "name": "subid",
      "type": "string",
      "default": "",
      "usage": "Your network's sub id macro, such as {aff_sub}, #s1#, xxC1xx or [=SID=]; empty leaves subid= for you to fill",
      "required": false
    },
    {
      "name": "type",
      "type": "string",
      "default": "",
      "usage": "Pixel type: simple, advanced (default simple; advanced when --campaign is given): simple, advanced",
      "allowed_values": [
        "simple",
        "advanced"
      ],
      "required": false
    }
  ]
}