piwik-react-router
piwik-react-router copied to clipboard
tracking not working
Hi, I have question about this package. I am using react router 4 so I have used the createBrowserhistory to create the history. This is the App.js file
import React from "react";
import { BrowserRouter } from "react-router-dom";
import { createBrowserHistory } from "history";
import Root from "./Root";
import config from "./config";
const PiwikReactRouter = require("piwik-react-router");
const matomoSiteId = config.matomoSiteId ? config.matomoSiteId : 3;
const matomoUrl = config.matomoUrl ? config.matomoUrl : "";
function App() {
const piwik = PiwikReactRouter({
url: matomoUrl,
siteId: matomoSiteId,
});
const history = createBrowserHistory();
return (
<BrowserRouter history={piwik.connectToHistory(history)}>
<Root />
</BrowserRouter>
);
}
export default App;
And in the index.html I am using the Matomo Tag manager and in my Matomo board I have configured a Matomo Analytics tag to track the navigation in my React web App
However we I click on the links in the navigation bar, the page URL is not tracked. Is there anything else I should do?