Title: Reference Error: mc4wp is not defined
Last modified: May 11, 2020

---

# Reference Error: mc4wp is not defined

 *  Resolved [benulcoq](https://wordpress.org/support/users/benulcoq/)
 * (@benulcoq)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/reference-error-mc4wp-is-not-defined/)
 * Hi,
 * I’m trying to customise the mc4wp response behaviour by making use of MC4WP’s
   built in events as outlined here:
    [https://www.mc4wp.com/kb/javascript-form-events/](https://www.mc4wp.com/kb/javascript-form-events/)
 * The form is being placed in a Boxzilla (Ver. 3.2.22) box that appears on every
   page.
 * I’m placing the script directly in the form editor after the form fields as
    
   the events page suggests and I’m getting a reference error where mc4wp is not
   defined. `Uncaught ReferenceError: mc4wp is not defined'`
 * Site: ozhomenews.com.au
    WP Version: 5.4.1 PHP Version: 7.3.16 MC4WP Version:
   4.7.7
 * Any help is greatly appreciated!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Freference-error-mc4wp-is-not-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/reference-error-mc4wp-is-not-defined/#post-12814467)
 * Could you move the code to the footer or wrap it in something like
 * document.addEventListener(“DOMContentLoaded”, function(event) {
    //do work });
 * to be sure the MailChimp for Worpress scripts are loaded before your code is 
   executed?
 * Hope that helps. If you have any questions, please let me know!

Viewing 1 replies (of 1 total)

The topic ‘Reference Error: mc4wp is not defined’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Lap](https://wordpress.org/support/users/lapzor/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/reference-error-mc4wp-is-not-defined/#post-12814467)
 * Status: resolved