Are your Amazon CPM Ads not displaying in your WordPress post?
Perhaps you were using Google Adsense without any issues, and recently started experimenting with Amazon CPM Ads. All of the sudden, you’re ads stopped displaying.
Don’t blame Amazon, I’m willing to bet it’s a Plugin issue, more specifically the Autoptimize plugin.
Amazon CPM Ads Not Displaying
I recently had the same exact issue on my WordPress blog.
I’ve been running Google Adsense for years without any problems. About a year ago, I started playing around with Amazon CPM Ads, and had some mixed success. The thing is, I never had a problem with either of these ads displaying on my blog.
When I started taking another look at Amazon CPM Ads, and implemented the code on my site, I was surprised to find my ads stopped working. Neither the Google Adsense Ads or Amazon CPM Ads were displaying on my site.
I immediately thought it was a CDN issue, as I recently implemented Amazon CloudFront on my blog. But after spending a considerable amount of time clearing caches, I was still having the same issue.
My Amazon CPM Ads were not displaying.
Easy Fix For Amazon CPM Ads Not Displaying
In my case, I recently installed the Autoptimize plugin, and that’s what was causing my issue. I discovered this after I stumbled upon a post where the author had to disable that plugin to get their Amazon CPM Ads displaying.
That really wasn’t an option for me, as I liked the performance boost the Autoptimize plugin was giving my blog.
So I had to do some additional research, and eventually found the answer buried in some comments on the author’s blog.
Here’s all you have to do. Wrap the Java Script for the Amazon CPM Ad with a tag that excludes it from being optimized. Just like this:
[Amazon CPM Ad Code Goes Here]
The above code should fix the issue with Amazon CPM Ads not displaying on your blog.
But I’m Not Using Autoptimize
If you’re not running Autoptimize, I’m guessing you have another plugin that’s caching Java Script, or you’ve recently installed a new plugin. Easiest way to trouble shoot that is to start disabling those plugins and check your results.
I tried to wrap the amazon CPM code as you wrote, but it doesn’t work…
Do you have some other tips?
This worked for me! Thanks!
This fix did not work for me, unfortunately. Is there any other solution?
uncheck the also aggregate inline js box… worked for me