Difference between revisions of "Nats encode"
From TMM Wiki
Jump to navigationJump to search(13 intermediate revisions by 5 users not shown) | |||
Line 23: | Line 23: | ||
| programid="123" | | programid="123" | ||
|- | |- | ||
− | | | + | | campaign |
| The [[Common Terms#Campaign|campaign]] number | | The [[Common Terms#Campaign|campaign]] number | ||
| Any valid campaign number. | | Any valid campaign number. | ||
| The default campaign ID number | | The default campaign ID number | ||
− | | | + | | campaign="123" |
|- | |- | ||
| siteid | | siteid | ||
Line 60: | Line 60: | ||
|- | |- | ||
| userid | | userid | ||
− | | The | + | | The affiliate's I.D. number (loginid) |
− | | Any valid | + | | Any valid affiliate I.D. number |
− | | No | + | | No affiliate |
| userid="123" | | userid="123" | ||
|- | |- | ||
Line 85: | Line 85: | ||
|- | |- | ||
| unencoded | | unencoded | ||
− | | If set, | + | | If set, overrides the affiliate default encoding |
− | | 0 or 1 (exclusive) | + | | 0 (encoded) or 1 (unencoded) - (exclusive) |
− | | Not set; outputs | + | | Not set; outputs affiliate default version of linkcode |
| unencoded="1" | | unencoded="1" | ||
|- | |- | ||
Line 103: | Line 103: | ||
|} | |} | ||
− | == | + | == NOTE == |
− | + | ''Prior to [[NATS]] 4.0.66.1, the parameter 'unencoded' had no effect.'' | |
− | == | + | == Example == |
− | ''' | + | <pre>URL?nats={nats_encode userid=$toid program=# site=# tourid=# }{$encoded}</pre> |
+ | |||
+ | Outputs a linkcode. For example: www.examplesite.com?nats=MS4yLjMuNS4wLjAuMC4wLjA. ''userid =$toid'' encodes the link specifically for the affiliate that the email is sent to. The linkcode is also placed in the variable, {$encoded}. | ||
== See Also == | == See Also == | ||
[[nats_decode]] -- decodes a link encoded with [[nats_encode]]. | [[nats_decode]] -- decodes a link encoded with [[nats_encode]]. | ||
+ | |||
+ | [[Category:NATS4 Template Functions]] |
Latest revision as of 09:58, 13 May 2013
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" |
campaign | The campaign number | Any valid campaign number. | The default campaign ID number | campaign="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 (loginid) | 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.
Example
URL?nats={nats_encode userid=$toid program=# site=# tourid=# }{$encoded}
Outputs a linkcode. For example: www.examplesite.com?nats=MS4yLjMuNS4wLjAuMC4wLjA. userid =$toid encodes the link specifically for the affiliate that the email is sent to. The linkcode is also placed in the variable, {$encoded}.
See Also
nats_decode -- decodes a link encoded with nats_encode.