New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google AdSense support #404

Closed
gyandeeps opened this Issue Jul 24, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@gyandeeps

gyandeeps commented Jul 24, 2016

First, Thanks for the great web template. 馃憤

Based on the 3.3.3 release, I have been using this template on my website here
I can see the _config.yml file has a spot for google ad id information here but its not getting used any where.

Am i missing something here or is this functionality not available?

@gyandeeps gyandeeps changed the title from Google ad support to Google AdSense support Jul 24, 2016

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jul 24, 2016

Owner

Nope you're not missing anything. Those were just placeholders that I didn't end up using and forgot to remove. Adsense works just fine without it. Simply copy/paste the script code Google gives you into a layout or include where you want it to appear.

For the theme's demo site I dropped it in right above the footer if you want to see a live example.

Owner

mmistakes commented Jul 24, 2016

Nope you're not missing anything. Those were just placeholders that I didn't end up using and forgot to remove. Adsense works just fine without it. Simply copy/paste the script code Google gives you into a layout or include where you want it to appear.

For the theme's demo site I dropped it in right above the footer if you want to see a live example.

@gyandeeps

This comment has been minimized.

Show comment
Hide comment
@gyandeeps

gyandeeps Jul 26, 2016

In the previous version, it used to put the ads for you. Do you think its should do it now also?

gyandeeps commented Jul 26, 2016

In the previous version, it used to put the ads for you. Do you think its should do it now also?

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Jul 26, 2016

Owner

With this newer version there are custom head and footer includes so you can copy/paste in AdSense scripts (and other things).

I found that's more flexible. Simply take the script Google gives you after setting up your ad unit and paste it into footer/custom.html, in default.html layout (as I've done with the demo site), or anywhere else you'd prefer ads to appear.

If you check out the demo site (gh-pages branch) you can see how I handled it, using the responsive ad unit. These tend to work better with the theme since they adapt to various screen sizes (mobile, tablet, etc.) without overflowing the parent container.

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <div align="center" style="margin: 1em 0;">
    <ins class="adsbygoogle"
         style="display:block; border-bottom: initial;"
         data-ad-client="ca-pub-7328585512091257"
         data-ad-slot="3049671934"
         data-ad-format="auto"></ins>
    </div>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
Owner

mmistakes commented Jul 26, 2016

With this newer version there are custom head and footer includes so you can copy/paste in AdSense scripts (and other things).

I found that's more flexible. Simply take the script Google gives you after setting up your ad unit and paste it into footer/custom.html, in default.html layout (as I've done with the demo site), or anywhere else you'd prefer ads to appear.

If you check out the demo site (gh-pages branch) you can see how I handled it, using the responsive ad unit. These tend to work better with the theme since they adapt to various screen sizes (mobile, tablet, etc.) without overflowing the parent container.

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <div align="center" style="margin: 1em 0;">
    <ins class="adsbygoogle"
         style="display:block; border-bottom: initial;"
         data-ad-client="ca-pub-7328585512091257"
         data-ad-slot="3049671934"
         data-ad-format="auto"></ins>
    </div>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

@mmistakes mmistakes closed this Aug 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment