Constant Contact for WordPress

Get Premium Support for this plugin or visit the community support forum

Constant Contact for WordPress

This plugin has 91517 downloads

This plugin requires a Constant Contact account.
Don’t have an account? Constant Contact offers a free 60 day trial, so sign up and give this plugin a whirl!

Fully integrate Constant Contact with your WordPress website.

The Constant Contact for WordPress plugin is the best email marketing plugin for WordPress: integrate your website seamlessly with your Constant Contact account.

You can place a signup checkbox or list selection on your register page or use the signup widget anywhere in your website sidebar or PHP templates.

Event Marketing

The plugin features Constant Contact Event Marketing functionality by allowing you to track events, registration, and registrants using the plugin. Simply navigate to Constant Contact > Events. Manage your events from inside WordPress!

Built-in Form Designer

The Constant Contact Form Designer is a form generation and design tool. The Form Designer allows users to generate unlimited number of unique forms and gives a wide variety of options that can be configured, including what fields to show in the signup form. There and tons of design options, including custom background images, border width, colors, fonts and much more.

Constant Analytics: In-Depth Google Analytics

View your Google Analytics data in your dashboard with Constant Analytics. View traffic by source, geography, and popularity. See the impact of blog posts and email campaigns with the great graphing tools.

Plugin features:

  • Add signup checkbox and list selection to your register page and update profile page
  • Add / edit contact lists without visiting constantcontact.com
  • Includes a powerful form designer
  • Built-in Google Analytics visualization
  • View your events registration details and get updated with a dashboard widget
  • Show contact list selection on register page with ability to exclude certain lists
  • Automatically subscribe your user to one or more contact lists on the register page
  • Customize the register page signup box (and list selection) title and description
  • Add / edit users from your constant contact account
  • Add a signup widget to your sidebar or anywhere in your template

Plugin Support

To obtain support please use this link to the wordpress forums.

If you like the plugin…

If you use the plugin and find it useful please make sure to come back and vote so other users know it works.

Download

Latest version: Download Constant Contact for WordPress v2.4.1 [zip]

Installation

To install the plugin follow the steps below:

  1. Upload constant-contact-api to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Activate the Constant Contact API: Form Designer plugin (optional)
  4. Click the new main menu item called “Constant Contact”.
  5. You’ll need to enter your username and password on the settings page then save the page to see your contact lists.
  6. Now Configure the “Register Page Settings” to get the checkbox or list selection displayed on the user register page.

Using the Form Designer

  1. Install this plugin.
  2. Activate the Constant Contact API: Form Designer plugin
  3. Configure the settings on the form designer by updating the settings in the boxes on the left.
  4. Next to “Form Name” where it says “Enter form name here,” enter your form name.
  5. Once you have configured and named your form, click Save Form.
  6. In the Appearance menu of the administration, click the Widgets link.
  7. Drag the widget named “Constant Contact Form Designer” into the sidebar.
  8. Configure the settings shown, then click the “Save” button at the bottom of the widget form.
  9. You will see the signup widget you created on your website!
  10. To edit the form, return the the Form Designer page (from Step 3) and click on the form tab with the name of the form you would like to edit. Edit the form, then click Update Form. The form will show as updated on your website.

FAQ

Q. Do I need a Constant Contact account for this plugin?
A. This plugin requires a Constant Contact account.

Constant Contact is a great email marketing company — their rates are determined by the number of contacts in your list, not how many emails you send. This means you can send unlimited emails per month for one fixed rate! Give it a test run.

Q. Is there shortcode support?
A.

Form Shortcode

There is shortcode support for the Form Designer forms: [constantcontactapi] with the following options:

'formid' => 0, // REQUIRED
'before' => null,
'after' => null,
'redirect_url' => false,
'lists' => array(),
'title' => '',
'exclude_lists' => array(),
'description' => '',
'show_list_selection' => false,
'list_selection_title' => 'Add me to these lists:',
'list_selection_format' => 'checkbox'

So to add a form, you would add the following in your content: [constantcontactapi formid="3"]

Event Shortcode

To show event details, you can use the [eventspot] shortcode with the following options:

