01Jobs it does
Each one is a real command line. Copy it, or open it in the builder below to change it.
conversion pixel
Also: thank you page pixel, tracking pixel
p202 conversion pixel02What 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 pixel <img height="1" width="1" border="0" style="display: none;" src="https://track.example.com/tracking202/static/gpx.php?amount=&subid=" /> Global tracking pixel (put it on the conversion or thank-you page):
$ p202 conversion pixel <img height="1" width="1" border="0" style="display: none;" src="https://track.example.com/tracking202/static/gpx.php?amount=&subid=" /> Global tracking pixel (put it on the conversion or thank-you page):
$ p202 conversion pixel --json { "data": { "advanced": { "pixel": "\u003cimg height=\"1\" width=\"1\" border=\"0\" style=\"display: none;\" src=\"https://track.example.com/tracking202/static/gpx.php?amount=\u0026cid=\u0026subid=\" /\u003e", "postback_url": "https://track.example.com/tracking202/static/gpb.php?amount=\u0026cid=\u0026subid=" }, "amount": "", "base_url": "https://track.example.com/tracking202/static/", "campaign_id": null, "scheme": "http", "simple": { "pixel": "\u003cimg height=\"1\" width=\"1\" border=\"0\" style=\"display: none;\" src=\"https://track.example.com/tracking202/static/gpx.php?amount=\u0026subid=\" /\u003e", "postback_url": "https://track.example.com/tracking202/static/gpb.php?amount=\u0026subid=" }, "subid": "", "universal": { "iframe": "\u003ciframe height=\"1\" width=\"1\" border=\"0\" style=\"display: none;\" frameborder=\"0\" scrolling=\"no\" src=\"https://track.example.com/tracking202/static/upx.php?amount=\u0026subid=\" seamless\u003e\u003c/iframe\u003e", "javascript": "\u003cscript\u003e\n var vars202={amount:\"\",cid:\"\",subid:\"\"};(function(d, s) {\n \tvar js, upxf = d.getElementsByTagName(s)[0], load = function(url, id) {\n \t\tif (d.getElementById(id)) {return;}\n \t\tif202 = d.createElement(\"iframe\");if202.src = url;if202.id = id;if202.height = 1;if202.width = 0;if202.frameBorder = 1;if202.scrolling = \"no\";if202.noResize = true;\n \t\tupxf.parentNode.insertBefore(if202, upxf);\n \t};\n \tload(\"https://track.example.com/tracking202/static/upx.php?amount=\"+vars202['amount']+\"\u0026cid=\"+vars202['cid']+\"\u0026subid=\"+vars202['subid'], \"upxif\");\n }(document, \"script\"));\u003c/script\u003e\n\u003cnoscript\u003e\n \t\u003ciframe height=\"1\" width=\"1\" border=\"0\" style=\"display: none;\" frameborder=\"0\" scrolling=\"no\" src=\"https://track.example.com/tracking202/static/upx.php?amount=\u0026cid=\u0026subid=\" seamless\u003e\u003c/iframe\u003e\n\u003c/noscript\u003e" } } }
03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 conversion pixelSet flags below; the command updates as you type.
04Flags
6 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --amountstring | Amount: a number, or your network's payout macro such as {payout}; empty pays the campaign's payout |
| --campaignstring | Campaign ID the advanced pixel reports under (fills cid; from p202 campaign list) |
| --iframebool | Print the universal pixel's plain iframe instead of its JavaScript tag |
| --schemestring | http or https (default: the scheme the tracking domain is reached on): http, httpshttphttps |
| --subidstring | Your network's sub id macro, such as {aff_sub}, #s1#, xxC1xx or [=SID=]; empty leaves subid= for you to fill |
| --typestring | Pixel type: simple, advanced, universal (default simple; advanced when --campaign is given): simple, advanced, universalsimpleadvanceduniversal |
05How it works
Prints the pixel Setup > Postback / Pixel shows, to put on the conversion or thank-you page:
--type simple an image pixel (gpx.php): one click tracked at a time (default) --type advanced the same with cid (--campaign): several clicks at once --type universal the universal smart pixel (upx.php), which also fires your traffic sources' pixels: a JavaScript tag with a fallback for browsers without JavaScript, or a plain iframe with --iframe
Stdout is the pixel alone, under --quiet too: the image or iframe tag on one line, or the universal JavaScript tag as the page writes it (a <script> block and its <noscript> fallback, over several lines); --json prints every pixel and postback the page shows. Needs a role with access_to_setup_section.
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands conversion pixel --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
{
"path": "p202 conversion pixel",
"use": "pixel",
"short": "Print the conversion pixel for your thank-you page (Setup > Postback / Pixel)",
"long": "Prints the pixel Setup > Postback / Pixel shows, to put on the conversion or\nthank-you page:\n\n --type simple an image pixel (gpx.php): one click tracked at a time (default)\n --type advanced the same with cid (--campaign): several clicks at once\n --type universal the universal smart pixel (upx.php), which also fires your\n traffic sources' pixels: a JavaScript tag with a fallback for\n browsers without JavaScript, or a plain iframe with --iframe\n\nStdout is the pixel alone, under --quiet too: the image or iframe tag on one line,\nor the universal JavaScript tag as the page writes it (a <script> block and its\n<noscript> fallback, over several lines); --json prints every pixel and postback\nthe page shows.\nNeeds a role with access_to_setup_section.",
"runnable": true,
"example": "p202 conversion pixel\n p202 conversion pixel --type advanced --campaign 3 --amount 12.50\n p202 conversion pixel --type universal --iframe",
"tasks": [
{
"run": "p202 conversion pixel",
"phrases": [
"conversion pixel",
"thank you page pixel",
"tracking pixel"
]
}
],
"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": "iframe",
"type": "bool",
"default": "false",
"usage": "Print the universal pixel's plain iframe instead of its JavaScript tag",
"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, universal (default simple; advanced when --campaign is given): simple, advanced, universal",
"allowed_values": [
"simple",
"advanced",
"universal"
],
"required": false
}
]
}