Questions tagged [impressionist]

Rails gem that tracks impressions and page views.

27 questions
0
votes
0 answers

Impressionist most_viewed items not working

I've been unable to retrieve most viewed posts in my app with impressionist gem. Everything works fine with normal page views. I've tried this on another app and it works well. The only difference between the two apps is that the one that that…
Lashe
  • 31
  • 1
  • 9
0
votes
2 answers

How to count daily impressions for an object related to the current_user with Impressionist gem

I am having trouble with getting the sum of all impressions for a specific object that relates to a user within a 24 hour span. Basically, I want to count the daily impressions for the current_user's posts. I tried six or seven different…
Johnny C
  • 121
  • 1
  • 1
  • 11
0
votes
1 answer

Rails ActiveRecord Query: Sum total article view count per category

I have articles that are able to be tagged in categories. I am struggling to create a query which will extract the sum of view count (tracked using impressionist gem) of articles within each category. Schema: create_table "article_categories",…
doyz
  • 887
  • 2
  • 18
  • 43
0
votes
1 answer

impressionist view count not working

i have a rails app where i am using impressionist gem to count the vieew made on the show page of my post model. But it's not updating the views,(the views shows 0) in my gem file i added: gem 'impressionist' Then: rails g impressionist then: rake…
Ahmed Reza Siddique
  • 383
  • 1
  • 6
  • 20
0
votes
0 answers

Using impressionist with chartkick - displaying user.articles.impressions in graph

I'm using the Impressionist gem to capture article views. A user can create an article and can view these in his dashboard. What I'm looking to do is to display a graph using Chartkick showing the amount of articles created by day, comments by day…
Martin
  • 55
  • 1
  • 9
0
votes
0 answers

Ruby Impressionist gem error

i wan to use this gem im my proyect on ruby on rails 4.0 but when i do all instructions of this gem in my proyect i get this error: NoMethodError in ProductsController#show undefined method `impressionist' for…
0
votes
1 answer

Unable to add Impressionist model to Solr

To keep track of unique views I added impressionist gem. The impressions table will grow at a faster rate due to higher traffic. This will cause problems later when I want to show a comparison between consecutive weeks/months. So I thought of…
Sahil
  • 3,338
  • 1
  • 21
  • 43
0
votes
1 answer

Impressionist gem - sort posts by views

I'm using the following gem and now I'm trying to sort posts by the number of views. I have followed the instructions and in my post model, so I have: is_impressionable :counter_cache => true And in my controller, I have: @mostpopular =…
Gurmukh Singh
  • 1,875
  • 3
  • 24
  • 62
0
votes
1 answer

Don't delete impressions when soft deleting a record

I'm using impressionist gem to lock the views for different products. I'm also having soft-deletion in my application. When I remove any record/product, its impressions also got deleted. I just want to keep the impressions and don't want to delete…
kashif
  • 1,097
  • 4
  • 17
  • 32
0
votes
1 answer

Impressionist gem error: aggregates must have exactly one argument (Rails)

I have error in my app: SQLite3::SQLException: DISTINCT aggregates must have exactly one argument: SELECT DISTINCT COUNT(DISTINCT ) FROM "impressions" WHERE "impressions"."impressionable_id" = ? AND "impressions"."impressionable_type" = ?. What…
myf
  • 185
  • 1
  • 3
  • 11
0
votes
1 answer

Link to Order Index Rails 4

I am using Rails 4 with the Impressionist gem to get view count of my Articles. On my index page I have a link labeled "Most Popular" I also have access to a method that will order articles by the view count: @articles =…
Kathan
  • 1,428
  • 2
  • 15
  • 31
0
votes
1 answer

Super simple setup with impressionist, mismatch between impressionist_count and impressions_count

Using Rails 4 and Impressionist 1.5.1 I have a ProductsController and a Product model. In my show action: def show impressionist(@product, "unique view", :unique => [:session_hash]) end In my model: class Product < ActiveRecord::Base …
sergserg
  • 21,716
  • 41
  • 129
  • 182
1
2