Site logo

Archived topic

Insert Mailchimp Code on Hook: 'Uh oh, we couldn't connect your site' Error

5 replies · Started by Josh on September 10, 2018

Viewing posts 1–6 of 6

I'm trying to connect my site to Mailchimp, and get my popup form to display.

- 'Connect site' in Mailchimp
- Copy the script they give
- Create GP Element, paste script in wp_footer, display condition 'Entire Site'

The popup does not load. Returning to the Mailchimp dashboard shows the error:

'Uh oh, we couldn't connect your site. Check your code and try again.'

I also tried this in wp_head, as well as both wp_head and wp_footer in Legacy Hooks. Thanks!

Hi there,

What code are you adding?

Did MC provide any instructions on how to add the code?

By default Mailchimp says to insert the code before the closing </head> tag on the page where you want the popup to appear. On another posts here on the forum Tom said to insert the script in the wp_footer GP hook.

I also tried editing a page in the WP editor (not Elementor) and inserting the code in the Text tab. The popup appeared but it blocked all of the Elementor styles from displaying on the page.

Here's the script:

~~~<script id="mcjs">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://chimpstatic.com/mcjs-connected/js/users/585579a287152edbb145986db/056fa09a3a547190878475e05.js");</script>
~~~

At the moment I have it hooked into wp_footer using a Hook element.

Hmm wp_footer should work for this code.

Have you checked with their support on this specific error?

Thanks Leo - I used Hellobar to create the popup and routed it to my Mailchimp list instead, seems to be working fine.

No problem :)

This archived topic is closed to new replies.