Forum Moderators: martinibuster

Message Too Old, No Replies

Is there any way to place sample Adsense code to test new website?

         

born2run

12:33 pm on Mar 23, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi so I'm getting a new website built, and the layout is totally different.

I was wondering if there is any way to place dummy Adsense code to test the ads sizes and page layout, features before using actual Adsense code with publisher id etc?

I would appreciate any tips regarding this question. Thanks!

engine

12:40 pm on Mar 23, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I used to use in the adsense code

google_adtest=‘on’;

I haven't needed to use it for a very long time, so someone else might have a more up-to-date alternative.

[edited by: engine at 12:41 pm (utc) on Mar 23, 2022]

not2easy

2:06 pm on Mar 23, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If the site is already approved that might work, but if AdSense has not approved that site, you could use typical ad sized blank (maybe grey?) rectangles where you expect to serve ads. Or- visit an existing page where you have ads, take a screen grab of the ad (and surrounding whitespace) and post those to your new dev pages where you expect to display ads.

born2run

4:31 pm on Mar 23, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes I like this option better: google_adtest=‘on’;

Has anyone else here used this code option? I might contact Adsense support I guess.

NickMNS

5:00 pm on Mar 23, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have been unable to find any official document that suggest that it is actually supported, (read: it doesn't seem to do anything). Also from what I've seen, the attribute name should be data_adtest and not google_adtest. But again, I have my doubts, but if anyone can provide some documentation that would be great.

engine

5:10 pm on Mar 23, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



@NickMNS
Ad test is on this document [support.google.com...]

NickMNS

5:23 pm on Mar 23, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@engine Awesome. So this is what the parameter does:
When the adtest parameter has a value of 'on', Google treats the request as a test and does not count the ad impressions or track the clickthrough results.


It does not show ads. In other words you will still need to implement the ad code on the page as would normally to make the ads appear.

born2run

6:04 pm on Mar 25, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Nick are you sure this option doesn’t show ads?

NickMNS

7:22 pm on Mar 25, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Nick are you sure this option doesn’t show ads?

To be clear, the option will not aid in showing ads, all it does is let Adsense know that the impressions and clicks are "not valid due to testing and thus should not be counted". At least that is my interpretation of the documentation, specifically what was quoted above.

If the site being tested using the localhost the "adtest on" attribute wont help the show ads.

born2run

3:44 pm on Mar 26, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No the site being tested is "online" now, not localhost. I understand localhost won't show adsense ads. I guess I'll test things.

engine

8:52 am on Mar 27, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Just to clarify, to test the site you have to use your AdSense code as normal to display the ads, but adding the code I indicated "Google treats the request as a test and does not count the ad impressions or track the clickthrough results."