Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-01-08 12:13:42

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Track internal search requests

Is there a way to log site searches within Textpattern?

Only way I can think of at the mo is to use Analytics, but it’s not so easy there either – especially with messy search URLs (/search?q=where+is+the+money&x=0&y=0).

Am I missing something obvious?

Offline

#2 2010-01-08 12:31:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,942
Website GitHub

Re: Track internal search requests

pieman wrote:

Is there a way to log site searches within Textpattern?

Depends what you want to do with them I guess. Two avenues I can think of:

  1. filter TXP’s visitor logs to only show ?q=
  2. inside a <txp:if_search> conditional, write the <txp:search_term /> to another table (using smd_query or some PHP)

If you want any more detailed analytics than that you’ll have to put your thinkin’ trousers on.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2010-01-08 12:34:30

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: Track internal search requests

Bloke wrote:

If you want any more detailed analytics than that you’ll have to put your thinkin’ trousers on.

Yep, I think I will.

But I’m already wearing two pairs to keep warm. I don’t think the stitching will hold if I try another layer.

Offline

#4 2010-01-09 01:48:10

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Track internal search requests

Google Analytics supports it. You just have to tell it what url parameter to look for in the Analytics Settings if I remember correctly


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2010-01-12 11:52:57

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: Track internal search requests

Thanks Matt. Sounds like the best option.

Offline

Board footer

Powered by FluxBB