Quote:
|
Originally Posted by trader Can DCG or AZ expand on that a bit as I have never used Frames and do not know what this does: google_page_url = document.location and purpose of it within the javascript. Please excuse my lack of knowledge on frames. Whatever, is adding it to the code OK with G?
One reason I am confused is I am not using the automated template system itself but instead using the templates stand-alone and customizing them individually using Notepad, etc. |
If you are using frames and want to put ads in there, then Google gives you a different code for the same. If you go to the Adsense "Ad Settings" page, there is a checkbox "Framed Pages". If you check it the code box automatically inserts google_page_url = document.location.
How this works ... Well here it is ..
In Javascript, the url of every page (or frame) can be accessed by document.location object. In fact it is document.location.href. Now if you are using frames (sort of having more than one page on the same URL), Google has no way of figuring out which frame's content should the ads be based on. So if you pass, document.location, Google figures out the content of that particular frame and then shows the relevant ads for any ad units displayed in that frame.
You don't have to use the google_page_url = document.location code if you are not using frames.
I have tried to give a really non-technical answer. Hope this helps.
Best
FusionX