React + JavaScript Integration
If your stack is React + JavaScript, follow these steps in the guide, which explains how to integrate Lucia's [SDK](https://www.npmjs.com/package/lucia-sdk).
- Install the SDK
- See this code example
Prerequisites
• A React [Redux] Project
• Lucia Attribution API key found in your dashboard: register at https://ads.clickinsights.xyz/ the domain for Lucia's app dashboard
• Environment variables are configured in your .env file
You have a React Redux app
Initialize
import LuciaSDK from 'lucia-sdk';
LuciaSDK.init({
apiKey: process.env.CLICKINSIGHTS_API_KEY
});
OPTIONAL: You may put a debug URL in the instantiation parameters. This is typical only for internal purposes
import LuciaSDK from 'lucia-sdk';
LuciaSDK.init({
apiKey: process.env.CLICKINSIGHTS_API_KEY,
debugURL: process.env.CLICKINSIGHTS_DEBUG_URL
});
See GitHub reference on our Sandbox [here](https://github.com/ondecentral/ecommerce-client-sdk-example)