'id' => null, // Show a specific event; enter Event ID (found on the Events page) to use
'limit' => 3, // Number of events to show by default
'showdescription' => true, // Show event Description
'datetime' => true, // Show event Date & Time
'location' => false, // Show event Location
'map' => false,  // Show map link for Location (if Location is shown)
'calendar' => false, // Show "Add to Calendar" link
'directtoregistration' => false, // Link directly to registration page, rather than event homepage
'newwindow' => false, // Open event links in a new window
'style' => true // Use plugin styles. Disable if you want to use your own styles (CSS)

Sample Event Shortcodes

  • To show event details for 5 events using the default settings, you would use [eventspot limit=3]
  • To show event details for a single event with the id of abc123 and also show the location details and map link, you would use: [eventspot id="abc123" location=true map=true]
  • To use your own CSS file, you would use [eventspot style=false]

Q. How do I use the new `apply_filters()` functionality? (Added 1.1)
A. If you want to change some code in the widget, you can use the WordPress add_filter() function to achieve this.

You can add code to your theme’s functions.php file that will modify the widget output. Here’s an example:

function my_example_function($widget) {
    // The $widget variable is the output of the widget
    // This will replace 'this word' with 'that word' in the widget output.
    $widget = str_replace('this word', 'that word', $widget);
    // Make sure to return the $widget variable, or it won't work!
    return $widget;
}
add_filter('constant_contact_form', 'my_example_function');

You can modify the widget output by hooking into any of the filters below in a similar manner.

To modify the Events widget output, start with the following code, again in your theme’s functions.php file:

add_filter('cc_event_output_single', 'cc_event_output_single', 1, 2);

function cc_event_output_single($output, $pieces = array('start'=> '','title'=>'','description'=>'','date'=>'','calendar'=>'','location' => '', 'end'=>'')) {
    // The pieces of each event are stored in the $pieces array
    // So you can modify them and cut and paste in what order you
    // want the pieces to display
    return $pieces['start'].'Description'.$pieces['description'].$pieces['date'].$pieces['end'];
}

Some example filters:

  • Entire form output: constant_contact_form
  • Successful submission message: constant_contact_form_success
  • Form description text: constant_contact_form_description (after it has been modified by wpautop())
  • Error message: constant_contact_form_errors
  • Submit button: constant_contact_form_submit (includes entire input string)

Q. My email campaign click data isn’t being tracked in Constant Analytics
A. Constant Contact does not have built-in Google Analytics “tagging” that would track the click data. When you create links in your Constant Contact campaigns, use the Google URL Builder to add tags to your links. Make sure to set the Campaign Medium to email!

When you do that, email click stats will be segmented for you in the Site Traffic box.

Q. How do I use the Form Designer?
A.

Using the new Form Designer

  1. Install this plugin.
  2. Activate the Constant Contact API: Form Designer plugin
  3. Configure the settings on the form designer by updating the settings in the boxes on the left.
  4. Next to “Form Name” where it says “Enter form name here,” enter your form name.
  5. Once you have configured and named your form, click Save Form.
  6. In the Appearance menu of the administration, click the Widgets link.
  7. Drag the widget named “Constant Contact Form Designer” into the sidebar.
  8. Configure the settings shown, then click the “Save” button at the bottom of the widget form.
  9. You will see the signup widget you created on your website!
  10. To edit the form, return the the Form Designer page (from Step 3) and click on the form tab with the name of the form you would like to edit. Edit the form, then click Update Form. The form will show as updated on your website.

Q. Form Designer isn’t showing up or working
A. Form Designer needs to be activated separately from the main plugin (see “How do I use the Form Designer?” above). Once you activate it, if it’s still not working, it’s likely a server issue.

The problem is that your web server may think that Form Designer is an unwelcome script. In order to fix this, you should contact your web host and request that they “whitelist your domain for ModSecurity.”.

HostGator reps said whitelisting your own domain is not an issue that affects website security.

Q. My gradients aren’t working on the Form Designer!
A. This plugin uses Ozh’s gradient script. Please refer to that page.

