RedirectTo

Overview

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.

Syntax

RedirectTo(1)

Function Properties

OrdinalTypeDescription
1stringRequiredURL sting or variable containing URL string to which to redirect

Usage

Given the data extension Vacation_Deals:

Customer_IDTypeLink
123Flighthttp://example.com/flights/
123Carhttp://example.com/cars/
456Hotelhttp://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: