Trying to Solve your speed issues with Ezoic

SirLouen

Elite Member
Executive VIP
Jr. VIP
Joined
Jan 17, 2015
Messages
5,264
Reaction score
4,956
Some people have contacted me after this post because they cannot make their WP installations faster with Ezoic if they are using the Ezoic Integrator Plugin instead of loading the full script manually.
And there are many posts in this forum talking about how Ezoic is so slow for WPO reasons:
https://www.blackhatworld.com/seo/need-help-to-solve-the-ezoic-site-speed-trouble.1262534/https://www.blackhatworld.com/seo/help-ezoic-how-to-increase-page-speed.1298171/
So I'm going to try to solve all your issues at once, but be aware that you need a little coding skills to make this possible.

Don't PM me PLEASE.
If you don't know how to do this, or it's not working for you, please write in this message and we will try to solve it (and it will help others in your same situation)

Lets go:

First you must dequeue the scripts that the plugin loads. You can put this in your own plugin or in the functions.php of your child theme:

PHP:
function ezoic_dequeue() {
    wp_dequeue_script('ezoic-integration');
}
add_action('wp_enqueue_scripts','ezoic_dequeue');

After this we need to check if scripts have been removed therefore, there will be thousands of JS errors in the console while Ezoic active.
We can check the HTML to see if this scripts have gone.

If this is working, now we should re-enqueue all scripts. Fortunately, they gave us all the endpoints:
https://g.ezoic.net/wp/endpoints.go
Essentially we have to attach
https://g.ezoic.net

To each endpoint, for example:
https://g.ezoic.net/detroitchicago/mesa.jsAnd enqueue this.

PHP:
function ezoic_requeue() {
    wp_enqueue_script('ezoic_mesa',"https://g.ezoic.net/detroitchicago/mesa.js");
}
add_action('wp_enqueue_scripts','ezoic_requeue');

You can put many enqueue lines for each script.
The thing here is that, for each URL you create, you should be also configuring it in Flying Scripts with a 2 seconds delay at least.

Not sure why, but Ezoic Integrator is not enqueueing right the scripts, this is why we have to re-enqueue them.
This procedure can be greatly improved because I've made it up with what I used to do lately. Maybe we can sort out a better result for the future.
 
I'm currently seeing that they have deprecated the enqueue hooks for this two:

PHP:
$this->loader->add_action( 'plugins_loaded', $plugin_public, 'ez_buffer_start', 0 );
$this->loader->add_action( 'shutdown', $plugin_public, 'ez_buffer_end', 0 );

Which makes things way easier to dequeue. They are now inserting and caching the scripts by hardcoding them instead of enqueuing the the WP style... This is why they are not working well with Flying Scripts.

Simply unload those two actions before enqueuing as I mentioned before:

PHP:
remove_action('plugins_loaded', 'ez_buffer_start');
remove_action('shutdown', 'ez_buffer_end');
 
I understand that this has nothing directly to do with your post. But about two months ago I switched over to Ezoics nameservers to show their ads on 3 of my sites.

They ran great for about 10 days after the switch. After that I started to lose insanely amounts of traffic. I lost about 80 percent of traffic.

First I thought it had something to do with the core update as it was in that same period. But I did some more digging and I saw all the core web vitals were marked as "poor" at exactly the same date the traffic started to drop.

The strange thing was that all my rankings that I was tracking stayed the same. Google just sent less traffic to my sites. So this made it clear it was Ezoic messed up everything.

30 December I ditched Ezoic on all sites and removed their ads. From that moment I started to optimize for all Core Web Vitals and they are passing for everything now. In WMT I started the tests so Google can mark them as fixed, but these texts can take 28 days and some are still ongoing.

As of today the traffic has not returned yet. I think it will eventually but this shit has cost me 1000's of dollars now already.

Do with it what you want but no way I am going to use those guys again. I can't share any screenshots right now because I am on my phone.
 
