|
|
Content SyndicationFrom $1Table of contents
About this GuideThis document provides conceptual and procedural information about the ExactTarget content syndication feature. Introduction to Content SyndicationWhen you think of creating an email, you probably think of entering content by typing or using cut-and-paste. Content syndication allows you to bypass typing in the email and include content in your emails directly from an outside source. You specify a path to the content in place of the content itself, and the program gets the content at that path and includes it in your email automatically. For example, you can include the latest entry in your company blog in your email by specifying the path to the latest entry. The program uses the path you entered to get the latest entry at the time of the email send and include it in your email. Content syndication is designed to help you integrate your CMS or CRM system with emails built and sent with the ExactTarget application. You can use content syndication to get content from any web site or your CMS into the body of your emails. Additionally, you can use the content syndication features to notify your system that an activity has completed in ExactTarget. You can use content syndication through the ExactTarget online application or by using the calls in the ExactTarget API. ExactTarget AMP Web Services currently does not support content syndication. Path Specification with a URLYou specify the path with a URL. The URL can be virtually anything you can access with a web browser, such as a text file, HTML code, or CGI script. As a result, you can call a function in the middle of your message and insert whatever the function returns into the message at the point from which it was called. You can make the URL specific to the subscriber by inserting a substitution string in the URL to act as a placeholder for the subscriber's attribute value. You insert the attribute substitution string into the URL in square brackets, for example: [First Name], to indicate to the program to replace the substitution string with the subscriber attribute value. You can use this functionality to present different content based on the subscriber attribute. Refer to the online help within the ExactTarget application for a list of other substitution strings that you can insert. System Performance PreservationThe process of pulling content from another system into an ExactTarget email involves HTTP calls from the ExactTarget application to your content management system or web site. The send speed, response time, and overall reliability of the process depend on the state of several pieces of equipment involved in the Internet connection between ExactTarget and the content source. Consider the following guidelines to preserve your system performance:
Use with Internationalized Web PagesContent syndication can get content from web pages that use any of a broad range of character encoding, including double-byte characters. For best results, web sites from which you syndicate content should use the same character encoding as the email that contains the content. Content Syndication in the ExactTarget Online ApplicationThe ExactTarget online application allows users to use a web-based user interface to create content for email campaigns, manage subscriber lists, test and send messages, and perform tracking analysis on each campaign. You use content syndication in the online application as part of the process of creating an email. See the ExactTarget online help available through the application for more information about creating emails. Use these steps to use content syndication within an email:
You can choose any orientation when syndicating content, but the syndicated content is considered to be text only. If you choose an orientation that includes an image, the image should come from the image library. So, for example, you can include a logo from the image library at the top of the content area and have syndicated content appear below it.
The Insert External Content window appears.
You can link to anything that you could normally access via HTTP. You can click the personalization button to use personalization as part of the URL.
If you selected the option to Retrieve content immediately, the email preview displays the content from the URL you specified. You can edit this content within the email. If you selected the option to Retrieve content when email is sent, the email preview displays the command that will get the content from the URL you specified. For example, if you specified the URL http://www.example.com/cgi-bin/getmailad.pl, you would see the following content area in your email preview: NOTE: If you syndicate content from a microsite or landing page that contains AMPscript, that AMPscript does not execute and does not appear properly within the email. Best Practices with Content SyndicationFor best results, internationalized web pages being retrieved using the HTTPGet functionality should be encoded in the same character set as the content type of the internationalized email. For all other scenarios, testing, testing, and more testing Content Syndication in the ExactTarget APIThe ExactTarget API is a multi-tier architecture that delineates user interface, business logic, and data access. You can use the API to call business logic objects from processes other than the online application. This allows the same program code to be run regardless of whether it is executed by a user navigating the site or a client application triggering a remote process. HTTPGet commandPurposeInclude in the body of the email to pull content located at the specified URL into the email at the time the email is sent. If the content is cached, the system includes the cached copy; otherwise, the system accesses the URL. Use this command to include subscriber-specific content in each email in the campaign. If the syndicated content is not specific to the subscriber, use the Before;HTTPGet command. Syntax%%httpget "URL"%% ArgumentsURL Example: Calling a Script with HTTPGetYou have multiple ads on your web server, and you have a script that will pick one randomly (so that each subscriber gets a randomly selected ad). The web site address is http://www.example.com, and the filename of the script you've written to generate custom web pages is getdata.pl, which uses the ExactTarget attribute labeled Email Address to determine which page to display. You enter the following code in the email body at the point where the web page content should appear: %%httpget "http://www.example.com/cgi-bin/getdata.pl?id=[Email Address]"%% When the email is generated, the ExactTarget application substitutes the subscriber's email address into the URL (for example: http://www.example.com/cgibin/getdat...heirDomain.com). The content that appears in that location of the email body is the web page specific to that subscriber's email address. Note: Although the HTTPGet merge tag does not require any specific output from the URL, we recommended that you include a standard HTTP/1.0 200 OK status line, a Content-Type: text/plain or Content-Type: text/html line followed by an empty line, and then the content of the text to be inserted. For example, a Perl script would include code similar to the following: print "HTTP/1.0 200 OK\r\n"; This function only works with HTTP on port 80 and HTTPS on port 443. Non-standard port assignments cause this function to fail. HTTPGetWrap commandPurposeInclude in the <a> tags of links in the syndicated content to track the links that appear in the content you've pulled into your emails with HTTPGet. NOTE: Only subscriber-level content syndication emails require the use of this command. All other emails using content syndication automatically include the code necessary to track the links. Syntax<a href="httpgetwrap|URL">Click here</a> ArgumentsURL Before;HTTPGet commandPurposeInclude in the body of the email to pull content from the specified URL one time at the beginning of an email send to include in each email in the campaign. Use this command to save time over HTTPGet when you don't need the content pulled separately for each instance of the email. You can also use this command to obtain notification from ExactTarget that an email send has begun. If the syndicated content is specific to the subscriber, use the HTTPGet command instead of this command. Syntax%%before;httpget "URL"%% ArgumentsURL Example: Including the Same Ad in Each EmailYou have multiple ads on your web server, but you want every subscriber in a particular email send to see the same ad. The web site address is http://www.example.com, and the filename of the script that pulls the ad is getmailad.pl. You enter the following code in the email body at the point where the ad should appear: %%before;httpget "http://www.example.com/cgi-bin/getmailad.pl"%% Example: Requesting Notification that an Email Send has BegunYou've written a script that records the start time of the email send. The web site address where the script is located is http://www.example.com, and the filename of the script is recordevent.pl. You enter the following code at the top of the email body: %%before;httpget "http://www.example.com/cgi-bin/recordevent.pl"%% The system runs your script at the time that ExactTarget begins processing the email send. This command does not cause content to be added to the email body. The before;httpget command is processed outside of the subscriber context because it retrieves %%before;httpget "http://www.example.com/cgibin/record....pl?id=[jobid]"%% After;HTTPGet commandPurposeInclude at the end of an email definition to perform an action one time at the end of an email campaign. This command does not include content in the body of the email. Use this command to provide notification to your CRM or CMS system that the email send completed. Note: This call cannot be used with triggered emails sends because the triggered email send job Syntax%%after;httpget "URL"%% ArgumentsURL Example: Requesting Notification that an Email Send has CompletedYou've written a script that logs that an email send has been completed. The web site address where the script is located is http://www.example.com and the filename of the script is logsentmessage.pl. You enter the following code at the end of the email body: %%after;httpget "http://www.example.com/cgi-bin/logsentmessage.pl"%%
The system runs your script at the conclusion of the email send. This command does not cause content to be added to the email body. The after;httpget command is processed outside of the subscriber context because it is invoked one time after the send to all subscribers is complete. Therefore, the only personalization that is valid in the URL query string is the JobID substitution. For example: %%after;httpget "http://www.example.com/cgi-bin/logse...pl?jid=[jobid]"%% Empty Return Handling OptionsThe HTTPGET call can succeed without an error but return no content. By default, the system assumes that there is no syndicated content relevant to the context of the email and continues the email send. You can override this default behavior with an optional flag. Syntax%%httpget[;EmptyReturnHandlingOption] "URL"%% Or %%before;httpget[;EmptyReturnHandlingOption] "URL"%% Valid Values
This flag is ignored for the After;HTTPGet command. ExampleYou have multiple ads on your web server, and you have a script that will pick one randomly (so that each subscriber gets a randomly selected ad). If the script does not return an ad, you want the system to skip that subscriber and continue with the rest of the send. The web site address is http://www.example.com, and the filename of the script is ad.pl, which is located in the cgi-bin folder. You enter the following code in the email body at the point where the ad should appear: %%httpget ; 2 "http://www.example.com/cgi-bin/ad.pl"%% Error HandlingThe best defense against content syndication errors is a good offense. Using AMPscript, you can prevalidate values being used for content syndication. If your page requires a query string value and will error if it doesn't receive it, you can check the value prior to the call occurring. Potentially Dangerous
In this content syndication call, albumid is required to return any content. If it isn't part of the request, it will return a server error. A Better Approach
This approach uses Manuscript to validate the data before executing the content syndication call. It still not going to prevent rogue web server errors, but will prevent data related issues. This page was last updated by Adam Evans on Thu, 02 Feb 2012 15:51:40 GMT. If you require assistance with the ExactTarget application, please contact Global Support. If you wish to send Adam direct feedback, fill out the form below:
Tags: (Edit tags)
|
Powered by MindTouch 2010 |