react-metrics icon indicating copy to clipboard operation
react-metrics copied to clipboard

Support react-router v4

Open GiladShoham opened this issue 9 years ago • 6 comments

Hi, First thanks for this great library!

Is react-metrics supports react-router4?

If no is there any plan/timeline for this? If yes, is there anything special need to be done?

Thanks! Gilad

GiladShoham avatar Mar 21 '17 17:03 GiladShoham

We recently took some time to try and implement react-metrics with react-router v4. We did hit an issue where pageviews did not appear to be behaving correctly. Here's a gif of our log. You can see as we route around it seems to cancel the previous pageview session as if it didn't succeed, then starts a new one.

kylem038 avatar Jul 17 '17 20:07 kylem038

Just wondering is there any progress on this at all?

GazzaHazza avatar Feb 08 '18 10:02 GazzaHazza

@GazzaHazza there are no plans for us to move to react-router 4, so unfortunately we're not working on supporting this in react-metrics. However we're 100% open for a pull request to support this 👍

jamsea avatar Feb 08 '18 17:02 jamsea

Started working on a PR for React 16 in #56, it also contains an upgrade to react-router 3.2. But I haven't tried to upgrade to react-router 4 yet. It might be a good first step to peek at #56 and help get these tests passing. After we land that we can look to upgrade to react-router 4.

potench avatar Feb 08 '18 18:02 potench

@potench any update on that PR?

breeny avatar Apr 17 '18 03:04 breeny

For anyone still having issues with this - we worked to develop a similar API and a solution compatible with react router v4 (any router really, including next/router). Worth considering react-capture-metrics.

morgs32 avatar Aug 19 '20 22:08 morgs32