All threads / How do i track view count of different div blocks on single page while scrolling without clicking them.

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do i track view count of different div blocks on single page while scrolling without clicking them.

Malav Desai asked in General

I have many cards (div blocks) on my single page application. I want to track view counts when user scroll through this page. Means whenever one card visible on screen or in screen viewport area while scrolling just increment view count for that perticular card (div blocks). Its like Facebook tracking pixel thing but i want ot create custom and different tracking pixel for my cards which track view counts when div is visible.
I am using Ruby on Rails and Angularjs.
Thank you.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.