back to phpList.org

Wordpress : how do you manage user subscription on your website?


#1

Hello,
I would like to know what are the best ways to allow Wordpress website visitors to subscribe to PHPlist lists.
I need GDPR compliance (of course), automated subscription process and the ability to use custom fields in subscription forms.
What would you advise me ?
Many thanks in advance,
T.


#2

Do you want to add the subscription form in the sidebar? You can use one of the plugins in the WordPress repository. Or you can get your form and paste it in a text widget to display it in the sidebar. This post explains how to do it.

To comply with GDPR you should leave the double opt-in turned on (to obtain consent) and delete all the info of the users who unsubscribe to your list.


#3

Not that simple… Here are some more informations which could be useful for others :slight_smile:

I made exactly what is written in the post you linked to. But when testing, I first got javascript error because checkform() was not defined. Of course ! So I had to install the “Simple Custom CSS and JS” extension and copy-paste the PHPList script section which defines checkform(). Now, validation works but I got CSP errors :

Content Security Policy: Ignoring “https:” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “http:” within script-src: ‘strict-dynamic’ specified

Ok. The PHPList installation is not on the same server than the form (form is on http://www.myfirstdomain.com and PHPlist installation is http://www.myseconddomain.com).
So I installed " WP Content Security Plugin" plugin, set CSP to “script-src ‘self’ ‘unsafe-eval’ ‘unsafe-inline’ *.google.com *.gstatic.com *.myseconddomain.com;” checked the headers using https://securityheaders.com.

Also, I wrote in PHPList’s config.php on http://www.myseconddomain.com the following :
define('ACCESS_CONTROL_ALLOW_ORIGIN','*');

AND IT WORKS. Hipeeeeeeeee ! :sunny:


#4

That’s very helpful – many thanks for sharing. If you ever turn it into a blog post or howto (FYI your forum account here gives you a blogging account on phpList.org by default) then please post the link here.

Care to link to the final result of your form embed so we can admire your handiwork?