{"id":3553,"date":"2018-06-03T11:48:44","date_gmt":"2018-06-03T11:48:44","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=3553"},"modified":"2026-03-27T17:07:45","modified_gmt":"2026-03-27T11:37:45","slug":"ahoy-an-analytics-for-rails-track-events-and-visits","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/","title":{"rendered":"Track User Events and Visits in Rails using Ahoy GEM!"},"content":{"rendered":"<h2>Ahoy GEM Introduction<\/h2>\n<p><span style=\"font-weight: 400;\">If you are wondering how to use Ahoy gem in Ruby on Rails, then we have got you covered. It is useful in Rails to track user activity for different products. Rails Ahoy gem provides various aspects to track visits and events in Ruby. How is it used with Google Analytics? We will look at that in detail. <\/span><\/p>\n<p>Google analytics provides very good options for tracking usage data &#8211; visits, views, clicks and much more. In one of the e-commerce projects we are working on, the client wanted to track products which user has liked\/disliked the most and the highest number of products visited by the vendors.<\/p>\n<blockquote>\n<p><i><span style=\"font-weight: 400;\">There could be other such use-cases where <\/span><\/i><span style=\"font-weight: 400;\">Ruby on Rails developers <\/span><i><span style=\"font-weight: 400;\">need to use the data available from such third-party services and acquire some new parameters. <\/span><\/i><span style=\"font-weight: 400;\">So, how can they do that?<\/span><\/p>\n<\/blockquote>\n<p>There is no point reinventing the wheel, writing a whole new business-logic component without looking at the available gems from the vast ruby community. And we found &#8216;Ahoy Gem&#8217;!<\/p>\n<blockquote>\n<p><strong>Checkout <a href=\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-gems\/\" target=\"_blank\" rel=\"noopener\">10 best Ruby on Rails Gems for Web Development<\/a><\/strong><\/p>\n<\/blockquote>\n<h3>Presenting <b>Ahoy Gem<\/b><\/h3>\n<p>Ahoy is a word for greetings. But in the realm of Rails <a href=\"https:\/\/github.com\/ankane\/ahoy\" target=\"_blank\" rel=\"noopener noreferrer\">Ahoy<\/a> is a gem which we can use for tracking various events and visits as we want. It has saved a lot of time and effort for us!<\/p>\n<p>Here is the short description from gem documentation:<\/p>\n<p><i>Track visits and events in Ruby, JavaScript, and native apps. Data is stored in your database by default so you can easily combine it with other data.<\/i><\/p>\n<p>Now, lets jump straight into the installation and coding part. Installation is as simple as adding line to gemfile and running some generators.<\/p>\n<p>Add this line to <i>gemfile<\/i> and hit bundle command as below:<\/p>\n<blockquote>\n<p><code>gem 'ahoy_matey'<br \/>\nbundle install<\/code><\/p>\n<\/blockquote>\n<p>This will install various gems which will help to track user actions. Some of them are as below:<\/p>\n<blockquote>\n<p><code>browser, device_detector, geocoder<\/code><\/p>\n<\/blockquote>\n<p>After bundle, run below generator:<\/p>\n<blockquote>\n<p><code>rails generate ahoy:install<\/code><\/p>\n<\/blockquote>\n<p>This will generate <i><code>ahoy.rb<\/code><\/i> file in initializers directory, two model files <i><code>visit.rb<\/code><\/i> and <i><code>event.rb<\/code><\/i> in <i><code>app\/models\/ahoy<\/code><\/i> directory and one migration which will add two tables named as <i><code>ahoy_events<\/code><\/i> and <i><code>ahoy_visits<\/code><\/i>.<\/p>\n<p>Run <i><code>rails:db:migrate<\/code><\/i> to create tables.<\/p>\n<p>Now, installation is done and let&#8217;s see it in action. Restart your web server, open a page in your browser, and a visit will be created.<\/p>\n<p>Fire up <i><code>rails c<\/code><\/i> and check <i><code>Ahoy::Visit.first<\/code><\/i> and you can see new event.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/prsanjay\/dc7a99e3922ebd5aac9b144ed4fec73c.js\"><\/script><\/p>\n<p>Ahoy automatically attaches the <i><code>current_user<\/code><\/i> to the visit. With <a href=\"https:\/\/github.com\/plataformatec\/devise\" target=\"_blank\" rel=\"noopener noreferrer\">Devise<\/a>, it attaches the user even if he or she signs in after the visit starts.<\/p>\n<p>If you are using any other gem then add below line at the end of your sign in method.<\/p>\n<blockquote>\n<p><code>ahoy.authenticate(user)<\/code><\/p>\n<\/blockquote>\n<p>To see the visits for a given user, create an association:<\/p>\n<blockquote>\n<p><code>class User &lt; ApplicationRecord<br \/>\nhas_many :visits, class_name: \"Ahoy::Visit\"<br \/>\nend<\/code><\/p>\n<\/blockquote>\n<p>And you can see all visits of that user.<\/p>\n<blockquote>\n<p><code>User.find(123).visits<\/code><\/p>\n<\/blockquote>\n<p>By default, a new visit is created after 4 hours of inactivity. You can change this in <i>ahoy.rb<\/i> file in initializers.<\/p>\n<blockquote>\n<p><code>Ahoy.visit_duration = 30.minutes<\/code><\/p>\n<\/blockquote>\n<h3>How It Works?<\/h3>\n<p>When someone visits your website, <span style=\"font-weight: 400;\">Ahoy events and visitors gem<\/span> creates a visit with lots of useful information.<\/p>\n<ul>\n<li>traffic source &#8211; referrer, referring domain, landing page, search keyword<\/li>\n<li>location &#8211; country, region, and city<\/li>\n<li>technology &#8211; browser, OS, and device type<\/li>\n<li>utm parameters &#8211; source, medium, term, content, campaign<\/li>\n<\/ul>\n<p>Use the <i><code>current_visit<\/code><\/i> method to access it.<\/p>\n<p>Prevent certain Rails actions from creating visits with:<\/p>\n<blockquote>\n<p><code>skip_before_action :track_ahoy_visit<\/code><\/p>\n<\/blockquote>\n<h3>Events.<\/h3>\n<p>Each event has a <i>name<\/i> and <i>properties<\/i>.<br \/>\nThere are three ways to track events.<\/p>\n<h4>JavaScript.<\/h4>\n<blockquote>\n<p><code>ahoy.track(\"Viewed the product\", {title: \"i-phone 8 plus\"});<\/code><\/p>\n<\/blockquote>\n<p>or track events automatically with:<\/p>\n<blockquote>\n<p><code>ahoy.trackAll();<\/code><\/p>\n<\/blockquote>\n<p>See <a href=\"https:\/\/github.com\/ankane\/ahoy.js\" target=\"_blank\" rel=\"noopener noreferrer\">Ahoy.js<\/a> for a complete list of features.<\/p>\n<h4>Ruby.<\/h4>\n<blockquote>\n<p><code>ahoy.track \"Viewed the product\", title: \"Redmi 3s Prime\"<\/code><\/p>\n<\/blockquote>\n<p>or track actions automatically with:<\/p>\n<blockquote>\n<p><code>class ApplicationController &lt; ActionController::Base<br \/>\nafter_action :track_action<br \/>\nprotected<br \/>\ndef track_action<br \/>\nahoy.track \"Action Name\", title: 'Some awesome information'<br \/>\nend<br \/>\nend<\/code><\/p>\n<\/blockquote>\n<h4>Native Apps.<\/h4>\n<p>For Android, check out <a href=\"https:\/\/github.com\/instacart\/ahoy-android\" target=\"_blank\" rel=\"noopener noreferrer\">Ahoy Android<\/a>. For other platforms, see the <a href=\"https:\/\/github.com\/ankane\/ahoy#api-spec\" target=\"_blank\" rel=\"noopener noreferrer\">API spec<\/a>.<\/p>\n<h4>Associated Models.<\/h4>\n<p>You can associate your models with visit as you want. For example if you want to associate orders with visits. Just add <i>visitable<\/i> to the model.<\/p>\n<blockquote>\n<p><code>class Order &lt; ApplicationRecord<br \/>\nvisitable<br \/>\nend<\/code><\/p>\n<\/blockquote>\n<p>And create the migration to add <i><code>visit_id<\/code><\/i> to <i><code>orders<\/code><\/i> table.<\/p>\n<blockquote>\n<p><code>class AddVisitIdToOrders &lt; ActiveRecord::Migration[5.2]<br \/>\ndef change<br \/>\nadd_column :orders, :visit_id, :bigint<br \/>\nend<br \/>\nend<\/code><\/p>\n<\/blockquote>\n<p>When a visitor places an order, the <i><code>visit_id<\/code><\/i> column is automatically set and you can have very useful information like where orders are coming from with simple joins:<\/p>\n<blockquote>\n<p><code>Order.joins(:visit).group(\"referring_domain\").count<br \/>\nOrder.joins(:visit).group(\"city\").count<br \/>\nOrder.joins(:visit).group(\"device_type\").count<\/code><\/p>\n<\/blockquote>\n<h4>Track Additional Data.<\/h4>\n<p>You can track additional data by adding below methods to <i><code>ahoy.rb<\/code><\/i> file<\/p>\n<p><script src=\"https:\/\/gist.github.com\/prsanjay\/6d8f6fd407721a7438e2cd6a08571e59.js\"><\/script><\/p>\n<p><span style=\"font-weight: 400;\">There are many other useful options available in the Ahoy gem. The Rails Ahoy dashboard enables Ruby on Rails developers to use all the functions and features of the gem<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>There are many other useful option available in the gem. It provides a number of options to help with <a href=\"https:\/\/github.com\/ankane\/ahoy#gdpr-compliance-1\" target=\"_blank\" rel=\"noopener noreferrer\">GDPR compliance<\/a> too. That&#8217;s it for now.<\/p>\n<p>Thank You for reading the blog!<\/p>\n<p><strong><a href=\"https:\/\/www.botreetechnologies.com\/contact\" target=\"_blank\" rel=\"noopener noreferrer\">Consulting is free<\/a> &#8211; let us help you grow!<\/strong><\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ahoy GEM Introduction If you are wondering how to use&#8230;<\/p>\n","protected":false},"author":8,"featured_media":13621,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-3553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Track User Events and Visits in Rails using Ahoy GEM!<\/title>\n<meta name=\"description\" content=\"There could be other such use-cases where we need to use the data available from such third-party service and acquire some new parameters.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Track User Events and Visits in Rails using Ahoy GEM!\" \/>\n<meta property=\"og:description\" content=\"There could be other such use-cases where we need to use the data available from such third-party service and acquire some new parameters.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-03T11:48:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-27T11:37:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"1424\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sanjay Prajapati\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sanjay Prajapati\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/\"},\"author\":{\"name\":\"Sanjay Prajapati\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/b628623fa9d946d2258f506a476b45e3\"},\"headline\":\"Track User Events and Visits in Rails using Ahoy GEM!\",\"datePublished\":\"2018-06-03T11:48:44+00:00\",\"dateModified\":\"2026-03-27T11:37:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/\"},\"wordCount\":741,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg\",\"articleSection\":[\"Ruby on Rails\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/\",\"name\":\"How to Track User Events and Visits in Rails using Ahoy GEM!\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg\",\"datePublished\":\"2018-06-03T11:48:44+00:00\",\"dateModified\":\"2026-03-27T11:37:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/b628623fa9d946d2258f506a476b45e3\"},\"description\":\"There could be other such use-cases where we need to use the data available from such third-party service and acquire some new parameters.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg\",\"width\":2000,\"height\":1424,\"caption\":\"Rails using Ahoy gem\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Track User Events and Visits in Rails using Ahoy GEM!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/b628623fa9d946d2258f506a476b45e3\",\"name\":\"Sanjay Prajapati\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/sanjay-prajapati-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/sanjay-prajapati-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/sanjay-prajapati-150x150.png\",\"caption\":\"Sanjay Prajapati\"},\"description\":\"Sanjay is a Ruby on Rails Engineer, who also works with Javascript and React. He has strong experience in working with domains like eCommerce, Health and Insurance. In his spare time, he enjoys reading and writing blogs and he is excited to help add the company to his list of successes.\u200b\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Track User Events and Visits in Rails using Ahoy GEM!","description":"There could be other such use-cases where we need to use the data available from such third-party service and acquire some new parameters.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/","og_locale":"en_US","og_type":"article","og_title":"How to Track User Events and Visits in Rails using Ahoy GEM!","og_description":"There could be other such use-cases where we need to use the data available from such third-party service and acquire some new parameters.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2018-06-03T11:48:44+00:00","article_modified_time":"2026-03-27T11:37:45+00:00","og_image":[{"width":2000,"height":1424,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg","type":"image\/jpeg"}],"author":"Sanjay Prajapati","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Sanjay Prajapati","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/"},"author":{"name":"Sanjay Prajapati","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/b628623fa9d946d2258f506a476b45e3"},"headline":"Track User Events and Visits in Rails using Ahoy GEM!","datePublished":"2018-06-03T11:48:44+00:00","dateModified":"2026-03-27T11:37:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/"},"wordCount":741,"commentCount":0,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg","articleSection":["Ruby on Rails","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/","url":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/","name":"How to Track User Events and Visits in Rails using Ahoy GEM!","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg","datePublished":"2018-06-03T11:48:44+00:00","dateModified":"2026-03-27T11:37:45+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/b628623fa9d946d2258f506a476b45e3"},"description":"There could be other such use-cases where we need to use the data available from such third-party service and acquire some new parameters.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2018\/06\/ahoy-an-analytics-for-rails-track-events.jpg","width":2000,"height":1424,"caption":"Rails using Ahoy gem"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/ahoy-an-analytics-for-rails-track-events-and-visits\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Track User Events and Visits in Rails using Ahoy GEM!"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/b628623fa9d946d2258f506a476b45e3","name":"Sanjay Prajapati","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/sanjay-prajapati-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/sanjay-prajapati-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/sanjay-prajapati-150x150.png","caption":"Sanjay Prajapati"},"description":"Sanjay is a Ruby on Rails Engineer, who also works with Javascript and React. He has strong experience in working with domains like eCommerce, Health and Insurance. In his spare time, he enjoys reading and writing blogs and he is excited to help add the company to his list of successes.\u200b"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=3553"}],"version-history":[{"count":5,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3553\/revisions"}],"predecessor-version":[{"id":20635,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/3553\/revisions\/20635"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13621"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=3553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=3553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=3553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}