MailChimp API v3.0 is now live!
Prior versions will no longer be supported after 2016, so all API users should begin transitioning to v3.0.
Check out the API v3.0 Documentation for more details.

Integrating Ecommerce functionality:

Our API contains some handy Ecommerce related methods for attaching order details to your list members. That data can then be used for segmentation when campaigns are sent.

While that's pretty neat, you can actually take things a step further by fully integrating with our Ecommerce 360 tracking functionality. Once that is turned (and your store is properly configured - see below), not only will order data for your list members be tracked, but you'll also be able to see the purchases directly related to a campaign in its reports section.

Preparing your Store

If you're using a fairly popular Ecommerce solution, by far the the easiest way to do this is by dropping in one of the numerous 3rd Party Plugins that have already been developed and tested. They'll handle all the heavy lifting of capturing campaign data and passing it back to us via the API.

However, if a plugin does not exist, you need custom functionality, or you just want to create a new plugin you'll need to read through the following information on how to develop for Ecommerce360 tracking...

Developing for Ecommerce360

When Ecommerce360 tracking is turned on, we simply add 2 special parameters to all tracked links:

  • mc_cid - this is the campaign's unique_id
  • mc_eid - this is the member email's unique_id
Your store/plugin will need to be able to capture that data from any link pointed at it and then hold onto that data. Our recommendation has generally been to store them in a cookie that stays around for, say, up to 30 days or whatever time frame you want - this could even be a configuration option if you're building a general purpose plugin. Or, you know, however you see fit - the point is you need it around at checkout because...

Now that you have stored that data a customer can browse around the store and, should they eventually make a purchase, you would then:

  1. Grab the mc_cid and mc_eid data you stored
  2. Collect the relevant Order Data
  3. Package all of that together and use the campaign specific ecomm/order-add method to send it over
  4. Fin. That's it!
Report data will be immediately available via the web interface and, should you want to pull in orders specific to a campaign later, there is also the campaign specific ecomm/orders method to grab that data.