Q. What is the plugin license?
A. Good news, this plugin is free for everyone! The plugin is licensed under the GPL.

Q. Registration form
A. To make the checkbox appear after the “Signup Title”, add the following to your theme’s functions.php file:

add_filter( 'constant_contact_register_checkbox_before', '__return_false' );

Changelog

2.4.1 – January 31, 2013

  • Fixed: issue with WordPress registration: the “Hidden Contact Lists” lists were not being properly added (the list IDs were incorrect), causing issues.
  • Added: “Default Option Text” registration option, visible when using a Dropdown List “List Selection Format”. Allows you to set the default text of the dropdown list.

2.4.0.3 – January 29, 2013

  • The “You do not have sufficient permissions to access this page.” error was caused by the plugin not reporting Error 403: Account Locked on the settings page. This release adds that error code.
  • Consolidated dupe session_start() function
  • Form Designer menu option now does not display if the plugin is not properly configured
  • Updated Form Designer page permissions to manage_options instead of administrator

2.4.0.2 – January 28, 2013

2.4.0.1

  • Possibly fixed issue with login not working on IIS sites

2.4.0

  • Fixed some potential XSS vulnerabilities. Thanks to Manuel for making them known.
  • Form Designer
    • Updated to the latest TinyMCE codebase for the Form Editor. Unfortunately, the plugin still can’t use the WP editor due to technical limitations.
    • Switched to using built-in jQuery and jQuery UI scripts for better speed and support going forward
    • Fixed lots of bugs
    • Fixed scrollFollow
    • Added some authentication to prevent hacking
  • Fixed link to import FAQ
  • Improved internationalization support plugin-wide
  • Fixed: “View Activity” link now works to view individual activity items.
  • Fixed Form Designer Widget extra options visibiltiy bug
  • Improved admin styling for WordPress 3.5
  • Removed Export page. Didn’t make sense to have in there.

2.3.12

  • Fixed issue introduced in 2.3.11 where settings were printed in the legacy widget.

2.3.11

  • Fixed issue introduced in 2.3.10 where First Name and Last Name checkboxes don’t stay checked in the Legacy Form Widget

2.3.10

  • Form Designer Updates:
    • Added: Set the lists a form subscribes to in the Form Designer
    • Fixed: Ability to edit existing forms
    • Fixed: Issue where saving an existing form will jump to a different form
    • Added: A new form ID generator will prevent overlapping IDs when deleting forms
  • Fixed: Constant Analytics once again allows you to pick from your Google Analytics profiles
  • Modified: Removed “Add Campaign” button: the feature wasn’t ready, and was included by mistake
  • Improved Events list to include shortcode instead of unclear id
  • Added [eventspot] shortcode. Previous [ccevents] shortcode still works.
  • Added internationalization (translation support) to the Legacy Form widget.
  • Added field for submit button text to the Legacy Form widget.

2.3.9

  • Fixed Form Designer issue affecting being able to select active form
    • Added “Clear All Forms link” in top-right of Form Designer page to delete all forms
  • If Event Location is empty, widget will not show “Location:” text

2.3.8

  • Added Akismet spam filtering
  • Fixed many issues with the Form Designer
    • Selected a form by default
    • Fixed broken Form Text field updating process
    • Fixed live updating for Form Alignment settings
    • Fixed issue with required fields not working
    • Added support for text color in the Form Text box
    • Added confirmation before deleting a form
  • Added an unique id to each form for valid HTML on pages with multiple forms
  • Made General Interest list not editable, since editing doesn’t work anyway
  • CC password now a text field to help password entry
  • Changed how session_start() is called; should fix a potential bug

2.3.7

  • Fixed fatal error for users with PHP versions not supporting checkdnsrr function for email domain validation.

2.3.6

  • Resolved issue with Constant Analytics data not pulling
  • Fixed issue with empty Form Designer submit button values

2.3.5.1

2.3.5

  • Fixed one more fatal error

2.3.4

  • Fixed issue with constant-analytics.php causing PHP warning

2.3.3

