linky/tracker-package

Linky tracking package for Laravel

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/linky/tracker-package

v1.1.1 2026-02-20 14:16 UTC

This package is auto-updated.

Last update: 2026-02-20 14:16:54 UTC


README

๐Ÿ”— Linky Tracker Package

Automatic Link Visit Tracking & Donation Reporting for Laravel

Laravel PHP License Version

Track visits and donations effortlessly โ€” No JavaScript required!

โœจ Features

  • ๐Ÿš€ Zero-Config Visit Tracking โ€” Automatically tracks all GET requests
  • ๐Ÿ“Š One-Line Donation Reporting โ€” Simple facade for payment tracking
  • โšก Async Processing โ€” Uses Laravel Queue for optimal performance
  • ๐Ÿ”ง Fully Configurable โ€” Customize via environment variables
  • ๐ŸŽฏ No JavaScript โ€” Pure server-side tracking
  • ๐Ÿ”„ Auto-Registered Middleware โ€” Works immediately after installation

๐Ÿ“ฆ Installation

Option 1: Install from GitHub (Recommended)

Add the repository to your project's composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/spectra10008/linky-tracker.git"
        }
    ],
    "require": {
        "linky/tracker-package": "^1.0"
    }
}

Then install via Composer:

composer require linky/tracker-package:^1.0

Option 2: Install from Packagist (Coming Soon)

composer require linky/tracker-package

โš™๏ธ Configuration

1. Publish Configuration File

Publish the config file to customize settings:

php artisan vendor:publish --tag=config

This will create config/linky.php.

2. Environment Variables

Add these variables to your .env file:

LINKY_ENDPOINT=https://linky.sadah.io/api/webhook
LINKY_TOKEN=l76qYiQMpXotwgS6EPU5teFLibROSjXKNlJaChvh

๐ŸŽฏ Usage

Automatic Visit Tracking

No code needed! All GET requests are automatically tracked once the package is installed.

  • โœ… Tracks page visits automatically
  • โœ… Sends data asynchronously via Laravel Queue
  • โœ… No performance impact on your application

Donation Tracking

Report donations with a single line of code:

use Linky;

Linky::donation([
    'referral_code' => 'ABC123',
    'amount' => 500,
    'donor_name' => 'John Doe',
    'donor_email' => 'john@example.com',
    'transaction_id' => 'TXN123456789',
    'payment_method' => 'credit_card',
]);

That's it! No JavaScript, no complex setup โ€” just one line.

๐Ÿ”„ Queue Setup (Recommended)

To ensure tracking doesn't slow down your application:

  1. Configure a queue driver in config/queue.php:

    QUEUE_CONNECTION=database  # or redis
  2. Run migrations (if using database queue):

    php artisan queue:table
    php artisan migrate
  3. Start the queue worker:

    php artisan queue:work

๐Ÿ“‹ Quick Start Guide

Step Command
1. Install composer require linky/tracker-package:^1.0
2. Publish Config php artisan vendor:publish --tag=config
3. Set Environment Add LINKY_ENDPOINT and LINKY_TOKEN to .env
4. Start Queue php artisan queue:work
5. Done! Visits are tracked automatically โœ…

๐Ÿ’ก Example Usage

In Your Controller

<?php

namespace App\Http\Controllers;

use Linky;

class PaymentController extends Controller
{
    public function handlePayment(Request $request)
    {
        // Process payment...
        
        // Track donation (one line)
        Linky::donation([
            'referral_code' => $request->referral_code,
            'amount' => $request->amount,
            'donor_name' => $request->name,
            'donor_email' => $request->email,
            'transaction_id' => $transaction->id,
            'payment_method' => 'stripe',
        ]);
        
        return redirect()->route('thank-you');
    }
}

๐Ÿ› ๏ธ Requirements

  • PHP 7.4 or higher
  • Laravel 8.0 to 12.x
  • Composer

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

Made with โค๏ธ for the Laravel Community

Report Bug ยท Request Feature

```