Jump to content

How to insert Google Adsense code


Vlad26
 Share

Recommended Posts

Please tell me how to quickly and easily insert Google Adsense code or banner code on the site PW. Hanna plugin code is not suitable for the 2.5 version. If you can step by step with screenshots.

Edited by Vlad26
Link to comment
Share on other sites

On the google developer page the whole procedure is described. In fact its nothing more than placing a piece of javascript inside your HTML.

Once you have a finished site, create an adsense account, follow the instructions and wait for google to approve your website.

http://www.google.com/adsense/start/how-it-works.html

  • Like 4
Link to comment
Share on other sites

Hanna just converts snippets(Hanna code) inside a textarea into predefined HTML. This allows content editors to use more complex structures without learning/writing the whole code. Output is only stripped if you choose (another) Textformatter to do this ;)

Where exactly do you want your AdSende code to appear? I'm not sure but as Raymond said, find the right place inside your template file and paste the code.

If you want to have it inbetween content (e.g. article with a banner inside) you could use the HannaTextformatter to replace a pre-defined tag (e.g. [[ad]]) with the right Google AdSende code for an ad. This is done in the Hanna Settings window where you define your Hanna Code.

(On a side note, while not all modules are marked for 2.5, they usually work fine. Just install it)

Link to comment
Share on other sites

  • 7 years later...

I'm facing some problems with including AdSense on a PW page. 

I basically think I've done it right, put the code in the <head> tag and done, the ads show.
In my Google AdSense, there's this tool that gives you a preview of your website, where you can edit the appearance of ads (delete, change the type etc.).
The problem is though, I cannot access the subpages and I don't know why. I have reached out to the google community already who suspect the usual culprits (delete Browser Cache, switch Browser) but that doesn't help.
My guess is, that it has to do with the "markup regions" output strategy that PW provides and that I indeed use for this site (and all my PW sites). 
Could that be the case? Does the <head> tag load last?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...