Mail Chimp Popup Code
-
I’ve add a mail chimp pop up code to my site but your plugin setting “Also aggregate inline JS?” breaks the code. I believe i need to exclude the code from optimizing. Can someone help? My website is http://www.stlouisdj.com and here is the code:
<script>
// Fill in your MailChimp popup settings below.
// These can be found in the original popup script from MailChimp.
var mailchimpConfig = {
baseUrl: ‘mc.us9.list-manage.com’,
uuid: ‘768905a4851178f5dcdb5419d’,
lid: ‘209362e952’
};// No edits below this line are required
var chimpPopupLoader = document.createElement(“script”);
chimpPopupLoader.src = ‘//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js’;
chimpPopupLoader.setAttribute(‘data-dojo-config’, ‘usePlainJson: true, isDebug: false’);var chimpPopup = document.createElement(“script”);
chimpPopup.appendChild(document.createTextNode(‘require([“mojo/signup-forms/Loader”], function (L) { L.start({“baseUrl”: “‘ + mailchimpConfig.baseUrl + ‘”, “uuid”: “‘ + mailchimpConfig.uuid + ‘”, “lid”: “‘ + mailchimpConfig.lid + ‘”})});’));jQuery(function ($) {
document.body.appendChild(chimpPopupLoader);$(window).load(function () {
document.body.appendChild(chimpPopup);
});});
</script>
The topic ‘Mail Chimp Popup Code’ is closed to new replies.