Capture an Open Time Email Campaign URL
Most (if not all) email marketing solutions allow you to embed URLs within content blocks in email templates to either import images and rich media or link to catalog items or item pages. You can use URLs generated by your Marketing Cloud Personalization OTE campaigns to import item images or link to catalog items within your externally managed email campaigns. You can still create open time email campaigns using the Personalization UI. However, you do not have to copy over all the generated HTML into your email template. Instead, you can cherry-pick item and item image URLs from your OTE campaign and embed them in your email template.
This article describes how and where to find URLs within a Personalization OTE campaign to copy into your email marketing system. This article assumes that you have created or cloned an OTE campaign, thoroughly tested it, and have the HTML code for the campaign open in front of you. To know more about viewing the HTML for your OTE campaign, see Capture Open Time Email Campaign URLs.
The following code sample depicts HTML generated by an example Personalization OTE campaign.
- In messages that contain more than one content block (such as this sample campaign), the URL for each block differs by one number only.
- The sample code includes the combined code for all the item blocks in the campaign. You can combine all HTML blocks in your campaign by clicking COMBINE ALL HTML BLOCKS when viewing the generated HTML in the UI.
- The characters used after
userIdin the sample code are for simulation purposes only. Do not copy these characters into your email marketing solution.
To copy over URLs from the preceding sample campaign HTML, do the following.
- Locate the
<img>tags for each content block in the message.
- Copy the URL from within each tag and do the following.
- Replace the number in the middle of the URL with the corresponding item number in the email template. For example, if you've created a 2x2 grid layout to display four items in your OTE campaign, each item and item image URL is allocated a number based on their position in the grid, starting from 1 to 4. If your email template uses different numbering to indicate the location of items within the layout, replace the number in your OTE campaign URL with the corresponding number in your email template.
- Replace the value after
?userId=in the URL with the macro or tag your email marketing solution provides for dynamically inserting your recipient's email address.
- Insert the modified URLs into your email marketing solution wherever necessary.
The following are examples of item (
<a> tag) and item image (
<img> tag) URLs captured from the preceding sample campaign HTML.
<replaceThis> in these examples indicates parts of the URL you need to modify before embedding the URL into your email marketing solution.
<a> tag or item URL
<img> tag or item image URL