mailchimp popup form not showing up

I have created a popup form in my mailchimp account and I cannot get it to show up on my site. The code generated is

<script type="text/javascript" src="s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"xxxx-xxxxx.com","uuid":"xxxxxxxxxxx","lid":"xxxxxxxx"}) })</script>

I tried adding it to header.php, footer.php in wordpress but it doesn’t work.

Related posts

Leave a Reply

4 comments

  1. It might be that you yourself are already subscribed. Here’s JS that can delete the cookie that marks that:

    document.cookie = "MCPopupClosed=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
    document.cookie = "MCPopupSubscribed=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/";
    
  2. I believe mailchimp uses cookies to display the popup only once, so once you see it once on your site, it won’t display again unless you delete your cookies. Not sure if there is a setting to change this or not.

  3. it could be conflict with existing jquery.

    the embed.js will auto search for jquery.js at the web root directory.
    just place the file there and it should works.

    if you do not want to mess up your web root by creating another duplicate jquery js file, you can use htaccess to map it to your existing path.

    RewriteEngine on
    Options +FollowSymLinks
    RewriteRule ^/?jquery.js$ /themes/inspinia/vendors/jquery/jquery-2.1.1.js [L]

    or, visit this page for more detail:
    https://www.organicweb.com.au/19561/wordpress/mailchimp-popup-instructions/