Page-level ads by Google AdSense

imthebest

Well-known member
Today the following appeared on my AdSense account:

as1.webp

as2.webp

I believe that the "Vignette ads" might perform very well, however I'm yet a bit cautious about enabling it.

What do you guys think?

Thanks,
Super120
 
How do you implement these on forum?

I would like to add those too. Google sais, you have to place the code into each header of each page you want it to display. See the video for this:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

I am sure there is for XF an easier way to place that code :)

Does anybody know where to add the code?
 
Put it into template Page_Container

where exactly?

Code:
<!DOCTYPE html>

<xen:set var="$isResponsive" value="{xen:if '@enableResponsive AND !{$noResponsive}', 1, 0}" />
<xen:set var="$uix_sidebarInline" value="{xen:if '{$sidebar} AND !(@uix_offCanvasSidebarRight == 4) AND !(@uix_offCanvasSidebarLeft == 4)', 1, 0}" />

<xen:include template="uix_pageContainerLogic" />
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public NoJs {xen:if @uix_javascriptInitHide, 'uix_javascriptNeedsInit'} {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive} {xen:if $pageIsRtl, pageIsRtl, pageIsLtr} {xen:if $hasWelcomeBlock, 'hasWelcomeBlock'} {xen:if '@uix_navStyle == 1', 'hasNavAtTop'} {xen:if '{$uix_tabLinksBar}', 'hasTabLinks', 'not_hasTabLinks'} {xen:if '@uix_beta', 'uix_betaMode'} {xen:if '{$canSearch}', 'hasSearch', 'not_hasSearch'} {xen:if '@uix_navStyle == 2', 'activeSmallLogo'} {xen:if '{$uix_disableNodeGrid} && @uix_nodeStyle == "3"', 'uix_nodeGridDisabled'} {xen:if '@uix_collapsibleSidebar && ({$visitor.uix_sidebar} > {$uix_currentTimestamp})', 'is-sidebarCollapsed', 'is-sidebarOpen'} {xen:if $uix_sidebarLocation, 'hasLeftSidebar', 'hasRightSidebar'} {xen:if $uix_widthToggleState, 'is-fullWidth', 'is-setWidth'} navStyle_@uix_navStyle pageStyle_@uix_pageStyle hasFlexbox" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>

<xen:hook name="page_container_head">
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <xen:if is="{$isResponsive}">
        <meta name="viewport" content="width=device-width, initial-scale=1" />
    </xen:if>
    <xen:if is="{$requestPaths.fullBasePath}">
        <base href="{$requestPaths.fullBasePath}" />
        <script><xen:comment>/* Chrome bug and for Google cache */</xen:comment>
            var _b = document.getElementsByTagName('base')[0], _bH = "{xen:jsescape $requestPaths.fullBasePath}";
            if (_b && _b.href != _bH) _b.href = _bH;
        </script>
    </xen:if>

    <title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>

    <noscript><style>.JsOnly, .jsOnly { display: none !important; }</style></noscript>
    <link rel="stylesheet" href="css.php?css=xenforo,form,public&amp;style={xen:urlencode $_styleId}&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />

    <!--XenForo_Require:CSS-->

    <link rel="stylesheet" href="css.php?css=uix<xen:if is="@uix_cssTemplate">,@uix_cssTemplate</xen:if>&amp;style={xen:urlencode $_styleId}&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />

    <xen:include template="uix_user_styling" />

    <link rel="stylesheet" href="css.php?css=EXTRA&amp;style={xen:urlencode $_styleId}&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />

    <xen:if is="{$uix_hidePageNodeContainer}">
    <style>#pageNodeContent .bottomContent {display: none;}#pageNodeContent {padding: 0;}</style>
    </xen:if>

    <xen:if is="@uix_node_styling"><xen:include template="uix_node_styling" /></xen:if>

    {xen:helper ignoredCss, {$visitor.ignoredUsers}}

    <xen:if is="{$uix_adStyler_enabled}">
        <link rel="stylesheet" href="{$javaScriptSource}/audentio/ad_styler/2.1/stylesheets/colpick.css" />
        <link rel="stylesheet" href="{$javaScriptSource}/audentio/ad_styler/2.1/stylesheets/styleit.css" />
    </xen:if>

    <xen:include template="google_analytics" />
    <xen:include template="page_container_js_head" />

    <xen:if is="{$xenOptions.uix_favicon}"><link href="{$xenOptions.uix_favicon}" rel="icon" type="image/x-icon" /></xen:if>
    <link rel="apple-touch-icon" href="{xen:helper fullurl, @ogLogoPath, 1}" />
    <link rel="alternate" type="application/rss+xml" title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}" href="{xen:link forums/-/index.rss}" />
    <xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 200}" /></xen:if>
    <xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
</xen:hook>

<xen:if is="{$uix_adStyler_enabled}">
    <script src="{$javaScriptSource}/audentio/ad_styler/2.1/javascripts/colpick.js?_v={$xenOptions.jsVersion}"></script>
    <script src="{$javaScriptSource}/audentio/ad_styler/2.1/javascripts/bucket.js?_v={$xenOptions.jsVersion}"></script>
    <script src="{$javaScriptSource}/audentio/ad_styler/2.1/javascripts/styleit.js?_v={$xenOptions.jsVersion}"></script>
