# Palantics Tracker Helper
A server-side solution that enhances tracking capabilities by handling third-party requests directly from your server, effectively bypassing anti-tracking measures.
While direct integration between the frontend script and tracker server is possible, this helper provides a more robust solution recommended for production environments.
## WordPress Plugin Installation
The WordPress plugin includes the helper functionality integrated into the PHP backend for seamless operation.
1. Copy the contents of the WordPress folder to your WordPress plugins directory
2. Configure the tracker endpoint with your domain in the plugin settings
3. Track click events by either:
- Wrapping elements in the Analysis block
- Using the onclick attribute on elements:
```html
Your content
```
### WordPress Plugin Features
- Automatic configuration of most tracking requirements
- Click event tracking for selected elements
- Class-based automatic tracking (configurable in settings)
- Built-in pageload tracking
> **Note:** If you're using WordPress, your installation is now complete. The remaining sections are only necessary for non-WordPress environments.
## General Helper Installation
For non-WordPress environments, use our general helper service.
### Step 1: Server Setup
```bash
# Clone the repository
git clone https://gitea.karlbreuer.com/karl/palanticshelper.git
cd palanticshelper
# Configure environment
cp example.env .env
```
Edit your `.env` file to set the correct tracking server endpoint, then start the service:
```bash
docker-compose up -d
```
### Step 2: Reverse Proxy Configuration
Configure your reverse proxy to forward tracking requests to the Palantics Helper.
#### NGINX Configuration:
```nginx
location /spur {
proxy_pass http://127.0.0.1:8101;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
```
#### Traefik Configuration:
```yaml
labels:
- "traefik.enable=true"
- "traefik.http.routers.palantics.rule=Host(`yourdomain.com`) && PathPrefix(`/spur`)"
- "traefik.http.routers.palantics.entrypoints=web,websecure"
- "traefik.http.routers.palantics.tls=true"
- "traefik.http.services.palantics.loadbalancer.server.port=8101"
```
### Step 3: Frontend Integration
Add the tracking script from the `script` folder to your site's header.
### Step 4: Implement Event Tracking
Track user interactions by adding the `onclick` attribute to elements:
```html
Your content
```
The tracker automatically collects pageload data without additional configuration.
## Additional Plugins
Support for other platforms is under development. Check back for updates.