remp2020 / remp

REMP - Reader's engagement and monetization platform. Set of open-source tools for publishers to engage with their audience. Repository is public mirror of our internal private repo.
https://remp2020.com
MIT License
126 stars 39 forks source link

Page progress tracker not working #31

Open j-norwood-young opened 4 years ago

j-norwood-young commented 4 years ago

https://github.com/remp2020/remp/blob/a4e60a16c9ad14048b7a0c21c66c9c3074dd89c6/Beam/resources/assets/js/remplib.js#L837

This line should be this.post(this.url + "/track/pageview", params);

rootpd commented 4 years ago

Not necessarily. The sendTrackedProgress function is being used within event handlers and this is not refering to remplib.tracker object there, but to the context of emitted event.

That's why we rather used remplib.tracker.post which always points to the right function and doesn't get confused by context.

Is current implementation causing you any issues?

j-norwood-young commented 4 years ago

My current implementation was not posting any events until I changed that.