How to Add Google AdSense to Your Website with Expression Web

Inserting Google Advertisements into a Web Page


How to Add Google AdSense to Your Website with Expression Web

by Christopher Heng, thesitewizard.com

This article deals with how you can add the Google AdSense code to your web page using the free Microsoft Expression Web editor. For those wondering, AdSense is the name of the advertising network that delivers the Google advertisements you see everywhere on the Internet, from the Google search engine's results page to ordinary websites like thesitewizard.com. It lets you earn some money from advertisements appearing on your site.

Prerequisites

Steps to Inserting the Google AdSense Code into Your Web Page

  1. Go to your AdSense account, and copy the HTML code for the advertisement. See my other article if you don't know how to do this.

    Note that by "copy", I mean do the first step of a "copy and paste" operation. This usually mean that you right-click the code in your Google AdSense account with your mouse, and click the "Copy" line from the menu that appears.

  2. Start up Expression Web and open the page into which you want to place the advertisement. If you have a Dynamic Web Template (ie, a DWT file), you will probably want to insert it there, so that all the pages derived from that template will automatically have the advert.

  3. I will assume that you are currently using the Design tab of Expression Web. Click to put your text cursor at the spot on the page where the advertisement should go.

    Note that if this is a DWT file, you should not put the cursor into an existing editable region, otherwise Expression Web will not update the pages derived from the template with the advert code. If you really want the advert to be in an editable region, first put it into a normal part of the page first, then make that area into a new editable region.

  4. Click the "Code" tab near the bottom of Expression Web's window to activate the Code view. You should now see the underlying HTML code.

  5. Look for the text cursor. Don't click the page itself (or you will accidentally move the cursor). If you need to move up and down the page, use the scroll bars on the right (or bottom).

  6. If your cursor was previously in an empty paragraph, it should now be in the middle of text that says "<p>&nbsp;</p>" (probably after "<p>" and before "&nbsp;</p>").

    If so, use your arrow keys and move the cursor to the end of the line, that is, immediately after "</p>". Otherwise, go to the next step.

  7. Click "Edit | Paste" from the menu. This inserts the code that you copied from your AdSense account.

  8. Click the "Design" tab at the bottom of the window to return to the Design view.

  9. You will probably not be able to see any advertisements from within the Expression Web window. It is, after all, an editor, not a web browser. Furthermore, AdSense needs to be able to retrieve the page content to find out what's on it before it can deliver a relevant advert. It can't reach into your computer and grab files from it. As such, you can only see if everything works properly after you upload your work to the Internet.

    Save the page. If this was a template, allow Expression Web to update all the pages dependant on it. Then publish it to your website.

  10. Go to the site in a browser. Note that JavaScript must be enabled in the browser before the advert will show. (If you don't know what JavaScript is, it probably means that it is already enabled.)

    Don't worry if the advertisement does not show up at first. When the page is loaded for the first time, the AdSense bot (ie, computer program) needs to grab a copy of it and "read" the content. It will then select ads that are relevant to it. As such, if you don't see any adverts, wait a while, then reload/refresh the page. If you have waited long enough (to give the AdSense bot time to retrieve and process everything), the adverts will appear.

Copyright © 2017-2018 Christopher Heng. All rights reserved.
Get more free tips and articles like this, on web design, promotion, revenue and scripting, from https://www.thesitewizard.com/.

thesitewizard™ News Feed (RSS Site Feed)  Subscribe to thesitewizard.com newsfeed

Do you find this article useful? You can learn of new articles and scripts that are published on thesitewizard.com by subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds at https://www.thesitewizard.com/thesitewizard.xml. You can read more about how to subscribe to RSS site feeds from my RSS FAQ.

Please Do Not Reprint This Article

This article is copyrighted. Please do not reproduce or distribute this article in whole or part, in any form.

Related Articles

New Articles

How to Link to This Page

It will appear on your page as:

How to Add Google AdSense to Your Website with Expression Web





Home
Donate
Contact
Link to Us
No Spam Policy
Privacy Policy
Topics
Site Map

Getting Started
Web Design
Search Engines
Revenue Making
Domains
Web Hosting
Blogging
JavaScripts
PHP
Perl / CGI
HTML
CSS
.htaccess / Apache
Newsletters
General
Seasonal
Reviews
FAQs
Wizards

 

 
Free webmasters and programmers resources, scripts and tutorials
 
HowtoHaven.com: Free How-To Guides
 
Site Design Tips at thesitewizard.com
Find this site useful?
Please link to us.