nats_encode

Creates a single linkcode.

Article Topics: Smarty, Customization

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 ad tool'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"

Store output in this variable

Any valid Smarty variable name

See output section below

assign="my_var"

Prefix output variables with this word. (Click link for details)

Any valid Smarty variable name

None. (No prefix is used)

assign_prefix="myvar"

Note

To create an array of linkcodes, please see the nats_list_linkcodes page.

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}.

nats_decode

Last updated

Was this helpful?