最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - mailchimp popup form not showing up - Stack Overflow

programmeradmin4浏览0评论

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/downloads.mailchimp/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","uuid":"xxxxxxxxxxx","lid":"xxxxxxxx"}) })</script>

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

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.

Share Improve this question edited May 11, 2015 at 10:52 maddy asked May 11, 2015 at 10:33 maddymaddy 1211 gold badge1 silver badge10 bronze badges
Add a comment  | 

4 Answers 4

Reset to default 11

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=/";

Your issue is probably that the correct jquery version is not being called. I believe you need a minimum of 1.4.4 and you may find if you have a look at the link below it is a problem with how the pop up is looking for the jquery.js file:

https://www.organicweb.com.au/19561/wordpress/mailchimp-popup-instructions/

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.

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/

发布评论

评论列表(0)

  1. 暂无评论