Forum Moderators: martinibuster
My problem is that in order to display the results of the calculator, I completely regenerate the page on the screen with each calculation. This is why I code my pages in JavaScript, and of course the JavaScript generates the pages in HTML.
But I don't know how to incorporate the Google ad code into the JavaScript/HTML code for the page. And Google won't let you mess with it. (If I could figure out how to do it I might ask them.)
I work around this by using two Frames. One holds the ads and the other the calculator. So what happens is that someone may spend 20 minutes making calculations of different activities or foods but during those 20 minutes the ads stay the same. If the ads changed with the calculations they would get much more attention. I would make more money, and so would Google!
Any ideas?
Thanks, Peter
Maybe you could generate an event on the calculate results that loads the adsense code into a frame AFTER the results appear so adsense has text to target off of.
I am not sure exactly how the adsense codes targets. I thought that it used to be targeted based on the URL and file name, and entered into a databsae as index.asp is about atkins, low carbs, etc.
You may want to incorporate dynamic pages with adsense on them. I have this in a site search and it targets ads very well. You can set up values based upon the numbers the calculator uses. So if I say I consume xx carbs and xx fat (or whatever your case may be) the page will submit to a parser that evaluates the the inputs and gives outputs based off of this. So if i put in 20 carbs and 50 fat the page goes to yourdomain.com/calculate/calculate.asp?carbs=20fat=50
you can specify the ranges for specific output, so you can have carbs 20-30 and fat 20-30 display text that talks about increasing carb intake or whatever.
In my search system search terms and done like this, results are placed on a page and adsense code is added. The adsense code is 9/10 times about the search term (since a lot of the results have language congruent to the search term).
I think you may want to look into displaying results on a results page where the adsense is loaded on that page based on the input, so the input would dictate what the text would say and the text would dictate what the ads would say.
Anyway, I don't know how to do anything server-side and so must do it all in the user's browser with JavaScript... and in generating a page with JS I don't know how to encorporate the Google ad code into it.
J4mes that's very clever. Though I would have to have countless pages for the different activities and foods. Or I could just create a dozen different ad pages and randomly select them to get some different ads!
The problem is that if I remember correctly this is "illegal" in Google's Terms. You can not manipulate the text on a page to get different ads. (Though I guess the spirit of doing it is pure... just trying to match the ads to the changing page.)
Thanks for the ideas!
Is it possible to click a button, generate the results, and reload the whole page with the results saved client side?
Or, could the results be grabbed off of another page (or database for that matter) based on certain criteria, and have the fields grabbed off of the database with a SELECT * FROM RESULTS where ID=ID range specified with the input criteria. If this page was loaded with the adsense code on the page this would certainly be generating targeted ads. It would also be a very personalized "Your Nutrition Results are as follows" type thing.
I think you are OK if you are in the spirit of the google TOS. Your case seems to be wishing to target as best as possible to 1. increase CTR and 2. place advertisers ads that are relevant to your visitors interests rather than untargeted ads.
In your case it would appear OK to stuff keywords to generate targeted ads for the above purpose. I think google wants to avoid people stuffing high paying keywords in frames with adsense about X when the page is about Y.
I am sorry i am not well versed in JS but I do belive their will be options for you in your situation. I am sure other members here have a similar situation that will chime in shortly.
My activities calculator only uses one long list of activities. But my food calculator uses many different food lists. So I guess I could generate the text on the ad Frame to correspond to the food list. That way at least when the user changed food lists the ads would change. That would be progress! Also if the text said something about the food list I'm sure that would be okay with Google.
Thanks. Got me thinking!
Then have your javascript pull up the static pages in the second frame. Instead of using the form information to generate a page, the javascript could use the form information to generate a URL which would correspond to the relevant static page.
Would that work?
In order to cover all the permutations of all the variables, there would, I'm guessing, be a very large number of pages, but it would give AdSense something solid to work with - and you could do all the generation offline beforehand.
The people using my website are interested in diet and weight loss. If they calculate soda pop calories and get ads about where to buy soda pop, they aren't likely to click on them. As it is now they get diet and weight loss ads which is great.
The only problem being that if they sit there calculating for 20 minutes the ads never change. Whereas if they changed there might be more interest in them.
It would all work if I could just reload the page with each calculation, but I can't.