Forum Moderators: martinibuster
After cotnacting Adsense I learned that it's OK to have adsense on the pages where the searched results appear.
However, there is NO targeting.
What to do?
I used Adsense's targeting tool, but it did not help.
Obviously the page where the searched results appear is a dynamic page.
Therefore the question is, what do you think Adsense algo is first of all looking for to target the dynamic pages?
What can I do here?
Many thanks.
maybe the rest of your site content is over powering the search results page, that is, there are more keywords on your header/nav/footer than what the actual search results show..
what u may want to try is remove the site layout (header, footer, etc) from the result page to see if you get better targeted ads.
In my php section I inserted
$keywords = $_POST[\'keywords\'];
In my html section I inserted
{keywords}
However in the html section I have done this.
<!-- google_ad_section_start -->
{keywords}
<!-- google_ad_section_end -->
So my hope is that it will only target the searched keyword or keyphrase. This should work should it not? If ASA is available what do you think ASA?
However, I made this targeting part only few hours ago. Will it take time? Or, doesn't matter?
Thank you.
So I should take the sections away?
Please tell me more, I want to learn.
for this page I am using the Global header that should generate title, but mine does not.
Therefore, how could I possibly make it in such a way that it takes the keyword or keyphrase and makes it appear in the title.
For example, if the visitor searches for "boat" the site will be like
boat - mysite.com
Or something like this.
Please give as much info as possible.
Thank you.
I'm at a friends and the lawn is full of people playing banjos and fiddles, the cooler is overflowing in beer - if I survive perhaps I'll give you more hints tomorrow ;)
something like this in the <head> section of the page:
echo '<title>my site - ' . htmlspecialchars($_POST['keywords']) . '</title>';
be careful how you echo $_POST on your pages... for security reasons. use htmlspecialchars() around $_POST variables when u echo user input.
The script is written in perl and easy to install(I didn't write it). Anyway, it returns pretty relevant results and you can hand manipulate the settings to get even better results through testing. If you want to try it, sticky me. The program and Adsense seem to be working well together... so far.
Then for title you should do something like this:
$keywords = $_GET['keywords'];
$title = "<title>Search results for" . ucfirst(urldecode($keywords)) . "</title>";
[edit] Don't forget to do some variable checking before sending query to db like webnoob suggested.
[edited by: tebrino at 1:55 am (utc) on Oct. 3, 2005]
The thing is that for the title I am using the global header.
If I insert the above title code in the global header, will this not affect the other pages' titles where the global header is serving?
How would I do, so that the the title inserted in the global header will affect only the searched results page?
Thank you.
* You need to use GET in the form so that the keywords being searched is in the URL - make sure it's just that one variable being passed through GET
* I then stored all keywords being searched in a database
* Now that I know the keywords and I know the URL construct I made a simple top queries PHP page which lists these keywords as URL's.
For ex: if the construct is [yoursite.com...]
I make a list from the database with a list of links:
<a href='http://yoursite.com/search.php?q=KEYWORD'>KEYWORD</a>
This kind of become a sitemap of search queries and adsense can get to these links anytime through the queries page - so that become static [well - in a way]
* You should also add the keyword in the title of the page and also make sure that you have a <h1> saying something like "You searched for KEYWORD"
All this will improve your ad display - it did for me.
Regards,
R