Wordpress, Mailchimp, Campaigns - should separate campaigns be used for something like notifying users of drip content?

I am new to integrating Wordpress and Mailchimp. I have a Wordpress site that offers music courses.

Within a course are several lessons.

I drip the lessons weekly, so that each lesson starts on a Monday.

I just added Mailchimp support via my site's composer.json by adding

  require: {
    mailchimp/marketing: *
  }

I can now use the Mailchimp API via

   require_once ABSPATH.'/vendor/autoload.php';
   use MailchimpMarketing\ApiClient as MailChimp;
   $mailchimp = new Mailchimp();
   $mailchimp-setConfig([
            'apiKey' = MAILCHIMP_APIKEY,
            'server' = MAILCHIMP_SERVER_PREFIX
   ]);

So all is well so far...

Now I am having a hard time conceptualizing how I should use Mailchimp to send emails to users who are subscribed to a course.

I use Memberpress to handle the dripped content, using its Membership Rules feature.

And for a given Membrepress membership I automatically create Mailchimp Merge Tags of form

Course_123
Membership_Premium_321
Membership_Trial_322

Where the numbers are the course and membership ids.

Once created, I then update my post meta so that for memberships I know the corresponding Merge tag ID. So in principle I have some starting point from which to build, but I don't know if this is the right way.

Now, when I add a Membership Rule that is of sort _mepr_rules_type = 'single_lesson' I am ready to create the Mailchimp Campaign, since I know the lesson id, the start date of the lesson associated with the rule, the associated memberships the rule access deals with, and I know the course id. With all this info I can create the content of an email.

But here is where I am stuck. Here are some questions:

1. At this point, should I create a separate campaign for each lesson/course pair? So campaigns like Send Email When Course 1, Lesson 1 Opens, Send Email When Course 1, Lesson 2 Opens, etc. In this case, the email distro would be segmented based on a condition like

user has merge tags Course_123 and Membership_321

and then using the MailChimp API I can generate a template on the fly with content for a given Course/Lesson being opened.

2. Or would it be better to create one template, and one campaign, and dynamically manipulate them via the API, using my own short codes? So, a generic campaign Send email when some lesson becomes open, and a generic template of sort

divLesson [title] has just opened and is available at [url]/div

With option 2, I suppose there is danger of multiple lessons across multiple courses opening at same time in which case maybe this is a dealbreaker since a change to a campaign/template might mess up another course/lessons's sent email content, but at same time my gut tells me option 1 is a bit overkill if I am creating separate campaigns, templates for every single course/lesson pair.

Anyway, figure many people have already figured this sort of stuff out and really curious if there is some tried and true approach that you could recommend.

Thanks!

Topic notifications automation Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.