# analytics-app

`analytics-app` is a React package that provides an easy way to add event listeners to your entire web application. It exports two components: `EventAnalytics` and `encryptData`.

## Installation

To install the package, run:

```bash
npm install analytics-app
Usage
EventAnalytics
Import EventAnalytics in your main App.js file and include it in your app:

javascript
Copy code
import { EventAnalytics } from 'analytics-app';

function App() {
  return (
    <div className="App">
      {/* Your app components */}
      <EventAnalytics />
    </div>
  );
}

export default App;
```

## EventAnalytics will automatically add event listeners to your entire website.

## encryptData

encryptData is a function that takes a string as input and returns an encrypted version of it. You can use it to encrypt sensitive data, such as location information, before passing it to the EventAnalytics component.

Here's an example of how to use encryptData:

```bash
import { encryptData } from 'analytics-app';

// Get the location data as a string
const locationData = JSON.stringify(location);

// Encrypt the location data
const encryptedLocationData = encryptData(locationData);

// Use the encrypted data in your component
return (
  <div
    className="App"
    id="App"
    event-analytics={'app'}
    user-data={encryptedLocationData}
  >
    {/* Your app components */}
  </div>
);
```

# Documentation

For more information and detailed documentation, please visit the GitHub repository.

# License

This package is released under the Acciojob License.
