19

Is there a way to only allow a user to edit a link's destination, and not the link itself, using MailChimp's template language? There doesn't seem to be anything about this specific situation in their documentation.

For example:

<a href="link.html" target="_blank">
    <img src="button.gif" alt="Button Name" />
</a>

So I want to allow the user to ONLY edit "link.html" to point somewhere else, as the link button never changes.

Unfortunately, to make matters more complicated, there's an unknown number of links in the template (thanks to the use of mc:repeatable), so the solution cannot be hard-coded to a specific link.

Is this possible?

Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
  • 2
    I have not come across this ability. I've tweeted https://twitter.com/MailChimp and/or https://twitter.com/MailChimpUX to address other issues I have had. – samanthasquared Apr 02 '13 at 18:41
  • What is the purpose for wanting to allow the user to change the `href`? – adamdehaven Apr 03 '13 at 15:13
  • @AdamD So they can change the link's destination. – Chuck Le Butt Apr 03 '13 at 15:24
  • You want them to be able to change the link destination from within an email they received? Or you want a CLIENT that is going to send the email to edit the `href` without editing the link? – adamdehaven Apr 03 '13 at 15:26
  • 1
    @AdamD I want the sender, not the recipient, to be able to edit the HREF in a MailChimp template. (See the link in the OP.) – Chuck Le Butt Apr 03 '13 at 15:26
  • Ok one more question and then I think I have a solution. Is the link to be sent in the Campaign, after changing during Campaign setup, going to be the same for EVERY list member? – adamdehaven Apr 03 '13 at 15:39
  • @AdamD Great, thanks. Yes, the link will the same for every list member! – Chuck Le Butt Apr 03 '13 at 16:39

3 Answers3

8

I ran into exactly the same issue today. It seems the individual href attribute cannot currently be made dynamic using merge tags in Mailchimp.

The best workaround I've found is to create an editable field (span) within the repeatable section that contains the link and button image.

<tr mc:repeatable>  
    <td width="600px">                      
        <span mc:edit="offer_link">       
             <a href="http://www.mywebsite.com" target="_blank">
                <img src="http://www.mywebsite.com/images/button.png" width="100" height="30" alt="view offer button">
            </a>
        </span>
    </td>
</tr>

When the sender creates the email from the template, they can click the '<>' icon in the editor to edit the html for the link. They'll need some very basic HTML knowledge but it'll do the trick.

nfrost21
  • 559
  • 2
  • 10
  • 27
6

In your MailChimp template, instead of using <a href="link.html" target="_blank">, use a Merge Tag instead. So for example:

<a href="*|CUSTOM_URL|*" target="_blank">

Follow these steps to complete the set up:

  1. Go to Lists > Create Forms and add a new input field.
  2. With the field selected, click on Field Settings.
  3. Label the field Custom Url.
  4. Set the Field Tag to CUSTOM_URL
  5. Uncheck Required Field.
  6. Set Field Visibility to Hidden.
  7. Set the Default Merge Tag Value to http://www.example.com/new-link.html (in other words, this is where the SENDER would input the absolute URL that you want your link.html changed to before sending each Campaign.

When the Campaign is sent, it will automatically fill in this default link (new-link.html) for the href attribute on the link without the SENDER actually modifying the campaign.

Just be sure that no one actually enters a value into this field when adding subscribers or it will override the default value set by the SENDER.

adamdehaven
  • 5,890
  • 10
  • 61
  • 84
  • Great answer! I guess I didn't do a great job explaining the question, though, as the Template has a variable number of links in it (thanks to a repeater). This probably wouldn't work with that. – Chuck Le Butt Apr 03 '13 at 16:42
  • Just repeat the process above for each link that you need to include on the page. For example, `CUSTOM_URL_ONE`, `CUSTOM_URL_TWO`...etc. There is no limit to the number you can create - you just need to be SURE that they edit each link before sending a Campaign to correspond to the Merge Tags you create in the template. You could use some of MailChimp's `IF` functions as well depending on your needs: http://kb.mailchimp.com/article/how-do-conditional-smart-merge-tags-work – adamdehaven Apr 03 '13 at 17:33
  • As I say, the number of links is VARIABLE thanks to `mc:repeatable`, so I don't know the number :-/ – Chuck Le Butt Apr 03 '13 at 17:54
  • Isn't it the same set of links for all recipients per campaign? If not, what is in the `mc:repeatable`? If you could give me a little more info I could probably write something with the API or Merge Tags... – adamdehaven Apr 03 '13 at 18:08
  • 1
    No, you're right. It's the same email for everyone in the campaign. But the purpose of this is to allow the Client to easily modify an email, without accidentally deleting the image used for the link. I can't expecting them to edit the HTML every time they add a new link. (This template will be used many times, with always a different number of links.) Thanks for your help, it's much appreciated. – Chuck Le Butt Apr 04 '13 at 09:17
  • No problem... The only other solution I can think of is if you teach them how to select (by clicking on) the image in the WYSIWYG editor and only changing the URL. Otherwise, here's a link from MailChimp showcasing their new "Advanced Merge Tags" - there might be a solution hidden in there: http://blog.mailchimp.com/new-advanced-merge-tags/ – adamdehaven Apr 04 '13 at 12:26
  • I didn't post that it's impossible - someone edited my answer. It MAY be possible, you just might have to do some grunt work to figure out how to accomplish it. Good luck! – adamdehaven Apr 05 '13 at 11:58
  • 2
    Unfortunately your answer doesn't actually answer my question then. I've given you a +1 for effort though :) – Chuck Le Butt Apr 05 '13 at 12:20
  • MailChimp should integrate this feature. Great question, Django (huge fan of your music too). – Lane Jul 17 '13 at 17:22
1

I have come to the same conclusion as many here, there is no easy way to do this in MailChimp, or Campaign Monitor.

In MailChimp, the only current way is to use their boilerplate templates that have "Content Blocks," which make editing very simple - you just can't custom code your own template. What we need is the ability to code custom templates with 'Content Blocks,' which is not currently available in MailChimp.

Read about Content Blocks Here:
http://kb.mailchimp.com/campaigns/content-blocks/about-content-blocks

Jono
  • 11
  • 2