From 78ab65fccfbe33ad8e6c2d2020b197ce34da8cf3 Mon Sep 17 00:00:00 2001 From: Karl Breuer Date: Sun, 13 Apr 2025 18:21:33 +0200 Subject: [PATCH] better README --- README.md | 70 ++++++++++++++++++++++++++++++----------- script/trackscript.html | 1 + 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 6323a9f..6edfe4e 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,58 @@ # Palantics Tracker Helper -A tool that counters anti-tracking measures by removing third-party requests. Your server will do the requests instead. +A server-side solution that enhances tracking capabilities by handling third-party requests directly from your server, effectively bypassing anti-tracking measures. -This is the recommended way to setup palantics. But only using the frontend script with the tracker server directly does work as well :) +While direct integration between the frontend script and tracker server is possible, this helper provides a more robust solution recommended for production environments. -## Installation +## WordPress Plugin Installation -### 1. Copy or clone this repo to your server +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 and make sure you use the correct tracking server. +Edit your `.env` file to set the correct tracking server endpoint, then start the service: ```bash docker-compose up -d ``` -### 2. Update your Reverse Proxy config +### Step 2: Reverse Proxy Configuration -Configure your reverse proxy to catch requests and forward them to Palantics Helper. +Configure your reverse proxy to forward tracking requests to the Palantics Helper. -Remember to set the PORT correctly to match your .env PORT. - -#### NGINX: +#### NGINX Configuration: ```nginx location /spur { @@ -36,10 +64,9 @@ location /spur { } ``` -#### Traefik: +#### Traefik Configuration: ```yaml -# Traefik configuration labels: - "traefik.enable=true" - "traefik.http.routers.palantics.rule=Host(`yourdomain.com`) && PathPrefix(`/spur`)" @@ -48,15 +75,20 @@ labels: - "traefik.http.services.palantics.loadbalancer.server.port=8101" ``` -### 3. Update Global Server Config +### Step 3: Frontend Integration -In the global server config in your frontend, replace the tracker endpoint with your own domain: +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
``` -INSTEAD of your tracker endpoint `https://tracking1.karlbreuer.com` \ No newline at end of file +The tracker automatically collects pageload data without additional configuration. + +## Additional Plugins + +Support for other platforms is under development. Check back for updates. \ No newline at end of file diff --git a/script/trackscript.html b/script/trackscript.html index 8c334f8..3832925 100644 --- a/script/trackscript.html +++ b/script/trackscript.html @@ -1,4 +1,5 @@ +