Open ujjalacharya opened 4 years ago
Yes, I have this working
@jonfreedman Hey, could you give any example how to get this work with BrowserRouter
?
You need to replace BrowserRouter
with Router
and call createBrowserHistory()
e.g
const history = createBrowserHistory();
const matomo = PiwikReactRouter({
clientTrackerName: 'matomo.js',
serverTrackerName: 'matomo.php',
siteId: matomoSiteId,
url: matomoUrl
});
return (
<Router history={matomo.connectToHistory(history)}>
<YourApp />
</Router>
);
@jonfreedman Thanks a lot for your answer ! I managed to get the same solution, but thanks again for your response :)
does it support react-router-dom@5+