vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Help with AdSense Advertising Code (https://vborg.vbsupport.ru/showthread.php?t=326761)

alfuzzy 10-03-2018 11:25 AM

Help with AdSense Advertising Code
 
Hello folks. My website is currently using AdSense Ad Units. Previously I was using AdSense Auto Ads...and thought I would give Ad Units a try. I'm finding that fill rate & revenue are not as good with Ad Units as with Auto Ads...so I'd like to return to using Auto-Ads.

Currently I have banner ads & sidebar ads.

What I could use some help with is...could some kind person or persons help me with modifying the AdSense code so I can copy and paste it into each of the banner ad & sidebar ad slots?

I should also mention that I'm entering the code directly into the vBulletin ad templates...and not using the vBulletin Ad Manager. I've found the vBulletin Ad Manager (vBulletin 4.2.5) to be a bit flaky & inconsistent...and find entering the ad code directly the the ad templates more reliable.

Here's an example of my AdSense auto ad code for banner ads:

<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>

What code needs to be added to this so that I can copy & paste it directly into the vBulletin ad templates?


Here's an example of my sidebar ad code:

<div class="sponsor">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Sidebar 1 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxx"
data-ad-format="rectangle"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>

How does this sidebar ad code need to be modified so that AdSense Auto Ads will run instead of Ad Units?

Thanks very much.:)

p.s. FYI. Website running vBulletin 4.2.5.

RichieBoy67 10-03-2018 12:31 PM

I have never used auto ads in Vbulletin but I do not think you should need to modify that code at all. Why? It is not working?

alfuzzy 10-03-2018 02:10 PM

When copy & pasting the auto ad code (example 1) directly into the vBulletin ad templates...some code needs to be added to get it to work.

If the vBulletin Ad Manager worked properly (which it doesn't)...then yes...the code from example 1 is all that's needed (vBulletin ad manager does the rest). But since I'm not using the Ad Manager (inserting code directly into the ad templates)...it the "does the rest" part is what I need.

In example 2 (sidebar ad code). Some of the Ad Unit code needs to be removed...and the code from example 1 inserted.

I've tried some trial & error with both examples...but I'm not quite getting it right. That's why I posted for some help.:)

Thanks

CharlieDelta 10-04-2018 11:58 PM

I am not using Auto Ads but from what I understand you can use auto ads with ad units. You just place the auto ad code and Google looks after placing auto ads. So shouldn't you be able to just ad the auto code to the header or headinclude template?

RichieBoy67 10-05-2018 11:47 AM

Quote:

Originally Posted by CharlieDelta (Post 2596628)
I am not using Auto Ads but from what I understand you can use auto ads with ad units. You just place the auto ad code and Google looks after placing auto ads. So shouldn't you be able to just ad the auto code to the header or headinclude template?

Exactly.

alfuzzy 10-05-2018 06:59 PM

I've worked with a developer in the past...and while adding the AdSense Auto-Ads code into the headinclude template can get some ads to fill with Auto Ads...when you have ads located in all sorts of locations on the site...better to work with each individual vBulletin ad template...and add the ad code to each template...not just the headinclude template.

scottkoz20 10-10-2018 09:00 PM

Quote:

Originally Posted by CharlieDelta (Post 2596628)
I am not using Auto Ads but from what I understand you can use auto ads with ad units. You just place the auto ad code and Google looks after placing auto ads. So shouldn't you be able to just ad the auto code to the header or headinclude template?

this is how it worked on my site, found that it was good at some levels, but miserable in other levels... I pulled it out. I like to know where the ads are going to be on the site.

DNN 02-07-2022 11:35 PM

Quote:

Originally Posted by RichieBoy67 (Post 2596576)
I have never used auto ads in Vbulletin but I do not think you should need to modify that code at all. Why? It is not working?

I'm looking for an add on that'll let adsense show in every forun post in the center of the forum posts

snakes1100 02-12-2022 02:05 PM

Quote:

Originally Posted by DNN (Post 2608153)
I'm looking for an add on that'll let adsense show in every forun post in the center of the forum posts

You do NOT want that many ads on 1 single page, google will ding you for it.

Just use the standard ad placements in a post to avoid google dinging you for to many ads on a page.

Besides, that would make me not visit a forum if an ad was in every post.


All times are GMT. The time now is 07:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00996 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete