I'd like to know:

  1. How many times facets are included as part of queries
  2. How many times using that facet returned in a "conversion" (using Google Analytics lingo), where the end result after a search is one or more of the following:
    • node view, edit, comment
    • flag or vote on a node (votingAPI / Flag?)
    • Workflow state change
    • "Email this page" (forward module?) or "Print this page"
    • Others?

    (It could also provide a hook for other modules to implement)

  3. Know what the top N terms/values per facet are
  4. Maybe, track the above by role?
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

janusman’s picture

#1: Report on facet usage: committed this patch. This now distinguishes the different vocabularies a term might have come from.

janusman’s picture

Screenshot illustrating the above patch's result.

janusman’s picture

For #2: "clickthru" or other "conversion" tracking:

Node view/edit/delete:
a) modify the link to each result using the hook_apachesolr_preprocess_result(), then check for it in a hook_nodeapi()
Pros: exact. Cons: overridable by each theme's implementation

b) write out a cookie with each search and node-view that auto-increments, write it to the logfile. Only relate node view/edit/delete if they come directly after the last search done.
Pros: easier. Cons: exact? I figure this is how Google Analytics does it =)

c) Just log node views to our table and assume any node view/edit/delete actions with the previous search.
Pros: easiest. Cons: making assumptions, not as exact.

I need to research =)

For other tracking other "conversions" (node flagging, forwarding, etc) it would maybe be the same as above but using their own hooks instead of hook_nodeapi().

Some sample cases:
How would I say a "flag" conversion occurred after a search in these two scenarios?

1) search -> view node -> flag node
4) search -> 1 hour passes -> view node -> flag node
2) search -> view node -> edit node -> view node -> flag node
3) search -> view node1 -> edit node1 -> back to results-> view node2 -> flag node2

Would I still say a search resulted in flagging in each?

robertDouglass’s picture

Patch doesn't apply? The graphs look very nice.

janusman’s picture

Actually, that patch was committed to 6.x-1.x-dev, so you don't need to apply it =)