Skip to main content
Version: 0.9

User Information

For Single-Page Applications (React, Angular, Vue, Svelte, etc)

import LuciaSDK from 'lucia-sdk';

LuciaSDK.userInfo(user, userInfo);

Example

import LuciaSDK from 'lucia-sdk';

LuciaSDK.userInfo('johndoe@email.com', {
first_name: 'John',
last_name: 'Doe',
contact: '1234456722',
});

For Multi-Page Applications

Auto-initialization (Recommended)

The SDK will automatically initialize when you provide the data-api-key attribute:

<script
src="https://cdn.luciaprotocol.com/lucia-sdk-latest.min.js"
data-api-key="your-api-key-here"
></script>
<script>
LuciaSDK.userInfo(user, userInfo);
</script>

Example

<script
src="https://cdn.luciaprotocol.com/lucia-sdk-latest.min.js"
data-api-key="your-api-key-here"
></script>
<script>
LuciaSDK.userInfo('johndoe@email.com', {
first_name: 'John',
last_name: 'Doe',
contact: '1234456722',
});
</script>

Manual initialization

If you need more control, you can initialize manually:

<script src="https://cdn.luciaprotocol.com/lucia-sdk-latest.min.js"></script>
<script>
LuciaSDK.init({
apiKey: 'your-api-key-here', // Get your API Key from https://ads.clickinsights.xyz
});

LuciaSDK.userInfo('johndoe@email.com', {
first_name: 'John',
last_name: 'Doe',
contact: '1234456722',
});
</script>

Best Practices for LuciaSDK.userInfo

  • Always call LuciaSDK.userInfo immediately after user signup or login.
  • Pass verified identifiers (email or wallet) to ensure consistent identity tracking.
  • Collect wallet addresses and contact data as early as possible to prevent data loss.
  • Regularly update user information to improve attribution accuracy over time.
  • Use LuciaSDK.sendWalletInfo together with userInfo for unified Web2 + Web3 identity tracking.