...
If the page contains a mixed setup of Snigel and GPT ads, it is important to declare the ad tags that are used in the current page, and by which technology they are auctioned. If ad tags are not properly declared, only default ad units will be auctioned, and GPT units might be missing. This will lead to false or missing ad impressions, negatively affecting page performance and user experience.
You can declare ad units using the snigelPubConf element. GPT ad-units are defined using googletag.defineSlot.
The following example assumes that a page fills a Top Leaderboard through Snigel and a Sidebar through GPT. Create the following tags in the <head>
element of the page:
...
Code Block |
---|
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>COPYscript> |
Only this declaration of code is needed:
Code Block |
---|
<!-- AdEngine Top Leaderboard --> <div id="adngin-topleaderboard-0"></div> <!-- AdSense Sidebar --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-1234567890123456" data-ad-slot="1234567890"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>COPYscript> |
Note:
Although AdEngine loads automatically AdSense, this step should be skipped for very specific setups, like the automatic one when there are no body tags. And you should consult your account manager to review the setup and to update the AdEngine configuration if needed.
...
Code Block |
---|
<!-- load adSense --> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567891234567"></script> <script> // globally pause AdSense delivery (adsbygoogle=window.adsbygoogle||[]).pauseAdRequests=1; </script>COPYscript> |
GPT
There is no difference between AdEngine and GPT div elements. They are declared the same way. For each div element name, provided by your account manager, create tags like in the example:
Code Block |
---|
<!-- AdEngine Top Leaderboard --> <div id="adngin-topleaderboard-0"></div> <!-- GPT Sidebar --> <div id="div-sidebar"></div>COPYdiv> |
Testing on a staging page
...
Code Block |
---|
<script data-cfasync="false" async src="https://staging-cdn.snigelweb.com/adengine/**site.domain**/loader.js" type="text/javascript"></script>COPYscript> |
Snigel is using the staging version of AdEngine to deliver previews of new features and enhancements before they are available on production. This way it is possible to test new features in a safe way.
...