Ticket #194 (closed Bug: fixed)

Opened 22 months ago

Last modified 6 months ago

Search Engine tracking: allow multiple query parameters

Reported by: tbleher Owned by:
Priority: normal Milestone: Features requests - after Piwik 1.0
Component: Core Keywords:
Cc: Sensitive:

Description

Some search engines have several interfaces for querying, with different search parameters. E.g. www.google.de has ?q= for normal queries and ?as_q= for advanced/special queries. Currently modules/DataFiles/SearchEngines.php does not allow specifying something like this.

Suggestion: Change the data structure so it is an array of query options. E.g.

"www.google.de" => array("Google", "q"),

could be changed to

"www.google.de" => array("Google", array("q", "as_q")),

Change History

Changed 21 months ago by matt

  • milestone set to Future features

Please give a URL example for several search engines, so we can justify such a change.

Changed 21 months ago by matt

What is the behaviour for Yahoo! and Live?

Have you had a look at the code for this (see function detectRefererSearchEngine() in /trunk/modules/LogStats/Visit.php@head#L653)

Changed 14 months ago by vipsoft

m.live.com (searching from my mobile device) uses "q" (web) or "Q" (images, news, maps, etc).

www.altavista.com (advanced search) uses "aqa" (all these words), "aqp" (exact phrase), "ago" (any of these words), and "aqn" (none of these words).

There's an old list of search engine query strings ( http://www.science.co.il/analog/SearchQuery.txt) that gives other examples.

As an alternative, if the lookup fails, we can try parsing the query. Having this as a fallback, piwik could theoretically handle unknown search engines. For an idea see:  http://blog.netnerds.net/2007/02/mssql-parse-search-engine-querystrings-for-search-terms/

Changed 9 months ago by matt

  • status changed from new to closed
  • resolution set to fixed

this was implemented recently and is available as of 0.2.35

please check out the FAQ for information with detecting search engines

Changed 6 months ago by koteiko

Note: See TracTickets for help on using tickets.