The mgiToken Tag

Tag Behavior

The mgiToken tags append a token and/or other path arguments to URLs (HREFs and ACTIONs) between the beginning and ending tag. The mgiToken tag does not append a token to "mailto" HREFs or URLs with an ending slash (/). A token associates the contents of a shopping basket with a specific visitor. The token is composed of the visitor's IP number and time interval so that each token is absolutely unique.


Tag Syntax

The mgiToken tag has a beginning tag with no required parameters and one optional parameters, a body, and an ending tag. The tag form is:

<mgiToken function="Tag Function">
URLs to be tokenized
</mgiToken>

Required Parameters:

  • None.

Optional Parameters:

  • function="Tag Function" where "Tag Function" is the current action of the mgiToken tag. The "addTokenOnly" function appends a unique MGI Token number to each URL on the page. The "addTokenWithPathArguments" function appends a unique MGI Token number and any path arguments that are passed to the page to each URL on the page. The "addPathArgumentsOnly" function appends any path arguments that are passed to the page to each URL on the page. The default function is "addTokenOnly".


Example Usage and Output

<mgiToken>
<A HREF="purchase.html">Purchase Our Products!</A>
</mgiToken>

When this example token tag is processed through an MGI server, the HREF will be appended with a unique token number such as:

<A HREF="purchase.html$mgiToken=CD982415B2F65040">Purchase Our Products!</A>


Suggested Usage

  • Hard-Coded Shopping Baskets
  • Database-Driven Shopping Baskets
  • Affiliate Programs


[Return to the Referencing MGI Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]