New: Google AdSense Ad Code For Responsive Design, A/B Testing & More

With the latest update to the “Modifying Ad Code,” Google now allows publishers to make some changes to their AdSense ad code. Google has provided code snippets to help publishers implement the following techniques with their ads: Responsive design: Create a single webpage that will adapt to the device on which it’s being viewed –  however, […]

Table of Contents

    Spy on Any Website

    Get traffic data and keyword intel on competitors instantly.

    google-adsense-logoWith the latest update to the “Modifying Ad Code,” Google now allows publishers to make some changes to their AdSense ad code.

    Google has provided code snippets to help publishers implement the following techniques with their ads:

    • Responsive design: Create a single webpage that will adapt to the device on which it’s being viewed –  however, the code snippet will not accommodate screen orientation changes
    • A/B testing: Run a test by creating multiple versions of a page, and compare user behavior to see which page is the most effective
    • Setting custom channels dynamically: Track performance of segments of users, sections of your site, or other behavior to maximize ad and user experience
    • Ad tag minification: Enable your site pages to load faster by reducing the amount of data to be transferred

    The code snippets are available here.


    Contributing authors are invited to create content for MarTech and are chosen for their expertise and contribution to the martech community. Our contributors work under the oversight of the editorial staff and contributions are checked for quality and relevance to our readers. MarTech is owned by Semrush. Contributor was not asked to make any direct or indirect mentions of Semrush. The opinions they express are their own.

    Ginny Marvin was formerly Third Door Media’s Editor-in-Chief, running the day-to-day editorial operations across all publications and overseeing paid media coverage. Ginny Marvin wrote about paid digital advertising and analytics news and trends for Search Engine Land, Marketing Land and MarTech Today. With more than 15 years of marketing experience, Ginny has held both in-house and agency management positions. She can be found on Twitter as @ginnymarvin.

    View Author Profile