How to Create Responsive Google Ads for Better Optimization?

When you come to customize the website, access is a factor that you can not just get out of your site, just look good and do not work well, as well as with mobile devices Should work, because more than 13% of Internet users can access the Internet through smartphones and tablets. Speaking of mobile devices, you probably have heard of responsive web design.

How to Create Responsive Google Ads
How to Create Responsive Google Ads

Responsive websites are websites that are optimized to be viewed on the screen size range, including mobile and tablet screens. Therefore, no matter what device you are using, it does not matter that your site looks consistent, and can easily be readable on a wide range of mobile devices. And when your site may be responsive, your adsense ads will not be advertising, how can you make your Google advertising accountable?

Why Use Responsive Advertising?

As we said, responsive websites are better optimized, and perform consistently in different platforms. This is achieved by resizable page elements, which is the kind of ‘using feedback’ on the screen, responsive websites are recommended by Google.

When you add AdSense ads to your site, they are not funded by default. This means that they can not resize themselves when viewed on a mobile device, and can extend beyond the view threshold of the screen. Are there. In order to deal with this problem, they should be liable through JavaScript code.

Making Ads Responsive

Responsive ads are dynamic, and are unstable in terms of size. The logic is very simple, you pre-define some ad units (such as 768 × 90, 468 × 60, 300 × 250, and 150 × 150 etc.). And depending on the screen size of the user, the most suitable ad unit is served.

Here’s the JavaScript code to do this job. You can use this code instead of standard code.

// <! [CDATA [

JavaScript “>

google_ad_client = “ca-publisher-id”;

If (window.innerWidth> = 800) {

google_ad_slot = “ad-unit-1”;

google_ad_width = 728;

google_ad_height = 60;

} And if (window.innerWidth //

The only thing you need to change is the value for google_ad_client and google_ad_slot. Change it on your own you can find these values ​​in your default AdSense JavaScript code.

How Does It Work?

In fact it is actually a simple piece of code as you can see, it works with the window. To give an advertisement to underwid Property, this property receives the width of the user’s browser window, and then ad units For example, if the width is less than 400, then the user will be able to send a message of 300 x 250 size Will be served with Iyon.

While there is nothing wrong in making Google Advertising responsive, so be careful that the ad units do not change the size. This is very important, because Google Adsense is very strict about optimizing ad code.

You should only be in default ad sizes And as far as changing of ad units is concerned, the publishers use them with colors and sizes to determine which combination works best, you should be right within the limit, And make your site a lot more powerful and dynamic.

Harvilas Meena

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: