p202 tracker create-with-url

Create a tracker and return its tracking URL

Web UISetup › Get LinksWritessupports --staged
All commands

01Jobs it does

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

tracking link

Also: generate a tracking link, campaign link

p202 tracker create-with-url
Web UISetup › Get Links

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 tracker create-with-url --aff-campaign-id 1 --ppc-account-id 3 --click-cpc 0.42
$ p202 tracker create-with-url --aff-campaign-id 1 --ppc-account-id 3 --click-cpc 0.42
tracker:       {"aff_campaign_id":1,"click_cloaking":-1,"click_cpa":null,"click_cpc":0.42,"etag":"\"77b98206caa2d24c5f429c04772c8a256b548906\"","landing_page_id":0,"ppc_account_id":3,"rotator_id":0,"text_ad_id":0,"tracker_id":18,"tracker_id_public":388360112,"user_id":1,"version":"77b98206caa2d24c5f429c04772c8a256b548906"}
tracking_url:  {"direct_url":"https://track.example.com/tracking202/redirect/dl.php?t202id=388360112\u0026t202kw=","tracker_id":18,"tracker_id_public":388360112,"tracking_params":"?t202id=388360112\u0026t202kw="}
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 tracker create-with-url

Set flags below; the command updates as you type.

04Flags

22 flags, plus the global flags every command takes.

FlagWhat it does
--aff-campaign-idstringCampaign ID (from p202 campaign list); 0 for a link to a redirector (--rotator-id) or an advanced landing page
--c1stringValue for c1 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--c2stringValue for c2 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--c3stringValue for c3 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--c4stringValue for c4 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--click-cloakingstringCloaking: 1 on, 0 off, -1 use the campaign's setting: -1, 0, 1
-101
--click-cpastringCost per action, 0-99.99999; on update, makes the tracker CPA and clears its cost per click. Not with --click-cpc
--click-cpcstringCost per click, 0-99.99999; on update, makes the tracker CPC and clears its cost per action
--idempotency-keystringRetry-safe create: the server records the response under this key and replays it on a retry with the same key and payload instead of creating a duplicate
--landing-page-idstringLanding page ID
--ppc-account-idstringPPC account ID
--rotator-idstringRotator ID
--t202bstringValue for t202b in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--t202kwstringValue for t202kw in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--t202refstringValue for t202ref in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--text-ad-idstringText ad ID
--tracker-id-publicstringPublic tracker ID
--utm-campaignstringValue for utm_campaign in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--utm-contentstringValue for utm_content in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--utm-mediumstringValue for utm_medium in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--utm-sourcestringValue for utm_source in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable
--utm-termstringValue for utm_term in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable

05For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands tracker create-with-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.
  • This command writes. Add --staged to record it as a proposal a person applies with p202 change apply.
p202 commands tracker create-with-url --json
{
  "path": "p202 tracker create-with-url",
  "use": "create-with-url",
  "short": "Create a tracker and return its tracking URL",
  "runnable": true,
  "tasks": [
    {
      "run": "p202 tracker create-with-url",
      "ui_pages": [
        "Setup › Get Links"
      ],
      "phrases": [
        "tracking link",
        "generate a tracking link",
        "campaign link"
      ]
    }
  ],
  "flags": [
    {
      "name": "aff-campaign-id",
      "type": "string",
      "default": "",
      "usage": "Campaign ID (from `p202 campaign list`); 0 for a link to a redirector (--rotator-id) or an advanced landing page",
      "required": false
    },
    {
      "name": "c1",
      "type": "string",
      "default": "",
      "usage": "Value for c1 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "c2",
      "type": "string",
      "default": "",
      "usage": "Value for c2 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "c3",
      "type": "string",
      "default": "",
      "usage": "Value for c3 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "c4",
      "type": "string",
      "default": "",
      "usage": "Value for c4 in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "click-cloaking",
      "type": "string",
      "default": "",
      "usage": "Cloaking: 1 on, 0 off, -1 use the campaign's setting: -1, 0, 1",
      "allowed_values": [
        "-1",
        "0",
        "1"
      ],
      "required": false
    },
    {
      "name": "click-cpa",
      "type": "string",
      "default": "",
      "usage": "Cost per action, 0-99.99999; on update, makes the tracker CPA and clears its cost per click. Not with --click-cpc",
      "required": false
    },
    {
      "name": "click-cpc",
      "type": "string",
      "default": "",
      "usage": "Cost per click, 0-99.99999; on update, makes the tracker CPC and clears its cost per action",
      "required": false
    },
    {
      "name": "idempotency-key",
      "type": "string",
      "default": "",
      "usage": "Retry-safe create: the server records the response under this key and replays it on a retry with the same key and payload instead of creating a duplicate",
      "required": false
    },
    {
      "name": "landing-page-id",
      "type": "string",
      "default": "",
      "usage": "Landing page ID",
      "required": false
    },
    {
      "name": "ppc-account-id",
      "type": "string",
      "default": "",
      "usage": "PPC account ID",
      "required": false
    },
    {
      "name": "rotator-id",
      "type": "string",
      "default": "",
      "usage": "Rotator ID",
      "required": false
    },
    {
      "name": "t202b",
      "type": "string",
      "default": "",
      "usage": "Value for t202b in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "t202kw",
      "type": "string",
      "default": "",
      "usage": "Value for t202kw in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "t202ref",
      "type": "string",
      "default": "",
      "usage": "Value for t202ref in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "text-ad-id",
      "type": "string",
      "default": "",
      "usage": "Text ad ID",
      "required": false
    },
    {
      "name": "tracker-id-public",
      "type": "string",
      "default": "",
      "usage": "Public tracker ID",
      "required": false
    },
    {
      "name": "utm-campaign",
      "type": "string",
      "default": "",
      "usage": "Value for utm_campaign in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "utm-content",
      "type": "string",
      "default": "",
      "usage": "Value for utm_content in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "utm-medium",
      "type": "string",
      "default": "",
      "usage": "Value for utm_medium in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "utm-source",
      "type": "string",
      "default": "",
      "usage": "Value for utm_source in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    },
    {
      "name": "utm-term",
      "type": "string",
      "default": "",
      "usage": "Value for utm_term in the link, as given (e.g. your traffic source's macro); default: the traffic source's own variable",
      "required": false
    }
  ]
}