RedirectTo
Allows a client to specify the target of a link originate from a complete URL stored in an attribute, data extension field, or variable. Only use this function in HTML emails within the href attribute of an <a>
tag. In text emails, include the prefix http://
and ensure you use no spaces within the parentheses. In order to retain tracking information for clicked links, you must include the anchor tags <a></a>
within the email itself and not the link retrieved via AMPscript. This function only provides tracking information for clickable links within an email message. You cannot retrieve tracking information when using this function with URLs stored in a variable or used as part of a query string parameter.
RedirectTo(1)
Ordinal | Type | Description | |
---|---|---|---|
1 | string | Required | URL sting or variable containing URL string to which to redirect |
Given the data extension Vacation_Deals:
Customer_ID | Type | Link |
---|---|---|
123 | Flight | http://example.com/flights/ |
123 | Car | http://example.com/cars/ |
456 | Hotel | http://example.com/hotels/ |
System returns:
Where Flight Deals links to http://example.com/flights/ and Car Deals links to http://example.com/cars/. You can also use this function to include data extension values at the end of a hyperlink within an email message, as shown in the example below:
System returns: