Topic awaiting preservation: Can anyone suggest a good way to get keywords from referal URL's (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Australia |
posted 06-07-2005 15:07
Hi all, just wondering if anyone can suggest a good way to get keywords used in referal address. |
Bipolar (III) Inmate From: Australia |
posted 06-07-2005 15:14
One thing i forgot to mention, obviously there will be different URL's to handle, so yahoo will need something slightly different etc. I was thinking of storing the search engine (yahoo, google) etc in a small table with the expression to use to get the keywords for that search engine. Hopefully it can be done with all the escaping chars etc.. |
Paranoid (IV) Inmate From: Minneapolis |
posted 06-07-2005 17:17
In PHP try this: |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-07-2005 17:34
Check out this tutorial from ALA. |
Bipolar (III) Inmate From: Australia |
posted 06-08-2005 01:29
Awesome thanks guys. |
Paranoid (IV) Inmate From: Minneapolis |
posted 06-08-2005 15:54
Well, in terms of limiting yourself, keep in mind the availability of log files, which will be best thing to store for complete records. |
Bipolar (III) Inmate From: Australia |
posted 06-09-2005 00:29
I did explore the log file option but to be honest didnt find any benifit from it. For starters it didnt have all of the information i wanted, and i would have to parse it anyway - so working with the database turned out to be easier to handle/customize. I don't see any performance benifit working with the log files either, from what i've found it can be much faster working with an indexed table than a flat file. - I could be wrong? |
Paranoid (IV) Inmate From: Minneapolis |
posted 06-10-2005 15:46
Well first thing is that you need to have log files with referers in them... if you don't then you're out of luck already (although maybe you can get your host to change it to the long log format?). Using the log files isn't easier, but a) gives you a retrospective view of past hits and more importantly b) many web statistics packages already track search terms exactly like you're talking about. I use awstats, and it will give you month by month or year by year stats for everything, although it falls a little short if you want to query any arbitrary time interval. As to the performance of using the log files, yes it's slow, but log file analyzers cache all the contents into a database for subsequent performance. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-10-2005 17:16
I'd recommend parsing the logs on some sort of cron job every day (or hour whatever) and then inserting that into an indexed table as opposed to doing an insert every time someone hits the page. |
Bipolar (III) Inmate From: Australia |
posted 06-10-2005 17:38
quote:
quote:
quote:
|
Bipolar (III) Inmate From: Australia |
posted 06-10-2005 17:51
Hmm that was a great article jiblet, i think i have some SQL restructuring to do - can't wait to try this stuff out. I have skimmed this stuff before but never really applied it, i can see how it is very useful though! Thanks for that |