script-react
v1.2.4
Published
Readix Ads Analytics
Readme
DOMChangeListener Package
The DOMChangeListener package tracks user interactions on a React application by monitoring DOM changes and key HTML patterns. It helps in capturing user actions and sending analytics data based on predefined criteria.
How It Helps
DOMChangeListener is designed to:
- Monitor changes in the DOM such as page navigations and dynamic content updates.
- Detect specific patterns in the HTML like order confirmations or payment successes.
- Capture important user interaction data and send it to your backend for analytics and tracking purposes.
Usage
Installation
Install the package via npm:
npm install script-react
Import {DOMChangeListener} in your parent component file and use it as shown below for React Project:
import { DOMChangeListener } from 'script-react';
const App = () => {
return (
<div>
<DOMChangeListener brandId="react-brand-id" />
<OtherComponent/>
</div>
);
};
Import RadixAnalytics in your parent component file and use it as shown below for Nextjs Project:
import { RadixAnalytics } from 'script-react';
const App = () => {
return (
<div>
<RadixAnalytics brandId="nextjs-brand-id" />
<OtherComponent/>
</div>
);
};
