【问题标题】:Wordpress MailChimp using button click instead of pop-up failing with 404 errorWordpress MailChimp 使用按钮单击而不是弹出窗口失败并出现 404 错误
【发布时间】:2018-03-05 02:17:47
【问题描述】:

我以前从未使用过 MailChimp Easy Forms。我试图在用户按下按钮而不是弹出窗口时显示弹出窗口,以显示用户何时访问网站。

我的js代码:

<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>
    function showMailingPopUp() {
        alert('inside the button click');

        require(["mojo/signup-forms/Loader"], function (L) {
            L.start({
                "baseUrl": "mc.us1.list-manage.com", "uuid": "81016de6debaf524b31df317af5480b1-us17",
                "lid": "8517f84634"
            })
        })
        document.cookie = "MCEvilPopupClosed=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
    }
</script>

还有 HTML:

 <button id="open-popup" onclick ="showMailingPopUp();">Email signing</button>

在检查工具中我得到这个错误:

这就是它在 MailChimp 中的样子:

目前我使用 MailChimp 中的 listid 作为“lid”,我的 API 密钥作为“uuid”,我认为是 uuid 中断了,但 uuid 是什么?如果不是id错了,那又是什么?

提前致谢:-)

【问题讨论】:

    标签: wordpress mailchimp


    【解决方案1】:

    为 MailChimp WordPress 插件安装 Easy Forms 并设置 mailchimp API 密钥,它将获取您的所有列表,现在创建新表单并为其分配列表,然后保存一个将生成的短代码。

    现在使用 jquery 打开一个弹出窗口并在内容中粘贴短代码,然后它就可以工作了。 https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/

    【讨论】:

    • 我已经为 MailChimp 安装了 Easy Forms。表单分配有邮件芯片 API 密钥。我不确定您对短代码的意思是什么?你有一个可行的例子吗?
    • 请找到以下链接:connect.mailchimp.com/integrations/…
    • 我找到了链接,但我需要它做什么? MailChimp 的简易表格已启动并正在运行。当用户按下我网站上的按钮时,我需要弹出表单:-S
    • 是的,只要按照屏幕截图,您就会找到表单简码并使用简码。
    • 但我希望该按钮成为我的 wordpress 主题中 header.php 文件中的硬编码按钮?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-19
    • 2023-04-09
    相关资源
    最近更新 更多