mailchimp php integration - php

I am trying to find a simple bare bones example/demo that shows me how I can build a trivial/proof of concept website that will collect user email (and maybe first name), and add this name to a list created on mailchimp.
To clarify, I am not merely asking how to create a PHP/mySQl website - I already know how to do that, and I already know how to place a form on a page etc.
Assuming I already have the following:
- A php/MySQL site with a registration form
- A newly created list on mailchimp
More specifically, I want a user to be able to register on a page on my site, and then I want the following sequence of events to happen:
When a user clicks the 'submit' button on my page, their details gets sent to mailchimp and added to a specific list created on mailchimp
They are sent a confirmation email by mailchimp
Once they confirm subscription, they are directed back to a page on my site, with a token from mailchimp
I store their details (provided by mailchimp) into my MySQL database
I send the confirmed subscriber an email with an attachment
When the user unsubscribes from the list, I get notified by mailchimp and I can flag the user as unsubscribed in my database.
I have not been able to find a simple demo (or tutorial) that shows how to implement the required functionality listed above. Can anyone recommend a link (or links) to get me started with implementing these specific "bare bone" functionality?

The documentation is rather good I thought?
Just checkout the API-docs: http://apidocs.mailchimp.com/api/how-to/basic-subscribe.php
And if for some reason you do not want to read docs but just want to see code (please, don't do this, but hey, what do I know): click on the exmples listed here: http://apidocs.mailchimp.com/api/downloads/#examples
Start with the example code and if it doesn't do exactly everything, you can find it at the docs easily enough.

Related

Mailchimp api how to get member source

I need to find out which user added to list manual, or via api.
We are using v3 api of Mailchimp.
With members endpoint
POST /lists/{list_id}/members
We get info about members, but there is no way to get a source.
So how get members source parameter?
Don't know if this is still relevant, but might be helpful for others, so here's my findings:
If you have any platform passing this information back to MailChimp via the API into one of the merge fields, then that's the field to dig for in members.
The built-in source corresponds with the one you can see under the email address on the profile page of your list members. This is NOT passed through the API, so you can't export it that way, however, there is a lengthy workaround: You can create a segment for each of the Signup Sources either via the GUI from the tool or via the API (look for POST /lists/{list_id}/segments and then under Request body parameters it's options/conditions/condition type next to Segment Type there is a dropdown, there you can select Signup Source Segment - Signup Source), extract the segments into csv files, add the corresponding static Source (as per the segment criteria), and there, you have a lookup.
Below is the explanation to some of the fields. These are the ones we're using, and since it's not documented (see here, look for Signup Source further down the page), I got this chatting to their Customer Service team:
"Admin Add" > means contact was manually added using the "Add Contacts" > "Add a Contact" page in your list.
"API Generic" means that the contact was added by an API enabled form or by an API sync with a database.
"Embed form" means the contact was added using the embedded form code from your list. This can be found in the "Signup Forms" > "Embedded form code" section of your list.
"Hosted Signup Form" means the contact was added using the hosted signup form. This can be found in the "Signup Forms" > "Form Builder" section of your list.
"List Import" means contact was added via a list import.
"Unknown" means that we don't have a really clear understanding of how the contact was added to your list.
There are a lot more types, if you go online and chat to their team, they will be able to tell you more about any that may not be self-explanatory.
Hope this helpZ? :)

Wordpress: Fire Verification mail when user signup using MemberMouse

I am a Wordpress developer using a plugin called MemberMouse and got a task that whenever a user signup using MemberMouse sign up form it fires an verification email to the new registered user.
I was asked to do it with the smart tags provided by MemberMouse.
As I read out the plugin's documentation I do not find any smart tag that perform this type of action. Is there any way to make this verification thing work?
I tried to figure it out myself. It could only be done by writing a custom code for it in Wordpress that triggers mail after user becomes a Member.

Wordpress Opt-In Form with Social Login to receive Leads from Users

Dear Stackoverflow Community,
I am an Online Marketer and I am facing a problem: People are not converting when visiting my page through a smartphone. My interpretation is: they are lazy, as I am too.
I am not too terrible deep into programming Wordpress, but I thought about something and seeking advise:
I want to to build a Opt-In Form, which uses Facebooks "Social Login"
to process the Lead.
I need to find a way to get the "E-Mail-Adress" through the Facebook open graph API.
I generated a lead with one simple click.
I guess Online Marketers are graving for a feature like this!
So my question is:
Do you think it is possible to build a Wordpress Opt-In Form which uses Social Login (Facebook, Google) to receive E-Mail-Adresses from my users?
Maybe someone has some experience with this.
Best wishes
Dennis
I don't think there is a way to capture user's email address from facebook without permission of that user. However, there are a number of plugins that show popups and widgets to get users to subscribe to your newsletter etc.
https://wordpress.org/plugins/optin-forms/screenshots/
Also, if your content is good and if you create a catchy Call to Action, then it's possible to get more people to subscribe to your blog.
Isn't the process of opting into a subscription more involved than simply entering a name and email? Personally, I will ignore an optin form that requires me to do a social login.
Using a regular WordPress opt-in form plugin would suffice.
By the way, do you have any data that shows conversion is low because social login isn't present?

Using Mailchimp API with Shopify

I am attempting to use the Mailchimp API to allow site visitors to subscribe to my newsletter. Currently, any signups with the default form action that Mailchimp provides sends an Opt-In email and opens a new email to say thanks for subscribing, which I want to avoid. Instead, if I use the API, I can set those options to false. The problem is that it doesn't look like Shopify allows PHP or Ruby in their shop code. I've been looking for weeks for a solution, but I'm at a loss.
Here is a turnaround for this:
1.- Create a Wufoo form with one only field: email address.
2.- Paste this Wufoo form at your Shopify store. We'd recommed pasting the JavaScript version.
It can look like this
3.- On your notifications tab at your Wufoo form, choose to Send notifications to Another Aplication. On the dropdown, choose MailChimp click on Add integration and follow steps. You will be sending all email addresses to your desired MailChimp list.
Tiny problem is that placeholders on Wufoo forms, don't disappear on click, so the user needs to go inside the field and delete all the placeholder. (This might be a good point because robots can't do this, and you make sure the user is really involved in the process of typig his/her email address.)

How do I prompt a user to import their yahoo contacts list upon clicking a form?

I am trying to have a user sign up for a service via a PHP form and upon successful validation of their yahoo email prompt them to allow my application access to their contacts list (i.e. import the list) and ask them to send a message to their contacts.
Unfortunately I don't really know where to start, the code samples on the yahoo site itself are a little bit too advanced and not direct enough.
Can someone point me to a similar code sample or sketch out quasi-code? I want to actually learn how to do this...so i don't want ready made scripts to download...unless they are a tutorial/other pedagogical resource...
Thanks!
You can start here (official)
But this is the best I found so far Grab Yahoo! at phpclasses.org.. (you need to be a registered user to access file). There are download links at the bottom of page.
Try keywords like "php grab yahoo contacts" in Google for more solutions.

Categories