Giter Site home page Giter Site logo

Comments (8)

dhh avatar dhh commented on July 17, 2024

pjax has a special, custom GA hook for this. I'm not overly keen on adding that to the main bundle.

On Sep 27, 2012, at 9:18 AM, David Estes wrote:

Just a thought, how does google analytics behave to this? Does the analytics snippet need changed in order to work?

Or do we handle this another way?


Reply to this email directly or view it on GitHub.

David Heinemeier Hansson

from turbolinks-classic.

halfdan avatar halfdan commented on July 17, 2024

The same question applies to other analytics tools like Piwik. Is there any way to hookup a function callback that gets called on page:change?

from turbolinks-classic.

dhh avatar dhh commented on July 17, 2024

You can just listen for that event and document.addEventListener('page:change', function() {}).

On Sep 27, 2012, at 2:24 PM, Fabian Becker wrote:

The same question applies to other analytics tools like Piwik. Is there any way to hookup a function callback that gets called on page:change?


Reply to this email directly or view it on GitHub.

David Heinemeier Hansson

from turbolinks-classic.

davydotcom avatar davydotcom commented on July 17, 2024

@dhh, hate to sound dumb but can we not fire a dom:loaded event on page:change so we can just monitor document.ready ?

from turbolinks-classic.

dhh avatar dhh commented on July 17, 2024

I'm not actually sure that dom:loaded is even going fire the jquery document.ready, but yes, I actually do think it's worth considering. Originally we talked about not being sure what compatibility issues this might cause, but I think we should examine the case.

On Sep 27, 2012, at 2:50 PM, David Estes wrote:

@dhh, hate to sound dumb but can we not fire a dom:loaded event on page:change so we can just monitor document.ready ?


Reply to this email directly or view it on GitHub.

David Heinemeier Hansson

from turbolinks-classic.

davydotcom avatar davydotcom commented on July 17, 2024

we only have to consider the browsers that support pushState which makes it a little easier to deal with.

from turbolinks-classic.

davydotcom avatar davydotcom commented on July 17, 2024

Isnt really an issue with the gem per-say ...removing

from turbolinks-classic.

steverandy avatar steverandy commented on July 17, 2024

Why not do this instead?

$ -> $(document).trigger 'page:change'

from turbolinks-classic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.