Portal AdSense Template Setup
Setting up the Google ads in Allwebco templates
1.) Create your Google Account
Support for setting up the Google AdSense advertisements (banner and text ads) in Allwebco portal style web templates.
Before you setup Google ads in your webpages, make sure you review the policies at Google AdSense
, or any policies from other ad or affiliate vendors. Allwebco is not affiliated with Google and is not responsible for any violation of these rules as a result of template user's modifications to Portal website template models.
Google AdSense ads for websites are available to anyone. The code is generated in your Google login and is copied and pasted into your HTML webpages. The ads automatically detect the theme or product details on your website by reading the text on your webpages, and will then display ads related to your website.
2a.) AdSense responsive models only:
Check your template "help.html". If it indicates responsive
at the top of the page you have this style of template.
2b.) Portal LT "light" models only:
- Login to your Google AdSense account. Under "My Ads" create a "New ad unit". Choose automatic size "responsive".
- Copy the code, and paste the code into each HTML page in your template in the "PASTE RESPONSIVE AD" area. Some pages may have 2 responsive ads.
- Create another ad unit and choose size 250 x 250 (under rectangular ads). Copy this code and paste it in the sidebar section "PASTE 250 X 250 AD". You can optionally use any height for the ad.
- Test your pages. Do NOT click on your own ads! It can take a few minutes to start working and you may need to upload for testing. You do not need to do any other steps on this page.
- Check in your Google account in a day or two to make sure your ads are working.
Login to your Google AdSense account and generate a 120 x 600 skyscraper ad under "AdSense for Content". You can use either text only or text and images or image only ads. Copy this code, and paste the code into each HTML page in your template in the "PLACE AD UNIT SKYSCRAPER 120 X 600 ADS" area. Test your pages. You do not need to do any other steps on this page.
Some light portal models will use a 468 x 60 banner for the ads. Some use a 120 x 600 skyscraper ad. See the notes in your template pages for the correct ads to generate.
Full portal non-LT, models:
2c. Finding your Google AdSense pub number:
This number can be found in your Google AdSense account login under the "My Account" and then "Account Settings" tab. Or, you can generate any type of ad to find this code. This number will look similar to "pub-123456789123" and will be the "google_ad_client" variable.
3. Replacing the ads option A:
This is for a quick search and replace of the Google pub number. In each template HTML page find and replace "pub-0000000000000000" with your "pub-xxxxxxxxxxx" number. If you do this type of edit be sure to login the next day
after uploading and check that your ads are working in your Google AdSense account login. If not, you may need to do the setup option below.
3. Replacing the ads option B:
Generate new ads in your Google account and paste this code in the correct spots in each template HTML page. See the notes in each HTML page source code and click the visual below to see proper ad placement.
As far as we can ascertain, you can place only 3 ads on a page and 3 link units. If you attempt to place more than 3 ads the page will still display only 3 of them.
Place ads only on HTML pages:
Place your ads only in top level HTML pages. Do not place AdSense ads in .js files or in IFrame pages.
4. AdSense search setup:
Be sure to edit the template "search.js" with your pub number. This will be in the "var clientID" area near the top of the "search.js". Replace the "pub-0000000000000000" with your pub number. Click here for variable editing help.
This will allow the search in the template header to generate pay per click ads as well.
5. AdSense results setup:
The AdSense search results shows a graphic in the header on the Google site. To have no image show here, edit the "var showlogo" variable to "no" in the "search.js".
To show your own logo and link this logo to your site. Create a 750 x 50 pixels logo. Place this image in your template picts folder. Upload this image to your hosting area. Edit this line in your search.js with your logo location:
var logoURL = "https://allwebcodesign.com/picts/google_alllogo.jpg"
Edit this line with your logo link:
var logoLINK = "https://allwebcodesign.com"
Using a site search instead:
For a non-AdSense site search on your website, delete or rename the template "search.js". Then, in the "SITE-GOOGLE-search.js" edit the "var searchdomain" variable with your website domain name. Rename the "SITE-GOOGLE-search.js" to "search.js" and test your pages. The search should now search your website only.
- Note: Ads may not work off-line. Try uploading to test them.
- Google approval may take a few hours. Once approved it usually takes about 15 minutes for new ads you create to start working. Login to your Google account to check if you are approved.
- If you are adding Google ads and they are not displaying, you may have placed too many of one type of ad on a page. Try adding a different ad type to the page. As far as we can ascertain, you can place only 3 ads on a page and 3 link units.
- If your ads are not working, try generating a new ad in your Google AdSense account and replace the template ad code with your generated ad.
- Place your ads ONLY in top level HTML pages. Do not place AdSense ads in .js files or in IFrame pages or in jQuery "include" files in the "includes" folder.
- If you place an ad in a template "sidebar.htm" (not recommended) be sure to check your Google account to make sure the ads are working and generating clicks.
- You may need to check Google support, or contact Google for any other problems with your AdSense account. Allwebco is not affiliated with Google.