{"id":18,"date":"2010-03-31T12:15:30","date_gmt":"2010-03-31T12:15:30","guid":{"rendered":"http:\/\/blog.railsware.com\/?p=18"},"modified":"2021-08-16T15:28:14","modified_gmt":"2021-08-16T12:28:14","slug":"clicktale-gem-released","status":"publish","type":"post","link":"https:\/\/railsware.com\/blog\/clicktale-gem-released\/","title":{"rendered":"ClickTale gem released"},"content":{"rendered":"\n<p>There is a great product called ClickTale. It is a web analytics system that\u00a0we use on many projects to get comprehensive, visual representation of what visitors are looking at and focusing on within\u00a0a web\u00a0page.<\/p>\n\n\n\n<p>Unfortunately, ClickTale is not able to track dynamic session-based content, which changes for each user independently (shopping carts for example) by default.<br>So we created simple Ruby gem that allows you&nbsp;to use&nbsp;ClickTale for such dynamic content with Rails as well.<\/p>\n\n\n\n<p>Adding ClickTale functionality to your Rails application is piece of cake:<\/p>\n\n\n\n<p>First, install our ClickTale gem (or a <a href=\"https:\/\/github.com\/railsware\/clicktale\" target=\"_blank\" rel=\"noreferrer noopener\">plugin<\/a> if you wish) and register the\u00a0gem in your environment.rb:<\/p>\n\n\n\n<p><code>config.gem \"clicktale\"<\/code><\/p>\n\n\n\n<p>Second, set your ClickTale configuration in Rails. &nbsp;The most straightforward way of doing so is&nbsp;to create&nbsp;a new Rails environment initializer (<em>config\/initializers\/clicktale.rb<\/em> in our case) and&nbsp;enter your data:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> Clicktale.project_id = '0000' # put your ID here Clicktale.ratio = '0.5' # put your clicktale ratio here <\/pre>\n\n\n\n<p>Then, just call <code>&lt;%= clicktale_tracker %&gt;<\/code> inside or your rails view. [Not quite sure of the meaning of this sentence. Does the &#8220;call&#8221; mean &#8220;click&#8221; as in &#8220;click on the button (clicktale tracker). Also, the second part &#8220;or inside your rails view&#8221; could you clarify for me? Thanks, Robert.<\/p>\n\n\n\n<p>That&#8217;s all. Your application is using ClickTale now.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a great product called ClickTale. It is a web analytics system that\u00a0we use on many projects to get comprehensive, visual representation of what visitors are looking at and focusing on within\u00a0a web\u00a0page. Unfortunately, ClickTale is not able to track dynamic session-based content, which changes for each user independently (shopping carts for example) by&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3761,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[],"coauthors":["admin"],"class_list":["post-18","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development"],"acf":[],"aioseo_notices":[],"categories_data":[{"name":"Engineering","link":"https:\/\/railsware.com\/blog?category=development"}],"post_thumbnails":"https:\/\/railsware.com\/blog\/wp-content\/themes\/railsware\/vendors\/images\/article-thumbnail-default.jpg","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":11,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":14132,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions\/14132"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media\/3761"}],"wp:attachment":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/tags?post=18"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/coauthors?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}