I understand that this has nothing directly to do with your post. But about two months ago I switched over to Ezoics nameservers to show their ads on 3 of my sites.

Nameservers is the worst method by far for using Ezoic. Cloudflare the second. Best is to integrate their scripts manually, otherwise, through WP Integration plugin by following my steps...
Obviously this is why I opened this thread: Ezoic by itself is really harmful in terms of WPO, and I think they do this on purpose so people must use their Site Speed Accelerator: https://www.ezoic.com/site-speed/
Which obviously sucks, compared to real optimization techniques.
 
Nameservers is the worst method by far for using Ezoic. Cloudflare the second. Best is to integrate their scripts manually, otherwise, through WP Integration plugin by following my steps...
Obviously this is why I opened this thread: Ezoic by itself is really harmful in terms of WPO, and I think they do this on purpose so people must use their Site Speed Accelerator: https://www.ezoic.com/site-speed/
Which obviously sucks, compared to real optimization techniques.

Yes I used their Site Speed Accelerator for a short while as well in the hope that would fix it, but it's not good at all. I just ditched them in whole and achieved good scores with WP Rocket, Shortpixel Adaptive Images and Asset Cleanup Pro.

The downside is that there are no ads shown at all, but I obviously first want to regain my rankings before I can even think of ads again.

The upside is that my sites are blazing fast and optimized for the Core Web Vitals which will become a significant ranking factor soonish.

Here's my score for one of the sites right now:

chrome_2021-01-26_09-14-45.png

Anyways, I won't hijack your thread with this stuff. I hope you can help some people preventing the issues I have now.
 
Yeah Ezoic is a pain, but I use their site speed accelerator... doesn't cost too much, and currently getting a pagespeed score of 97 on mobile & 89 on Desktop, which I don't feel is bad.

I integrated through CloudFlare.

Eventually plan on using the likes of Mediavine when traffic is high enough, seems less intrusive.
 
Thank You! This is what I was waiting for.
 
So i copy pasted a dequeue functions into functions.php and the srcripts are stil loading no errors.
 
So i copy pasted a dequeue functions into functions.php and the srcripts are stil loading no errors.

The ez_buffer_start and ez_buffer_end ones? (check the second post)

and currently getting a pagespeed score of 97 on mobile

This is really good. It's strange that you get that value (89) on desktop while 97 on mobile. Are you sure it's not the other side around?
 
The ez_buffer_start and ez_buffer_end ones? (check the second post)



This is really good. It's strange that you get that value (89) on desktop while 97 on mobile. Are you sure it's not the other side around?
Yes
 
Any idea on what I'm doing wrong? I did exactly what you wrote.
 
Any idea on what I'm doing wrong? I did exactly what you wrote.

I think I must test a little bit more and rewrite some code to load this two functions through the wp_filter global...
In fact, I'm not 100% sure what is the point of the Ezoic Integrator if you dismiss this two functions. You essentially destroy the whole plugin, doesn't do much apart from parsing the endpoints.
 
Is there any guide on how to integrate ads scripts manually?
 
Anything changed? Is this method working on your site?
 
I'm going to check it further. Have you tested what @Mxty commented?
 
Any updates on method? It is not working.

I've started developing a WP plugin to make some improvements in page speed both including some issues regarding Web Vitals (specially oriented to LCP and CPCSS) and then I will put hands on deferring this kind of scripts more thoroughly.

It's being a little abrupt but let's see how it goes, I will keep you informed.
 
Nope, I commented some months ago, I removed Ezoic because they were overcomplicating things on their end. I know they were doing some improvemens on their own side and plugin but not sure if they have been able to improve to the point of delivering higher load speeds.
 
Nope, I commented some months ago, I removed Ezoic because they were overcomplicating things on their end. I know they were doing some improvemens on their own side and plugin but not sure if they have been able to improve to the point of delivering higher load speeds.
Unfortunately, they haven't.

What did you replace Ezoic with?
 
Back
Top