React + JavaScript
If your stack is React + JavaScript, follow these steps in the guide which explains how to integrate Lucia's 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 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