Getting Member IDs into URLs in Campaign

3,150 views
Skip to first unread message

Daniel Short

unread,
Jan 31, 2011, 7:49:49 AM1/31/11
to MailChimp API Discuss
Hi,

First off, I'll let you know that I've tried all of the obvious
things :), and I'm looking for a "better way" to make something like
this happen in a campaign:

To edit your preferences, go to http://mydomain.com/?e=*|EMAIL|*&id=*|MC:ID|*

The purpose of the ID is to have some measure of security when a user
clicks on a link to go to our custom email preferences page. This way,
someone can't just change the email in the URL and update someone
else's preferences. If I have the email and the ID, I can query the
MailChimp API for the email, and make sure the IDs match.

The problem I have is that I cannot get access to the MailChimp
Subscriber ID for an individual subscriber through Merge Tags. I can
get this value by querying the API and using listMemberInfo, but there
is no way to include that ID in a campaign as a merge tag so that it's
unique per email.

Now... I know that the support documents say to create your own merge
tag to create a unique id for each subscriber (http://
www.mailchimp.com/kb/article/can-i-create-a-different-link-for-each-recipient-using-the-merge-tags),
but this has a few problems. First, it assumes that I'll be manually
creating IDs for every subscriber, or that I'll be adding all
subscribers through the API. It basically assumes that I have 100%
control and knowledge of, every single subscriber that gets into the
list. But what if I put a form on FaceBook, or someone signs up
through the built-in subscription forms directly through MailChimp?
The user has now signed up through a process outside of my control.

I could set up Webhooks, and every time a subscribe happens, 1) have a
post sent to my server, 2) which will then check to see if the user
already has a unique id (because they signed up through a form on our
side using the API), and then if they don't, 3) generate one, and then
4) update the subscriber's ID at MailChimp. The problem is that's 4
steps, all across HTTP, which is prone to problems

Or... the wonderful gurus at MailChimp could add a *|MC:ID*| merge tag
and I could use it in any campaign (generated through the site, or
through the API) and I'd always know that it's right.

I hope I've done a good enough job describing what I'm after, and I
hope you'll consider adding this as a new merge tag in the near
future.

Dan

jesse

unread,
Jan 31, 2011, 2:33:54 PM1/31/11
to MailChimp API Discuss
You can either use [UNIQID] like all of the links in the campaigns you
are sending already use or you can use the *|EMAIL_UID|* merge tag. I
would not suggest including the plain email address in the URL. If you
do decide that's necessary for some reason, you need to use the URL:
formatter:
http://www.mailchimp.com/resources/merge/


jesse

On Jan 31, 7:49 am, Daniel Short <dan.sh...@gmail.com> wrote:
> Hi,
>
> First off, I'll let you know that I've tried all of the obvious
> things :), and I'm looking for a "better way" to make something like
> this happen in a campaign:
>
> To edit your preferences, go tohttp://mydomain.com/?e=*|EMAIL|*&id=*|MC:ID|*
>
> The purpose of the ID is to have some measure of security when a user
> clicks on a link to go to our custom email preferences page. This way,
> someone can't just change the email in the URL and update someone
> else's preferences. If I have the email and the ID, I can query the
> MailChimp API for the email, and make sure the IDs match.
>
> The problem I have is that I cannot get access to the MailChimp
> Subscriber ID for an individual subscriber through Merge Tags. I can
> get this value by querying the API and using listMemberInfo, but there
> is no way to include that ID in a campaign as a merge tag so that it's
> unique per email.
>
> Now... I know that the support documents say to create your own merge
> tag to create a unique id for each subscriber (http://www.mailchimp.com/kb/article/can-i-create-a-different-link-for-each-r...),

Daniel Short

unread,
Feb 1, 2011, 8:58:18 AM2/1/11
to MailChimp API Discuss
So what is the [UNIQID] link? How would I create one to a page of my
own?

I tried using *|EMAIL_UID|* in a template, and it in the popup
preview, it didn't replace the merge tag. That tag is also not listed
in the merge resources.

Dan

On Jan 31, 1:33 pm, jesse <je...@mailchimp.com> wrote:
> You can either use [UNIQID] like all of the links in the campaigns you
> are sending already use or you can use the *|EMAIL_UID|* merge tag. I
> would not suggest including the plain email address in the URL. If you
> do decide that's necessary for some reason, you need to use the URL:
> formatter:http://www.mailchimp.com/resources/merge/
>
> jesse
>
> On Jan 31, 7:49 am, Daniel Short <dan.sh...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > First off, I'll let you know that I've tried all of the obvious
> > things :), and I'm looking for a "better way" to make something like
> > this happen in a campaign:
>
> > To edit your preferences, go tohttp://mydomain.com/?e=*|EMAIL|*&id=*|MC:ID|*
>
> > The purpose of the ID is to have some measure of security when a user
> > clicks on a link to go to our custom email preferences page. This way,
> > someone can't just change the email in the URL and update someone
> > else's preferences. If I have the email and the ID, I can query the
> > MailChimp API for the email, and make sure the IDs match.
>
> > The problem I have is that I cannot get access to the MailChimp
> > Subscriber ID for an individual subscriber through Merge Tags. I can
> > get this value by querying the API and using listMemberInfo, but there
> > is no way to include that ID in a campaign as a merge tag so that it's
> > unique per email.
>
> > Now... I know that the support documents say to create your own merge
> > tag to create a unique id for each subscriber (http://www.mailchimp.com/kb/article/can-i-create-a-different-link-for......),

jesse

unread,
Feb 1, 2011, 3:56:33 PM2/1/11
to MailChimp API Discuss
> So what is the [UNIQID] link? How would I create one to a page of my own?

Err, what? Also, I meant *|UNIQID|* - [UNIQID] is what you'll see as a
placeholder in links we generate


> I tried using *|EMAIL_UID|* in a template, and it in the popup
> preview, it didn't replace the merge tag. That tag is also not listed
> in the merge resources.

Did you send it? I verified that it is working and fixed it so they
should up in the popup preview.


jesse

Daniel Short

unread,
Feb 2, 2011, 8:09:40 AM2/2/11
to MailChimp API Discuss
> > So what is the [UNIQID] link? How would I create one to a page of my own?
>
> Err, what? Also, I meant *|UNIQID|* - [UNIQID] is what you'll see as a
> placeholder in links we generate

Um, I'm not sure what I was saying either :). I must have had a drop
in my caffeine levels.

> > I tried using *|EMAIL_UID|* in a template, and it in the popup
> > preview, it didn't replace the merge tag. That tag is also not listed
> > in the merge resources.
>
> Did you send it? I verified that it is working and fixed it so they
> should up in the popup preview.

I didn't send it, since I trusted the Popup Preview :). I'm seeing the
value in the preview now. Thanks so much for the help and the quick
fix on the preview. Really love being able to get support like this so
quickly.

Dan
Reply all
Reply to author
Forward
0 new messages