1

I have a requirement to use countly for analytics in a React.js web app. The is built using React.js, react-router-dom, redux, saga, material.ui.

The countly provides an SDK for web analytics. https://support.count.ly/hc/en-us/articles/360037441932-Web-analytics-JavaScript-

I could not find any effective way or package until now.

Anyone who has used the countly please help to answer.

Thanks in advance.

Asif vora
  • 3,163
  • 3
  • 15
  • 31
Manish
  • 161
  • 1
  • 2
  • 7

1 Answers1

0

Please refer to this sample application in react which has the countly web sdk integration. To integrate the countly web sdk in your application, you would first have to install the countly-sdk-web module in your repo. You can then initialize countly in your index.js file like this. For url tracking, please include this Location component in your repo and use it within the router component like this.

Incase you are not using function components and hooks, the sample application shared above also contains the example of the countly SDK integration with class based components.

  • The link is not up-to-date - sample can be found there https://github.com/Countly/countly-sdk-web/tree/master/examples/react – Pixello Aug 20 '22 at 08:55