Page View
For Single-Page Applications (React, Angular, Vue, Svelte, etc)
import LuciaSDK from 'lucia-sdk';
LuciaSDK.pageView('PAGE-NAME');
Example
import LuciaSDK from 'lucia-sdk';
LuciaSDK.pageView('home');
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.pageView('PAGE-NAME');
</script>
Example
<script
src="https://cdn.luciaprotocol.com/lucia-sdk-latest.min.js"
data-api-key="your-api-key-here"
></script>
<script>
LuciaSDK.pageView('home');
</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.pageView('home');
</script>