Re: [spree-user] Product Statistics

26 views
Skip to first unread message

Ryan Bigg

unread,
May 30, 2013, 10:33:51 AM5/30/13
to spree...@googlegroups.com
Hey Jesse,

I think you would need to use Jirafe's API to access that information. The Jirafe details are kept within the Configuration area of your admin backend. The Jirafe API documentation can be found here: http://api.jirafe.com/.


On Mon, May 27, 2013 at 10:42 AM, <je...@createthis.com> wrote:
I'm running spree 1-3-stable. I noticed today that the admin section's Jirafe analytics has product visit statistics.

That's pretty cool, but I want to display this information on the product page. I also use the spree_digital gem, and sometimes I would like to display download statistics as well. Is this information already tracked within Spree? Is there a gem available for this sort of thing?

My initial google searches came up empty handed. Any direction appreciated.

Thanks,

--
Jesse
CreateThis.com



--

Ryan Bigg
Community Manager
Spree Commerce, Inc.

Jesse Guardiani

unread,
May 30, 2013, 10:41:29 AM5/30/13
to spree...@googlegroups.com
Well, that's certainly one way to do it. It might be the least time consuming too. Unfortunately, Jirafe has been less than reliable lately, and I think I'd prefer to be able to run a MySQL query against the number of views at some point. I was thinking of a spree DB based solution. I guess it would need to tie into the session information and discount multiple views within a given session. Or else distinguish between "unique" views and raw views.

I've written things like this in the past. It's not a ton of fun. Cookies are a pain.

--
Jesse

Ryan Bigg

unread,
May 30, 2013, 11:04:57 AM5/30/13
to spree...@googlegroups.com
A background process (using Sidekiq, or similar) could make the request to Jirafe and then store that data in the database. Then your application can read directly from there. Does that sound better?

Jesse Guardiani

unread,
May 30, 2013, 11:17:18 AM5/30/13
to spree...@googlegroups.com
That might be acceptable. I think it depends on Jirafe. Who are they and why are they allowing spree to use their services for free? I've been wondering what they get out of the relationship since I got started with Spree. Call me a paranoid cynic.

--
Jesse

Ryan Bigg

unread,
May 30, 2013, 11:29:21 AM5/30/13
to spree...@googlegroups.com
I don't know the answer to that for certain. Maybe Sean has a better idea?
Reply all
Reply to author
Forward
0 new messages