Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2018, 11:25 AM
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 10-03-2018, 12:31 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 10-03-2018, 02:10 PM
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 10-04-2018, 11:58 PM
CharlieDelta CharlieDelta is offline
 
Join Date: Apr 2010
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Благодарность от:
scottkoz20
  #5  
Old 10-05-2018, 11:47 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CharlieDelta View Post
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.
Reply With Quote
  #6  
Old 10-05-2018, 06:59 PM
alfuzzy alfuzzy is offline
 
Join Date: Jul 2018
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 10-10-2018, 09:00 PM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CharlieDelta View Post
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.
Reply With Quote
  #8  
Old 02-07-2022, 11:35 PM
DNN DNN is offline
 
Join Date: Mar 2011
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RichieBoy67 View Post
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
Reply With Quote
  #9  
Old 02-12-2022, 02:05 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DNN View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04842 seconds
  • Memory Usage 2,250KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (1)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete