Hi @kostyatereshchuk
Thanks for reaching out. how are you today?
Let me try and explain how OptinMonster works before we come to the optimization part.
OptinMonster’s script loads asynchronously, which is after the page content.
Because of this, it does not affect the perceived load time of your site for visitors.
Adding any script to your site will increase the page size and load time, regardless of what script you are adding to your site. Loading our script asynchronously allows us to function without disrupting the overall experience of your site traffic.
Since our script doesn’t load into the page until after the page content has finished it will be detected as contributing to large contentful paint by page speed tools. Campaigns are not available to appear on the page until after the page content and our script have finished loading.
If you have a time delay set on campaigns then the campaign would not load into the page until that time delay has been met, which will increase the overall load time detected by page speed tools even though the page itself has finished loading much earlier.
We work to keep our script as optimized as possible, and further leverage performance by having it load asynchronously.
Now, in order to optimize, let me explain how our WordPress plugin works.
It works by adding the embed code of the campaign to the website pages. If you have set the display rules in the OptinMonster app (i.e. https://app.optinmonster.com) then the plugin would not know and will add the embed code of that campaign to “ALL” the pages and the campaign will trigger if the rule from the OptinMonster app is true.
It has a very simple fix. If we want to load it on a specific page, then we should use the output settings in the WordPress plugin and set it to load only on that page(or pages), and then the WordPress plugin would only add the script to those pages. Here is how the output settings work: https://optinmonster.com/docs/getting-started-optinmonster-wordpress-checklist/#Configure_Output_Settings
If you have any further questions, kindly reach out to [email protected] and we’d be happy to assist by looking into your website in detail.
Regards,