Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'd like to know:
- How many times facets are included as part of queries
- 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)
- Know what the top N terms/values per facet are
- Maybe, track the above by role?
Comment | File | Size | Author |
---|---|---|---|
#2 | apachesolr_stats_screenshot2.png | 59.06 KB | janusman |
#1 | apachesolr_stats-573006-1.patch | 17.06 KB | janusman |
Comments
Comment #1
janusman CreditAttribution: janusman commented#1: Report on facet usage: committed this patch. This now distinguishes the different vocabularies a term might have come from.
Comment #2
janusman CreditAttribution: janusman commentedScreenshot illustrating the above patch's result.
Comment #3
janusman CreditAttribution: janusman commentedFor #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?
Comment #4
robertDouglass CreditAttribution: robertDouglass commentedPatch doesn't apply? The graphs look very nice.
Comment #5
janusman CreditAttribution: janusman commentedActually, that patch was committed to 6.x-1.x-dev, so you don't need to apply it =)