services-app
v1.0.2
Published
This project is a React application that integrates CleverTap for user engagement and analytics. It provides a simple setup to track user events and manage user profiles.
Downloads
8
Readme
My React CleverTap App
This project is a React application that integrates CleverTap for user engagement and analytics. It provides a simple setup to track user events and manage user profiles.
Project Structure
my-react-clevertap-app
├── public
│ └── index.html # Main HTML file for the React application
├── src
│ ├── App.js # Main component of the React application
│ ├── clevertap.js # CleverTap configuration and initialization
│ └── index.js # Entry point of the React application
├── package.json # npm configuration file
└── README.md # Project documentationSetup Instructions
Clone the repository:
git clone https://github.com/your-repo/my-react-clevertap-app.git cd my-react-clevertap-appInstall dependencies:
npm installAdd CleverTap SDK: Make sure to include the CleverTap SDK in your
package.jsondependencies. You can install it using:npm install clevertap-react-nativeConfigure CleverTap: Update the
src/clevertap.jsfile with your CleverTap account details.
Usage
Start the application:
npm startOpen your browser and navigate to
http://localhost:3000to see the application in action.
Example Usage
In src/App.js, you can track events and user profiles using the functions exported from src/clevertap.js. For example:
import { trackEvent, setUserProfile } from './clevertap';
// Track an event
trackEvent('Button Clicked', { buttonName: 'Sign Up' });
// Set user profile
setUserProfile({ Name: 'John Doe', Email: '[email protected]' });License
This project is licensed under the MIT License.
