How to Embed Mailchimp Form to your Website for Better Google Pagespeed Insight Score2 min read

Hey guys! This article is a short and simple article in which I will show you the best way to embed/integrate mailchimp form to your website. A few days back I developed an obsession with Google Pagespeed Insight. Not because I want good SEO but because I like perfection. I had to Embed Mailchimp form in order to get the best score from my side. It was a ADU in the process. I searched google for the answers but there were no good articles explaining about the best way to integrate mailchimp to the website. So, I started my own tweaks and finally after half hour of experimentation I was able to find a solution.

Best Way to Embed Mailchimp Subscription Form

I’m hoping that you already have a mailchimp account registered and has created a subscription form from their backend. If you do not know how to create a form with mailchimp then read – Create Signup forms with mailchimp, and come back quickly. Once you have created a signup form, you will get a code something similar to,

<script type="text/javascript"

src="//" data-

dojo-config="usePlainJson: true, isDebug: false"></script>

<script type="text/javascript">

require(["mojo/signup-forms/Loader"], function(L) {




You just need to replace the above code with the code below,

<script defer type="text/javascript"
src="//" data-dojo-config="usePlainJson: true, isDebug: false">

<script defer>

function showMailingPopUp() {
console.log("POPUP LOADED")
???require(["mojo/signup-forms/Loader"], function(L) {
???????L.start({"baseUrl":"","uuid":"YOUR_UUID","lid":"YOUR_LID"}) });
setTimeout(function() {
}, 10000);


Note – Replace YOUR_UUID with your actual uuid and YOUR_LID with your actual lid.

You can also edit the number of seconds before ?you want subscription form to load. Try to choose a number which does not feel impromptu or very delayed. Try to load a form somewhere between 5 seconds to 15 seconds. However, these are my personal recommendation. You are free to choose any number based on your strategy. This is all you need to do in order to get a better score in your google pagespeed insights.

If this article helped you then do share and subscribe. Also, if you want to score a perfect 100 in google pagespeed insights then subscribe to BMA and we will send you article directly into your inbox.

And as always,
Be my aficionado 🙂

  • Article By: Varun Shrivastava

  • Varun Shrivastava is an innovative Full Stack Developer at ThoughtWorks with around 4 years of experience in building enterprise software systems in finance and retail domain. Experienced in design, development, and deployment of scalable software. He is a passionate blogger and loves to write about philosophy, programming, tech and relationships. This is his space, you can get in touch with him here anytime you want.