Closed johanb closed 11 years ago
Hey Johan,
We could also make double opt-in a config setting. That will make it easier for many users that dont need double opt-in. For those that need double opt in they can run the rake task like you suggested
what do u think?
@joshnuss sounds good to me.
spree_chimpy:users:sync
to sync user dataDo you want do handle it or you can leave it for me and I'll get to it later in the week
@joshnuss was just about to get started on it.
perfect
On Sun, May 19, 2013 at 1:58 AM, Johan Bruning notifications@github.comwrote:
@joshnuss https://github.com/joshnuss was just about to get started on it.
— Reply to this email directly or view it on GitHubhttps://github.com/DynamoMTL/spree_chimpy/issues/14#issuecomment-18112889 .
Still WIP
@joshnuss should we really default the doublt_opt_in to false ? It would work better for the segmenting, but it goes against mailchimps default. What do you think ?
I believe double opt in is not required if you have a "subscribe to newsletter" checkbox on your user registration form. because the user has chosen to subscribe. will check the docs
@joshnuss it's not required. FWIW, currently double-opt-in is the default. https://github.com/DynamoMTL/spree_chimpy/blob/master/lib/spree/chimpy/interface/list.rb#L15
@joshnuss asside from making a decision on wether or not we want to have double-opt-in as a default this should be ready to merge.
So, uhm, what about this PR ? @bryanmtl @joshnuss have you decided what the default behavior should be ? other than that it's ready to merge.
@johanb Sorry for taking forever to get this in, this is gonna be a really useful feature. thanks!
I just noticed an issue with the segmenting code. Apparently Mailchimp does not allow you to segment users that have not yet confirmed their mailinglist subscription. So if you have the double opt-in enabled (where Mailchimp sends you an email to confirm the subscribtion), the user that just created an account with the store will never get segmented.
Mailchimp will return the following response in this case:
There is a few ways we can tackle this:
The most robust solution would be to do option 1 + 2. Users that don't use double opt-in have no issue with this. Users that do use it, can set up a cron. The only downside would be the extra set-up for a cron but that's not such a big deal.
I'd love your feedback on this @joshnuss before I whip up a PR.
Relevant API docs: http://apidocs.mailchimp.com/api/1.3/liststaticsegmentmembersadd.func.php