Difference between revisions of "Nats encode"
From TMM Wiki
Jump to navigationJump to searchLine 60: | Line 60: | ||
|- | |- | ||
| userid | | userid | ||
− | | The | + | | The affiliate's I.D. number |
− | | Any valid | + | | Any valid affiliate I.D. number |
− | | No | + | | No affiliate |
| userid="123" | | userid="123" | ||
|- | |- |
Revision as of 11:45, 8 October 2009
Applies to NATS 4.0.25 and greater.
nats_encode
Creates a single linkcode. (To create an array of linkcodes, please see the nats_list_linkcodes article.)
Parameters
(Required parameters in bold)
Parameter | Description | Possible Values | Default Value | Example |
---|---|---|---|---|
programid | The program number | Any valid program number. | The default program ID number | programid="123" |
campaignid | The campaign number | Any valid campaign number. | The default campaign ID number | campaignid="123" |
siteid | The site number | Any valid site number. | The default site ID number | siteid="123" |
tourid | The tour number | Any valid site number | No tour number | tourid="123" |
adtoolid | The adtool's number | Any valid adtool number | No adtool number | adtoolid="123" |
subid1 | First optional tracking number. | Any valid tracking number. | Doesn't use a tracking number | subid1="123" |
subid2 | Second optional tracking number. | Any valid tracking number | Doesn't use a tracking number | subid2="123" |
userid | The affiliate's I.D. number | Any valid affiliate I.D. number | No affiliate | userid="123" |
url | If set, output contains an fully-qualified URL instead of just the linkcode. | 0 or 1 (exclusive). | Not set; doesn't create a banner link. | url="1" |
banner | If set, creates a banner link. | 0 or 1 (exclusive) | Not set; doesn't create banner link. | banner="1"' |
unencoded | If set, overrides the affiliate default encoding | 0 (encoded) or 1 (unencoded) - (exclusive) | Not set; outputs affiliate default version of linkcode | unencoded="1" |
assign | Store output in this variable | Any valid Smarty variable name | See output section below | assign="my_var" |
assign_prefix | Prefix output variables with this word. (Click link for details) | Any valid Smarty variable name | None. (No prefix is used) | assign_prefix="myvar" |
NOTE
Prior to NATS 4.0.66.1, the parameter 'unencoded' had no effect.
Output
Outputs a linkcode. For example: http://nats4.example.com/track/OC4xLjEuMS4wLjAuMC4w The linkcode is also placed in the variable, {$encoded}.
See Also
nats_decode -- decodes a link encoded with nats_encode.