Your cart is currently empty!
How to include users names in Groups Newsletters
—
by
Hello there,
I have been using Groups and Groups Newsletters plugins together for years and it works like a charm.
I really need today to include the First Name (and maybe also the Last Name) of the user the newsletter is sent to into my newsletters.
For that I would like to include something like a shortcode in my stories that would be replaced by the actual user details when sent. It’s like traditional “email merge” capability usually found in bulk emailing software. Something like:
Dear [groups_newsletters_user_firstname], …
or
Hello [groups_newsletters_user_firstname] [groups_newsletters_user_lastname], …
which would resolve respectively in:
Dear John, …
or
Hello John Doe, …
Would it be possible to do that and how?
Thanks a lot in advance!
Yves.
Comments
8 responses to “How to include users names in Groups Newsletters”
Hi Kento,
Thanks a lot for the answer. Regarding automatic campaign management, I’ll have a look at your code and try to understand how to do it. The selective subscription/unsubscription feature is not necessarily a high priority for me, too.
Thanks for the great plugins and support!
Yves.
Hi Dimitris,
So good to hear that 🙂 I stay tuned, for sure!
Thanks,
Yves.
Hi Yves,
Good news! We have just released the update and you will find the documentation for the new shortcode here: http://docs.itthinx.com/document/groups-newsletters/shortcodes/groups_newsletters_user/
Cheers!
Hi Yves,
Thank you for using Groups and Groups Newsletters. The shortcodes in your examples are a great idea and this is something we are currently discussing. We might be releasing an update over the next days with this functionality added.
I will follow up as soon as I have news on this.
Kind Regards,
Dimitris
Hi Kento,
Thanks a lot, it looks exactly what I was dreaming of! I was sure you will do even better that what I was actually needing. Being able to fetch any user_info field can be very useful.
By the way, I have been maintaining a small patch in the class-groups-newsletters-controller.php file for months, and I’m not sure I mentioned it to you, sorry. This is on line 149:
// do_action( ‘groups_newsletters_user_unsubscribed’, $user_id ); /*** LS4S FIX ***/
do_action( ‘groups_newsletters_user_unsubscribed’, $user->ID ); /*** LS4S FIX ***/
($user_id is not defined previously in this function).
Kind Regards,
Yves.
Hi Yves,
Awesome! I’m very glad to have this added thanks to your suggestion!
Thank you very much for pointing out the issue with the undefined variable, too. Your suggested fix has been applied in version 1.5.1 and has just been released. If this is the only change in the version you are using, you won’t need to patch it and can simply use the updated one.
Kind regards,
Kento
So great! I will be using this very last version with personalised fields in my next monthly newsletter, for sure. Thanks very much!
Additionally, this new feature open new possibilities to use Groups Newsletters + Groups as a really efficient mailing tool, not only as a newsletter tool. Indeed, I have dozens of different groups on my site (which are programmatically created each time a new private “workspace” is created for a new collaborative team), and this new feature would allow to sent personalised emails to a certain team each time a certain action is performed within the team. All that automatically. For this to work, I would need 2 things:
– To be able to manage (create, publish, run) a campaign programmatically.
– To find ways for a certain group members to subscribe/unsubscribe on a given newsletter assigned to their group, without subscribing/unsubscribing to all newsletters.
For the 2nd point I’m not sure : I think I asked you a couple of years ago if it was possible to have multiple newsletters and manage them separately, but your answer was negative…
Maybe you have some answers or suggestions on these two points. I have no such critical requirement yet, it is just that I extensively use Groups on my site and this personnalisation feature opens a wide range of new usages and possibilities for me.
Thanks and have a nice day,
Yves.
Hi Yves,
Thank you very much! I’m really happy that we could help you with this, I think it’s a great additional feature so also thanks to you for the suggestions!
Regarding these points:
– To be able to manage (create, publish, run) a campaign programmatically.
That is possible, you would need to create the campaign post and relate it to the newsletter(s) that it should send. Once the campaign is published and running (a meta value related to the post), the scheduler will automatically process it.
– To find ways for a certain group members to subscribe/unsubscribe on a given newsletter assigned to their group, without subscribing/unsubscribing to all newsletters.
That is a feature we haven’t looked at further, but it’s certainly reasonable and I believe it would make a lot of sense in some deployments. There hasn’t been as much interest in it as I would require to actually make it a near-term priority for the plugin, but if it would make sense for you to sponsor its addition, we could figure something out.
Again thanks for all the input, happy Friday and weekend!