Questions tagged [ahoy]

Ahoy provides a solid foundation to track visits and events in Ruby, JavaScript, and native apps.

Ahoy provides a solid foundation to track visits and events in Ruby, JavaScript, and native apps.

Works with any data store so you can easily scale.

http://ankane.github.io/ahoy/

70 questions
5
votes
0 answers

Ahoy on Rails — is it supposed to track automatically?

I've set up Ahoy in Rails 5.1.5 but it doesn't track visits automatically. From https://github.com/ankane/ahoy: Add this line to your application’s Gemfile: gem 'ahoy_matey' And run: bundle install rails generate ahoy:install rails…
Jamie A.
  • 85
  • 1
  • 7
3
votes
0 answers

Unable to track location using the Ahoy gem Rails 5.1.3

I just installed the ahoy gem into my Rails 5.1.3 application. I am getting back the visit and the event, but the visit location attributes always return country: "Reserved", region: nil, city: nil, postal_code: nil. This is what I have implemented…
Ctpelnar1988
  • 1,235
  • 3
  • 15
  • 38
3
votes
1 answer

How to track additional post data using Ahoy gem?

I am using Ahoy gem to track article visits on my rails app. Ahoy save lot of visit data by default, for example landing_page url. Is there way to get and save to visits table additional post data, for example post title, which not comes by…
Codestik
  • 77
  • 5
3
votes
1 answer

Querying the Ahoy gem properties hash

I am using the Ahoy gem to record user actions in a Rails 4 app. Events are being recorded and stored in the Ahoy::Event table. Each event has a properties hash attribute stored as text. In this case, am trying to return the number of article views…
user2799827
  • 1,077
  • 3
  • 18
  • 54
3
votes
2 answers

find_by() in json data

I am using ahoy gem for analytics. In the ahoy_events table, I have properties column of json data type. I want to find specific data based on that column. Suppose I have…
3
votes
2 answers

Rails & Ahoy: No route matches [GET] "/ahoy/visits"

I'm using the Ahoy gem to get visit information. But I notice in production, I'm frequently getting the below error: No route matches [GET] "/ahoy/visits" But the traceback doesn't show any files I recognize. Here's the full…
Jackson Cunningham
  • 4,973
  • 3
  • 30
  • 80
3
votes
0 answers

Operator does not exist: jsonb = integer

I am getting the following postgres error: "operator does not exist: jsonb = integer" I have my application hosted on Heroku and am using a Postgres 9.4 DB. Below is what my accounts controller looks like with the ahoy_matey analytics gem. Accounts…
Justin Seidl
  • 249
  • 1
  • 2
  • 13
2
votes
2 answers

How to make Ahoy gem tracking visits for users with uuid?

I have a User model with uuid for id column. Ahoy gem creates visits as expected but the user_id is wrong. Any ideas?
Piotr Brudny
  • 654
  • 4
  • 16
2
votes
1 answer

How to use ahoy to track views of posts?

I have multiple posts and I just want to track all the views (including people without accounts) of the posts (so the page itself). I have two methods that I have tried: 1st method I have added this ahoy.track "Viewed Post", title: @post.id in my…
guest0197
  • 57
  • 5
2
votes
2 answers

Devise Ahoy track link visits

Hello I have a rails app that is a closed community using devise, ahoy and merit. We have a scaffold called resources. Each resource has a link User model class User < ApplicationRecord has_merit has_many :visits, class_name:…
Joe Bloggos
  • 889
  • 7
  • 24
2
votes
2 answers

How to associate an online order with several preceding website visits using a rank function in PostgreSQL

I'm working to create a database view that associates an online order with a users preceding website visits. This is for an eCommerce website so one user may visit and order several times. I've already joined the visits table and orders table on…
2
votes
1 answer

Exclude certain users (e.g. `is_admin?`) from ahoy tracking

I'm trying to create a rule using ahoy's exclude method to exclude admin users from tracking as suggested here. But I can't figure out how to get the User object when I only have the controller and request. Any ideas?
Patrick
  • 189
  • 1
  • 6
2
votes
0 answers

Ahoy_email gem - bypass ahoy_message creation?

I'm using the Ahoy_Email gem in my rails app. Is there a setting to bypass the creation of the ahoy_message for certain emails - for example: I do not want to create a new ahoy message instance for test emails - I would like to bypass all…
dafaso
  • 21
  • 1
  • 5
2
votes
1 answer

Ahoy Ruby on Rails- join tables (Visit and Event)

I am using Ahoy for tracking in my web app. I find events with this: @events = Ahoy::Event.where_properties(title: params[:token]) and I want to get all Visits having visit ID that the above relation, @events, has. I can join the two tables using…
a3y3
  • 1,025
  • 2
  • 10
  • 34
2
votes
0 answers

Ahoy Top Events By Hash Property

I am trying to find the proper way to get the top 5 (by count) events in a database based on a particular property in the events ("value"). I am also using the hightop gem to make it easier to get this top 5. If I use: Ahoy::Event.where(time:…
1
2 3 4 5