Git Product home page Git Product logo

Comments (7)

robflaherty avatar robflaherty commented on July 16, 2024

Hey,

Can you provide a URL to your test code? Events should only fire at the scroll points. For the percentage tracking there's a maximum of 10 events that can fire per page. Also I haven't seen any problems with multiple events firing for the same event.

All that aside, adding throttling is probably a good idea anyway. :)

Thanks
Rob

from scroll-depth.

robflaherty avatar robflaherty commented on July 16, 2024

@Weizhen
Added throttling on a dev branch: 5a0ec29

Look good? Will do some more testing tomorrow.

from scroll-depth.

Weizhen avatar Weizhen commented on July 16, 2024

Hi Rob, It looks great! Thanks to _JS :)

I have added a few features that were included in my project, we have a configurable GUI input, so several more options were defined like dynamic milestone, and custom throttle delay.

I have commit the change (I think it will work...), let me know if you want to test it, my pleasure to be part of this!

/Weizhen

from scroll-depth.

Weizhen avatar Weizhen commented on July 16, 2024

Weizhen@e6af569

my fork

from scroll-depth.

robflaherty avatar robflaherty commented on July 16, 2024

Thanks. Were you finding cases where the events fired twice for the same scroll mark? I haven't encountered that. The cache array should prevent that, no?

from scroll-depth.

robflaherty avatar robflaherty commented on July 16, 2024

merged throttling into master 5a0ec29

from scroll-depth.

Weizhen avatar Weizhen commented on July 16, 2024

Great! I probably got old version of code, i pulled it from one of our customers tag manager, where i saw scrolling event for same percentage triggers multiple times. Ignore it if it is not the case.

from scroll-depth.

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.