2.3.2

  • Fixed major issues with [constantcontactapi] shortcode not parsing passed attributes.
  • Fixed bug where submitting a form with empty email field showed success
  • Added a check for valid email domain name. This will prevent some fake email addresses (such as asdasdsa@adsamlcsac.com)
  • Added a shortcode hint in the Form Designer
  • When Form Designer forms are submitted and errors exist, submitted data is now filled into the forms. Users won’t need to fill out the form again.
  • Removed ability to delete users & lists, since it doesn’t work for some reason
  • Fixed some Form Designer bugs
    • Now Form Field checkboxes stay checked
    • When saving a form, the error message no longer displays
    • Submit button text now updates in the form preview.
    • Added a background & border to the Form Slide so that it’s obvious why clicking doesn’t work when Slide is turned on.
    • If a form exists, it is selected to edit by default (instead of Create New Form). This should help prevent confusion and duplicate forms.
  • Added check for configuration to Constant Analytics dashboard
  • Technical
    • Wrapped the plugin startup actions & hooks in a plugins_loaded hook
    • Removed config.php file; wasn’t necessary

    2.3.1

    • Updated Constant Analytics Javascript for WordPress 3.2 compatibility
    • Fixed some not-so-minor issues
      • Fixed issue with legacy widget where hidden lists were not being added to the form properly
      • Fixed Fatal error: Call to undefined method WP_Http::_getTransport() in .../constant-contact-api/constant-analytics.php on line 624 (issue 604275)
    • Squashed minor bugs, notices and errors
      • Removed word “Array” some users are seeing at the top of their Form Designer forms (issue 597622)
      • Fixed Invalid argument supplied for foreach() .../constant-contact-api/functions.php on line 844 notice (issue 596160)
      • Fixed Undefined index: lists, exclude_lists in legacy widget
      • Fixed issue where if shown contact lists were the same as hidden lists, an empty select input or list may be shown.

      2.3

      • Added Contacts capability
        • Add new contacts from inside WordPress
        • View and edit all your contacts
        • Edit contact information, subscribed lists, etc.
        • View all the contacts in a list
      • Added Constant Analytics, a great Google Analytics statistics tool that helps you visualize your blog traffic as well as blog posts and email campaigns in the same chart.
        • Switch between Google Analytics profiles & accounts
      • New feature: hover over the Constant Contact logo to easily switch between plugin pages.
      • Improved plugin load time on the administration
      • Update should fix issue where updating users from the User administration page doesn’t work properly (issue 566686)
      • Added a hook for internationalization of plugin (multiple language support)

      2.2

      • Added an Events widget and shortcode

      2.1.4

      • Converted the plugin to using the WordPress HTTP API and wp_remote_request(). This should fix issues some users have been having with setting up the plugin (such as issue #565047)
      • Fixed issue where if the Constant Contact username & password settings were incorrect, then saved again (and still incorrect), there would be an error Warning: Cannot modify header information - headers already sent by...
      • Improved error messages so you’ll know whether Constant Contact is having an issue of if it’s a settings configuration issue.

      2.1.3

      • Fixed issues with legacy widget not updating “Show First Name” and “Show Last Name” settings (issue #548028)
      • Improved legacy widget to show “More info” content and reflect changes to “Show List Selection?” checkbox setting
      • Fixed “Invalid Argument” Line 183 error (issue #547609)
      • Fixed issue with forms not redirecting upon success (issue #547609)

      2.1.2

      • Form Designer
        • Determined that issues with Form Designer not displaying are caused by hosting configuration issues. Contact your web host and request that they “whitelist your domain for ModSecurity.” View the FAQ section for more information.
        • Improved error notices for Form Designer when hosting issues are detected.
        • Improved the form generator javascript
      • Legacy (non-Form Designer) widget
        • Improved speed
        • Fixed issue with “Please select at least 1 list” when Show List Selection was not checked
        • Restored functionality: incomplete form submissions once again fill in submitted data
      • WP Registration form
        • Added support for Multisite registration forms
        • Vastly improved registration form functionality, including formatting of description, labels, and more.
        • Fixed bug #432029; “subscribe users by default” now functions properly when using the single opt-in checkbox
        • Added multiple filters to modify registration form, including constant_contact_register_form; you can now modify entire output of plugin on the registration page by using add_filter('constant_contact_register_form', 'your_function_to_modify');. Learn more about add_filter on WordPress.org.
      • Events – restored Events functionality that got messed up in 2.1.1.

      2.1.1

      • Improved Events page layout by adding Event Status filters and updating styles
      • Added Events dashboard widget showing active & draft events

      2.1

      • Events Marketing page now available in the administration (under Constant Contact > Events)
        • View event and registrant details
      • Improves speed of administration by caching Activities, Campaigns, Lists, and Events

      2.0.1

      • Fixed major bug where username and password would be reset when saving settings on the plugin’s Registration options page. (issue #532274)
      • Restored options to show or hide first and last names in Legacy widget (issue #532932)
      • Fixed multiple Legacy widget bugs
      • Remedied bug where registration form description wasn’t displaying (issue #513878)
      • Improved blog registration form HTML
      • Improved Admin Profile lists HTML

      2.0

      • Major upgrade – make sure to back up your database. If you already have installed the plugin, this upgrade may not transfer your current settings.
      • Went through each page of the admin and made the layout and code better, and reworded the administration to make more sense
      • Fixed Import, Export, Activity
      • Converted the widget settings to be in the widget, not on a page.
      • New Form Designer – Create awesome forms with tons of configuration options. This is really cool. Requires a decent browser for the admin. Internet Explorer older than 2009 won’t work. Please leave feedback with issues – this feature is in Alpha.
        • Drag and drop inputs with live-updating form preview
        • Create custom gradients or choose from patterns or URL-based backgrounds
        • So, so much more.
      • Lists will now be updated (bug #423429)
      • Added a sample import CSV file in the plugin folder, named email-import-sample.txt
      • Improved load time of the plugin & widget

      1.1.2

      • Minor bug fix, fixes in_array(): Wrong datatype for second argument error reported here.
      • Added menu image for plugin, and forced plugin name to be on one line. Menu looks nicer now.
      • If plugin is not configured, the other menu items (Activities, Import, Export, Lists) will not be displayed. Previously, they were displayed, but the pages were empty.

      1.1.1

      • Files updated: constant-contact-api-widget.php, readme.txt, /admin/options.php
      • Short story: Improved speed.
        Long story: Fixes major potential bug – if you have noticed your site takes a long time to start loading, it may be because the plugin had been trying to access the Constant Contact API for the list values twice per page load. This structure has been totally revamped, and now the Constant Contact API is only accessed once upon changing settings. This release improves load time considerably by storing that information in the WordPress database. Added cc_widget_lists_array option to store Constant Contact lists, so that the API doesn’t need to be called every page load. Now, API is only called when the plugin settings are saved.
      • Wrapped the List Selection Title for the multi-select form element in a label tag, and removed line break.

      1.1.0.1

      • Removed line break (<br />) before widget form to improve display of widget signup form
      • Fixed widget description and title display issues by renaming variables from $title to $widget_title and $description to $widget_description.
      • Converted some settings fields to <textarea> to make editing easier.

      1.1

      • Adds error messages if username & password aren’t properly configured & working
      • Replaced $_SESSION with $GLOBALS for servers with register_globals issues
      • Improved widget error messages
        • Converted widget errors to list items (<LI>s), instead of items separated with <BR /> for better standards compliance
        • Wrapped errors in <LABEL>s so that clicking an error will take users to the input
      • Improved redirection upon widget submission; now properly redirects to the page the user was on, instead of the home page
      • Added filters for more control over widget output:
        • apply_filters(‘constant_contact_form’, $output); to widget output
        • apply_filters(‘constant_contact_form_success’, $success);
        • apply_filters(‘constant_contact_form_description’, $description);
        • apply_filters(‘constant_contact_form_errors’, $errors);
        • apply_filters(‘constant_contact_form_submit’, $submit_button);

      1.0.10

      • This release fixes a problem with 1and1 servers

      1.0.7

      • Problem with files in last release

      1.0.6

      • No code changes have been made in this release

      1.0.5

      • Fixed a bug relating to chunked http encoding in class.cc.php