Use Merge Tags to Send Personalized Files

To send each subscriber a personalized PDF file, use custom merge tags in your email. You'll insert PDF file URLs in a Mailchimp audience field, and use that field's merge tag in your campaign.

In this article, you'll learn how to set up a new merge tag for PDF links that are tailored to individual subscribers.

Before You Start

Task Roadmap

This is a multi-step process. You'll need to complete these tasks in order, in three different sections of your Mailchimp account.

Content Studio

Audience Settings

Campaign Builder

Update Files with Content Studio

To begin, you'll work with Mailchimp's Content Studio, along with a spreadsheet application like Excel or Google Sheets. For this part of the process, you'll upload each subscriber's individual PDF to Mailchimp's Content Studio and paste the PDF links into a spreadsheet file. Later, you'll import this CSV file to a new field in your audience to connect the PDFs to an audience field merge tag.

If you have a large number of files to upload and can host the files on your website, skip to step 5 in the following section.

Upload PDFs and Create a CSV File

To add PDFs to the Content Studio and set up the audience update file, follow these steps.

  1. Navigate to the Templates page.
  2. Click Content Studio.
  3. Upload your personalized files into the Content Studio and wait until your uploads are complete.
  4. On the Content Studio page, click Copy URL to copy a PDF's URL.
  5. Paste the PDF's URL into a spreadsheet file next to the matching contact's email address.
  6. Repeat steps 4 and 5 until every subscriber email is matched with a PDF link.
    Sample CSV file
  7. Save the spreadsheet file in CSV format

Now your update file is ready, and you'll import it to update subscriber information.

Create and Update Audience Fields

For this part of the process, you'll work from the Audience tab of your account. Now that your CSV file is ready, add a new field to your audience and start an auto-update import to add links from the CSV file to the new audience field. Later, this new field's merge tag will be used in the Campaign Builder to insert your contacts' custom links.

Add New Audience Field to Store PDFs

To add a new audience field and import your PDF URLs into it, follow these steps.

  1. Navigate to the Audience tab.
  2. If you have more than one audience, click the Current audience drop-down and choose the one you want to work with.
  3. Click View Contacts.
  4. Click the Settings drop-down and choose Audience fields and *|MERGE|* tags.
  5. Click Add A Field, and choose Text.
  6. Input a field label, like PDF Links.
  7. Uncheck the Visible box next to the new field so it won't appear on your signup form.
  8. In the Put this tag in your content field, input a merge tag name, like PDF.
  9. Click Save Changes.

Now your audience has a new field to store your PDF links.

Import CSV file into Your New Audience Field

In the next step, you'll add your contacts' PDF links to the audience field you created.

To add all the links in one large batch through a CSV import, follow these steps.

  1. Navigate to the Audience tab.
  2. If you have more than one audience, click the Current audience drop-down and choose the one you want to work with.
  3. Click the Manage Audience drop-down and choose Import contacts.
  4. Click the radio button next to CSV or tab-delimited text file.
    A screenshot of the Import from CSV option.
  5. Click Continue To Setup.
  6. Click Browse to choose your import file.
  7. Click Continue To Match to go to the next step and match the columns in your import file to the fields in your Mailchimp audience.
  8. Match column 1 to the Email Address field and click Save. Match column 2 to your PDF Links field and click Save.
    Match list fields
  9. After you match and save both columns, click Continue To Organize.
    continue to organize
  10. Check the box next to Update existing contacts.
  11. Click Continue To Review.
  12. Review your settings and click Import.

Now each subscriber has a file in the PDF Links field.

Your New PDF field

Insert the Merge Tag into Your Campaign

To complete the process, you'll work in the Campaigns section of the account.

Now that each subscriber has a file in the new PDF Links audience field you created, place that field's merge tag into your campaign. When the campaign is sent, we'll replace the merge tag with the personalized PDF link from the audience field.

Insert and Test Your New Merge Tag

To insert the merge tag into an email campaign, follow these steps.

  1. In the Content section of the Campaign Builder, click Edit Design.
  2. On the Design step, click the content block where you want the personalized URL to appear.
  3. Highlight the text you want to link to the personalized file, and click the link icon.
  4. In the Insert or Edit link pop-up modal, input your new field's merge tag in the Web Address (URL) field. Type the full merge tag, exactly as it appears in your audience settings.
    Insert Your New Merge Tag into a Campaign
  5. Click Insert to add the link.
  6. Click Save and Close.

To test your merge tags, click Enter Preview Mode to open a preview of the campaign. Click Live Merge Info to test your merge tags.

When you're satisfied with your campaign, send your campaign or schedule it to go out later.

Can I Use Other File Types?

Yes. Follow the same process to send personalized links to any other supported file type.

About Personalized Images

You can also insert personalized image files (jpg, jpe, jpeg, gif, png, or bmp). This is helpful if you want to include a coupon or small, subscriber-specific image in your campaign, without asking subscribers to click a link.

The process to insert a personalized image file is similar to the steps to insert a PDF link with a merge tag, with one small difference. In the audience settings, you'll want to add a new image field type instead of a text field. Use an image field's merge tag in your campaign, and we'll replace the merge tag with an image, rather than a link to a file.

Was this article helpful?

Anything else we can do to improve our site?