Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 872 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 872 Bytes

#Google Publisher Tag

Introduction

In this dummy script you can find an example of googletag implementation. I am using this approach on production, one of the advantages is that i have full control of displaying the ad. Moreover i can easily register an event which gets triggered after my ad was rendered.

Important is that you are disabling initial loading of the ads:

googletag.pubads().disableInitialLoad();

If you use asynchronous execution which i highly recommend, make sure that you are pushing your code into googletag.cmd:

googletag.cmd.push(function() {
    // here comes your code which gets executed after googletag is ready
});

For more information please check out the official api: