leo_c — 2010-02-17T11:54:27-05:00 — #1
So I've noticed that google adsense keeps track of what links clicked on your site.
For example, assume MySite.com uses adsense AND website MyBlog.com links to MySite.com from file MySite.com/files/path/helloworld.html AdSense will actually provide you the full link.
Does anyone know how they do this? In know you can use the http "host" header in your code. But that just provides MySite.com not the full path.
dan_grossman — 2010-02-17T14:08:40-05:00 — #2
Not following you -- your order of "myblog" and "mysite" is confusing. Which links to which and which runs AdSense? You're not talking about AdWords?
You can tell where someone hitting your page came from by looking at the HTTP REFERRER.
You can tell what link someone clicked from your page to another by attaching an onclick handler to the link and logging it somewhere with AJAX.
leo_c — 2010-02-17T16:48:28-05:00 — #3
I meant Ad sense, but I guess I should have said Google Analytics.
- MySite.com runs Adsense
- MyBlog.com is an unrelated external site that has a link to MySite.com
- The file in MyBlog.com that has the link to MySite.com is www.MyBlog.com/files/hello.html
- Currently, Google Anayltics gives me that URL.
I guess you are right and google analytics is using HTTP REFERER. But when I try it on my dev environment it always returns null. I'll try it on online and hopefully get the real results.
nickardo — 2010-02-17T16:51:11-05:00 — #4
Well, I think when you click a link in google adsense, all the info goes to google, just because they need to know the websites that are linking for the payment etc.
So when you click you send info to google and go to the website.