This is a bit of a curly one so bear with me :)
I have a newsletter sign-up form in the footer of my site. It has an email field and a submit button (nice and simple).
I'd like to get a bit more info from people when they sign up, but I don't want to create a subscription barrier by adding more fields to the form.
What I'd like to do is send a confirmation email. When they click the link in the email, they are sent to a page (preferably on my site) which says "Email confirmed". That page would also have a bunch of other optional fields like "Name", "Company" etc, as well as a few check-boxes like "Send me industry news" or "Send me latest case studies" etc. So the user would have the choice to customise their newsletter subscription right at the point of subscribing. Filling in these optional fields would then update the Campaign Monitor custom fields for that user.
The only way I can see that this would be possible is by creating a custom solution using the CM API. Is this the case?
Thanks for your help in advance!
Wayde, you could actually do this without the API quite easily.
1. Add the custom fields to this list that you'd like to capture such as company, etc.
2. Set up your own custom subscription confirmation page for your double opt-in list and include the complete subscribe form on the page. Upload the page to your server - let's say the page is at www.yoursite.com/welcome.php
3. Head into "Create a Subscribe Form" for this list and use the URL of the page you've created as the "subscription confirmation page".
4. Add the following extra snippet to the URL so you can pass in the email address of the person subscribing. ?email=[email]. So the full URL might be www.yoursite.com/welcome.php?email=[email].
5. Now, each time someone confirms their subscription, they'll be redirected to your confirmation page and their email address will be in the URL.
6. Here's the tricky part, using your own server side code, grab their email address from the URL querystring and add it as the value of the email address field in the subscribe form.
7. Finally, set the email address input field as hidden. because we've already got their email address, you don't need to ask for it again.
So, as soon as the person clicks the confirmation link they will be added to your list, and if they complete the additional form on their subscription confirmation page, we'll update their custom field data with whatever else they wish to share with you.
Brilliant! That's exactly what I was after Dave. Much appreciated.
New site is going to launch in a week, so I'll post a link when it's done so you can see my handy-work ;)
Thanks again :)
Thanks Dave - tried this out and it worked a treat.
The only thing that's not quite right is that the user gets a confirmation message twice - when they first sign up and again when they edit their details.
Any way around this?
Big issue with this method: since the email is passed in via query string, anyone can alter the address in the query string and change the details of other users.
If you populate the hidden form input with the email address on page load, then it doesn't matter what they change the querystring value to, it's the value of the hidden form element that will be used.
Can you explain your last point a little more. From what I understand so far:
- Hidden fields are populated using a query string on page load
If the user changes the query string and loads the page won't the hidden fields be updated to?
Sorry for any confusion there. You're right, if someone changes the querystring AND reloads the page then the hidden field will be updated.
Of course, if they changed it to a different email address then they could get the initial double opt-in confirmation email, and wouldn't be added to the list unless that was clicked. Also, I don't know how much weight I'd give the chances of someone wanting to change the saved details of the other subscriber. They'd need to get to this secondary confirmation page, know that the other address is subscribed and then modify the querystring and change the subscribers details.
To me this sounds like an extreme long shot.
It is a long shot for sure.
I guess we will need to decide on how secure we want the form vs the time its going to take.
For 100% security we could mix it in to our member system and use the api.
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free