1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to place Adsense?

Discussion in 'XenForo Questions and Support' started by TFroehlichIII, Sep 11, 2014.

  1. TFroehlichIII

    TFroehlichIII Member

    Hello everyone,
    I am having an issue placing google adsense within the forum. Once I place the ad code, it will not show up..

    My code is as follows, please let me know if I am doing something wrong.

    <xen:hook name="ad_message_below" />
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <!-- test ad -->
    <ins class="adsbygoogle"
    (adsbygoogle = window.adsbygoogle || []).push({});

    Please let me know what I need to do in order for this to work.

    Thank you
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. TFroehlichIII

    TFroehlichIII Member

    Can you better explain the first two lines of code other than the already generated code within the window?

    "<xen:if is="!{$visitor.user_id}">
    <xen:if is="{$stickyThreads}">


    I know that the </> is the end of the code, but I'm not sure what the first two if statements represent. Is it who sees the ads and the second where the ad will be placed? If so, how do I know all the names of the slots where ads can be placed?

    Thank you!

    P.S.- Is there an ad-on that will do this for me? If so can you reply with a link?

Share This Page