Installing GStatus #
Setting up GStatus is quick and straightforward. Follow the steps below to integrate GStatus into your project.
Step 1: Download the Library #
You can add GStatus to your project using a package manager or directly include it via CDN.
Option 1: Using npm #
npm install gstatus --save
Option 2: Using the cdn #
<script src="https://cdn.gstatus.org/lib/latest/gstatus.min.js"></script>
Step 2: Initialize GStatus #
Once installed, initialize GStatus with your Site ID. This unique identifier is required to start tracking.
Add the following snippet to your HTML or JavaScript file:
GStatus.init({ siteId: ‘YOUR_SITE_ID’, anonymizeIp: true, // Enable IP anonymization enableHeatmaps: true // Enable heatmaps });
Step 3: Verify Installation
To confirm that GStatus is working:
Open your website in a browser.
Check the browser console for any errors.
Verify that analytics data is being sent (you can use network tools like Chrome DevTools).
That’s it! You’re ready to start collecting privacy-first analytics data.
3. content/getting-started/configuration.md
#
---
title: "Configuration"
description: "Learn how to customize GStatus settings to fit your website's needs."
keywords: ["GStatus configuration", "customize analytics", "privacy settings"]
---
# Configuring GStatus
GStatus offers flexible configuration options to suit your specific needs. Below are some of the key settings you can adjust.
---
## Key Configuration Options
### 1. Anonymize User Data
To comply with privacy regulations, you can anonymize user data by enabling this option:
```javascript
GStatus.init({
anonymizeIp: true
});
2. Enable or Disable Heatmaps #
Heatmaps provide a visual representation of user engagement. To enable or disable heatmaps:
GStatus.init({
enableHeatmaps: true // or false
});
3. Custom Events Tracking #
Track specific user actions (e.g., button clicks, form submissions) by sending custom events:
GStatus.trackEvent('button_click', {
buttonId: 'cta-button',
page: '/home'
});
4. API Endpoint Configuration #
If you host your GStatus data locally, specify the API endpoint:
GStatus.init({
apiEndpoint: 'https://your-custom-domain/api'
});