Installation
Get started with Lamion by creating a new project or adding it to an existing application.
Browser project
1. Add script to end of html or head tag
<script src="https://unpkg.com/@lamion-libs/impl/dist/bundle.js"></script>
2. Init library (do not forget replace placeholder with your access key!)
const { logEvent } = useBrowserLamion({
accessKey: "YOUR_ACCESS_KEY_HERE",
});
NPM project
Lamion is also available as npm package.
1. Install lamion
npm i @lamion-libs/impl --save
2. Add imports
import { useBrowserLamion } from "@lamion-libs/impl";
3. Init logger
const { logEvent } = useBrowserLamion({
accessKey: "YOUR_ACCESS_KEY_HERE",
});
When using webpack you also can extract token to env.