Forum Moderators: martinibuster

Message Too Old, No Replies

change now needed in adsense logging script

simple fix, just append url

         

amznVibe

4:37 am on Apr 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Google has tinkered with the adsense formats so you need to do a simple change to my adsense logger script [webmasterworld.com]

Apparently they are planning for more output formats so CSV is no longer enough.
You have to add "&outputFormat=TSV_EXCEL" to the destination URL.

Tested working. Enjoy...

roycerus

5:09 am on Apr 21, 2006 (gmt 0)

10+ Year Member



Hasn't the destination URL changed? It's not working for me.
$destination="/adsense/reports/aggregate?product=afc&dateRange.dateRangeType=simple
&dateRange.simpleDate=thisweek&csv=true";

Gives a page not found.

amznVibe

8:01 am on Apr 21, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I radically improved my code at some point so I lost track and not sure if I updated here.
currently I use this:
[1]
putenv('TZ=US/Pacific'); $randate=mktime(0, 0, 0, date("m"), date("d")-rand(3,26),date("Y"));
$destination="/adsense/report/aggregate?product=afc&dateRange.simpleDate=thisweek&dateRange.dateRangeType=custom&dateRange.customDate.start.month="
.date("n",$randate)."&dateRange.customDate.start.day=".date("j",$randate)."&dateRange.customDate.start.year="
.date("Y",$randate)."&dateRange.customDate.end.month=".date("n")."&dateRange.customDate.end.day=".date("j")
."&dateRange.customDate.end.year=".date("Y")."&unitPref=page&reportType=property&null=&groupByPref=date&null=Display+Report&csv=true&outputFormat=TSV_EXCEL";
[/1]

the random date is to defeat any caching on Google's part

roycerus

11:50 am on Apr 21, 2006 (gmt 0)

10+ Year Member



Hi amznVibe,
Thanks for that. Its working fine now. I have added the code to my desktop statistics program which lets me monitor almost everything from the desktop.
Thanks again.
Regards,
R

JohnKelly

1:38 pm on Apr 21, 2006 (gmt 0)

10+ Year Member



FWIW, I believe the &csv=true part is no longer needed as it is superceded by the new "outputFormat" parameter.

Thanks AmznVibe for posting this.