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/

67 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.
  • 95
  • 1
  • 6
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,156
  • 3
  • 13
  • 33
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
  • 3
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
  • 655
  • 1
  • 10
  • 30
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,283
  • 3
  • 27
  • 64
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
  • 221
  • 1
  • 2
  • 12
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:…
Jem Built
  • 824
  • 6
  • 18
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
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
  • 691
  • 1
  • 5
  • 24
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:…
2
votes
2 answers

Ahoy events queries in rails

I started code rails recently and I need to figure out this problem. %td = Ahoy::Event.where(name: "viewed_brochure").where_properties(brochure_id: brochure.id).select(:session_id).uniq This should find number of distinct values of session_id in…
Emre
  • 109
  • 1
  • 8
2
votes
1 answer

How does Ahoy's visit work?

I want to track the visit clicking my links. I need to know the percentage of browser, OS... of every link. Does it mean I should add that in link.rb ? class Link < ActiveRecord::Base has_many :visits end But after clicking links lots of…
dalai
  • 51
  • 3
2
votes
2 answers

Create Seed Data for Analytics Ahoy gem

I want to create some seed data for Ahoy Analytics Gem for a demo How would I simulate page visits but also alter the date recorded in the db to simulate past visitor data? Any help is appreciated Thanks
Eali
  • 29
  • 6
1
vote
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
  • 47
  • 5
1
2 3 4 5