Google Analytics Not Showing Correct Active Page in Rails App

I have a Rails 4 App with the Google Analytics js right before the end of the body to work with Turbolinks. However, unless I specifically reload the page I'm on, the Active Page always shows up as '/'. Is there any way to correct this?

Answers


You can use the google-analytics-turbolinks gem and add the script as usual.

Update:

The only thing the gem does, is that it adds this coffeescript file into the assets folder:

if window.history?.pushState and window.history.replaceState
  document.addEventListener 'page:change', (event) =>

    # Google Analytics
    if window.ga != undefined
      ga('set', 'location', location.href.split('#')[0])
      ga('send', 'pageview', {"title": document.title})
    else if window._gaq != undefined
      _gaq.push(['_trackPageview'])
    else if window.pageTracker != undefined
      pageTracker._trackPageview();

Need Your Help

WCF Service And Windows Service

c# asp.net wcf service

I have a WCF service which serves as a remote file/folder browser. We also plan on having a Windows Service that will serve as 3 functions.

XSD simpleContent

xml xsd

Hello guys i'm having some difficulties with my xsd. Here's the XML codes:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.