</xen:if>

    <xen:if is="@uix_browserThemeColor">
        <meta name="theme-color" content="@uix_browserThemeColor">
        <meta name="msapplication-TileColor" content="@uix_browserThemeColor">
    </xen:if>

</head>

<body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>

    <xen:if is="{$uix_adStyler_enabled}">
        <script>
            styleit_skin_name = "{xen:property 'uix_adStylerPresetGroup'}_{$visitor.style_id}";
            styleit_id = "@uix_adStyler_id";
            styleit_var = {};

            @uix_adStyler_vars

            styleit_var['boardPath'] = "{$xenOptions.boardUrl}";
            styleit_var['ImgPath'] = '{$javaScriptSource}/audentio/ad_styler/2.1/images';
            styleit_var['gFontsPath'] = "//fonts.googleapis.com";
            si_restored = false; styleit_store = _bucket('si-'+styleit_skin_name);

            var
                head = document.getElementsByTagName('head')[0];
                siStyleTag = document.createElement('style');
                siStyleTag.type = "text/css";
                siStyleTag.id = "si-style",
                savedStyle = styleit_store.get('style'),
                styledata = styleit_store.get('styledata');

            if ( savedStyle ) {
                if (siStyleTag.styleSheet) { siStyleTag.styleSheet.cssText = savedStyle }
                else { siStyleTag.appendChild(document.createTextNode(savedStyle)) }
                head.appendChild(siStyleTag);
                si_restored = true;

                for (var elm in styledata) {
                    for (var prop in styledata[elm]) {
                        if (prop == "_fonturl") {
                            var
                            fontTag = document.createElement('link');
                            fontTag.href = styledata[elm][prop];
                            fontTag.type = "text/css";
                            fontTag.rel = "stylesheet";
                            head.appendChild(fontTag);
                        }
                    }
                }
            }
        </script>
    </xen:if>

    <xen:if is="!{$visitor.user_id} && !{$hideLoginBar}" >
        <xen:include template="login_bar" />
    </xen:if>

    <xen:if is="@uix_offCanvasSidebarLeft > 0 || @uix_offCanvasSidebarRight > 0">
        <xen:comment> tbro - remove off-canvas-wrapper </xen:comment>
        <div class="js-uix_panels uix_panels {xen:if '@uix_offCanvasSidebarLeftStatic || @uix_offCanvasSidebarRightStatic', 'needsInit'}">
            <xen:if is="@uix_offCanvasSidebarLeft > 0 AND ((@uix_offCanvasSidebarLeft != 4) OR {$sidebar})">
                <xen:include template="uix_offCanvasSidebarLeft" />
            </xen:if>
            <xen:if is="@uix_offCanvasSidebarRight > 0 AND ((@uix_offCanvasSidebarRight != 4) OR {$sidebar})">
                <xen:include template="uix_offCanvasSidebarRight" />
            </xen:if>

            <div class="mainPanelWrapper">
                <a href="#" class="js-panelMask uix_panelMask"></a>

    </xen:if>

    <xen:hook name="body">

<div class="uix_wrapperFix" style="height: 1px; margin-bottom: -1px;"></div>
<xen:if is="@uix_pageStyle == 2"><div class="pageWidth pageWidth--outerMost"></xen:if>
<div id="uix_wrapper">
<div class="uix_wrapperFix" style="height: 1px; margin-bottom: -1px;"></div>

<div id="headerMover">
    <div id="headerProxy"></div>
<header>
    <xen:include template="header" />
    <xen:edithint template="navigation" />
    <xen:edithint template="search_bar" />
</header>

<div id="content" class="{$contentTemplate}">
    <xen:if is="!{$uix_hidePageContent}">
    <div class="pageWidth">
        <div class="pageContent">
    </xen:if>
            <!-- main content area -->

            <xen:hook name="page_container_content_top" />

            <xen:include template="ad_above_top_breadcrumb" />

            <xen:hook name="page_container_breadcrumb_top">
            <xen:if is="{$hasBreadBoxTop}">
            <div class="breadBoxTop <xen:if is="{$topctrl}">{xen:if '!@uix_moveTopCtrl', 'withTopCtrl'}</xen:if> {xen:if '{$canSearch} && {$uix_searchPosition} == 4', 'withSearch'}">
                <xen:if is="{$topctrl}"><xen:if is="!@uix_moveTopCtrl"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if></xen:if>
                <xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                <xen:if is="{$canSearch} && {$uix_searchPosition} == 4">
                    <xen:include template="uix_searchMinimal" />
                </xen:if>
            </div>
            </xen:if>
            </xen:hook>

            <xen:include template="ad_below_top_breadcrumb" />

.......
 
Just before </head>

Code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-xxxxxxxxxxxxxxxx",
    enable_page_level_ads: true
  });
</script>

</head>
 
Top Bottom