See API Docs for Log-Harvestor.
This package is specific to browsers
. Please see our docs for other supported languages and frameworks, or use standard HTTP requests.
This package requires that you have a Log Harvestor account, and Forwarder's created. If you have not done this yet:
- Go to LogHarvestor.com
- Register for a new Account (This is free) Register
- Create a new Forwarder - Link
- Generate a Forwarder Token
Now you can use this forwarder token to send logs, by adding providing the token to the script like this.
<script data-fwd-token="YOUR_TOKEN_HERE" type="module" src="https://unpkg.com/log-harvestor-web@latest" id="log-harvestor" defer></script>
If you're adding Log Harvestor via Google Tags, add the following script:
<script data-fwd-token="YOUR_TOKEN_HERE" type="text/javascript" src="https://unpkg.com/log-harvestor-web@latest" id="log-harvestor" defer></script>
key | type | description |
---|---|---|
data-fwd-token | string | A token that you have created for your forwarder |
data-api-url | string | The url that the logs are being sent to Development purposes |
data-debug | string | Logs all the events to the console Development purposes |