This document contains conceptual, scenario, and reference information about AMPscript and functions.

This document is intended for use by application users who are creating message content with AMPscript. Knowledge of scripting languages may be required to use this functionality.

What Is AMPscript

AMPscript is a scripting language that you can embed within the following messages:

  • HTML emails
  • text emails
  • landing pages
  • SMS messages

The system processes the script at the point where you include it in the message to render content on a subscriber-by-subscriber basis. The ExactTarget application handles all AMPscript calls at the end of the email send, so realize that you must write your calls appropriately. See How AMPscript Calls Are Processed for more information and sample code.

AMPscript can also interact with your data extensions. You can use AMPscript to include information from your data extensions in your messages and to update data extensions with information from your landing pages.

More information on AMPscript, including several instructional guides, can be found at the links below:

Impression Tracking

Impression tracking lets you define a region within your email to measure the performance of that region. The region you define can contain dynamic content or you define it to contain links and images in your static content. 

Using AMPscript, you can identify regions within your emails for impression tracking. You use the following functions to enable this solution:

  • BEGINIMPRESSIONREGION()
  • ENDIMPRESSIONREGION()
  • CONTENTAREA()
  • CONTENTAREABYNAME()

The names of impression regions in all of the above functions must be fixed (constant strings or numbers). Impression region names are case insensitive and are stored at their first occurrence. There is no limit to the number of unique impression regions you can define.

If an impression region is not explicitly closed, it will be implicitly closed at the end of the message being built, so an impression region opened in the HTML version of an email will not remain open when the text version of the message is built.

Impression regions can be nested. If multiple regions are opened without being closed, all remain open and the final one opened remains the active one returned for resolving the related substitutions. If one EndImpressionRegion() call is issued, the second-to-last region will becomes the active region as so on. Issuing EndImpressionRegion(true) closes all open regions.

Impression regions are tracked by Job and can be used in both HTML and text content.

Why Use AMPscript

Use AMPscript to process information and include information from your data extensions in the body of your messages and landing pages to provide advanced personalization for the subscribers. You can use AMPscript and functions to perform operations such as the following:

Relational Data

You can use a function to look up relational data-for example, to find an airport name from an airport code associated with a subscriber.

You can use a function to return multiple records that relate to a subscriber, such as all the rates for flights from the subscriber's home city to a city the subscriber recently searched for.

Display Metadata about the Data

You can use a function to indicate whether a record exists for the subscriber. For example, you can use a function to determine whether a subscriber completed a transaction in the last month.

A function can limit the number of records returned from the relational data.  For example, you can ask to see only the top three fares for flights from a subscriber's home city to another city.

Provide Control Logic

A function can contain logic to perform different operations based on a subscriber value.

A function can store subscriber values as variables on which your program can perform operations.

Format Values

You can use a function to format text, numeric, date, and time values..

2422


Was This Page Helpful

Yes No
Suggestion:

Please enter your email or phone, if you would like us to contact you:

Enter the digits 26320 backwards:

Tag page
You must login to post a comment.