In this article we explain how you can hide the opt in field using a URL parameter. This means that when you send supporters to your form from an email, you can set it so that people already opted in don't have to do so again. This should increase the conversion rates on your form by it being a little shorter and simpler for people already subscribed.
You should only use this approach if all of the below apply:
- You have decided that you don't need to give supporters the opportunity to opt out of emails while completing your forms. This is a judgement call that each organisation must make on their own
- You have configured your newsletter field so that not making a selection does not change your subscriptions and specifically does not act as an unsubscribe
How to do it
1. Drag a hidden field onto your form and assign it with a key such as 'activeopt'
We recommend placing this above your opt-in field for consistency.
2. Populate this field using your email URLs
So now you need to fill this, which is surprisingly simple. When putting URLs into your emails, simply add '#p:activeopt=Yes'. And everyone clicking on that link won't see the opt in fields (once you've completed the steps below). Here's a simple example URL:
You can of course add more tracking and pre-filling to the same URL, here's an example of a URL with tracking and pre-filling data, note that pre-fill data comes last
The form pre-population are all coloured red. If you don't want to use a longer URL, that's OK, just make sure that p:activeopt=Yes is included after the #. (Remember to change the node number too, '123' is just an example.)
Before GDPR kicks in on 25 May 2018, you may well have two types of opted in users. Those who opted in in a GDPR compliant way, and those who haven't yet. In order to make sure that users who aren't GDPR opted-in still get the chance to see the opt-in fields just make sure that the URL for these users does not include p:activeopt=Yes. We offer no advice on whether you can or can't email these supporters, that's entirely up to you.
3. Set-up your form field conditionals
Next up you need to tell the form what to do when the field 'activeopt' is populated with 'Yes'.
To do this you need to use form conditionals. These aren't yet in the normal interface but you can access them at:
(Remember to change the node number too, '123' is just an example.)
Here you should set up the conditions as follows, in the below example the newsletter subscription field was also mandatory, so of course you have to make it not-mandatory in the conditionals before hiding it; otherwise people who can't see the field won't be able to successfully submit the form.
Then hit save.
As always make sure you robustly test your links before launching. Check that:
- The fields are still visible by default
- The fields are not disappearing when activeopt contains anything other than 'Yes'
- The correct fields are disappearing when 'activeopt=Yes'
- The form can still be submitted when the newsletter field isn't visible (i.e. it's not mandatory and hidden)
- and make you run the test both as a logged in Campaignion user, but also logged out (as your supporters will be)
As always if you get stuck, feel free to reach out: firstname.lastname@example.org
- It doesn't matter what value you use for your hidden field, we've suggested 'activeopt' but it will work with any short text string so long as the value in the URL from your email sender matches the key of the field on the form.
- If you want to learn more about conditional form fields and try them out for other purposes, check out this article: Using conditional form fields.
- Remember to consider renewing consent. As a part of GDPR, consent given is not valid forever, remember when planning your communications to consider how and how often you want to renew this consent. If you want to renew consent by getting another active opt-in, you won't want to hide the opt-in field for all opted in people all of the time.