Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mailchimp subscription metadata

Tags:

ruby

mailchimp

Is it possible to add metadata to user mailchimp subscription?

This is my mailchimp method for subscription :

def subscribe_to_newsletter
    MAILCHIMP.listSubscribe(id: MAILCHIMP_LIST_ID,
                            email_address: email,
                            double_optin: false,
                            merge_vars: {FNAME:firstname,LNAME:surname})
  end

I'm wondering can I put some metadata like some unique property for the object being subscribed, or the property being common for more than one object?

Or is there a way to do this mailchimp way?

like image 257
Gandalf StormCrow Avatar asked Apr 16 '26 10:04

Gandalf StormCrow


1 Answers

You can define new merge_vars using listMergeVarAdd. Once you've done that you can include them in the listSubscribe merge_vars.

like image 128
infused Avatar answered Apr 18 '26 23:04

infused



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!