Links statistics & link tracking for laravel 5, It tracks down browsers, operating systems, languages and more

Related tags

Laravel Links
Overview

Links

Links statistics for laravel 5

StyleCI StyleCI StyleCI

Links Logo

Sample 1

Sample 2

Sample 3

Sample 4

Table Of Contents

Installation

To install charts use composer

Download

composer require consoletvs/links

Add service provider & alias

Add the following service provider to the array in: config/app.php

ConsoleTVs\Links\LinksServiceProvider::class,

Add the following alias to the array in: config/app.php

'Links' => ConsoleTVs\Links\Facades\Links::class,

Publish the assets

php artisan vendor:publish

Migrate

php artisan migrate

Configuration

Default Settings

The file in: config/links.php contains an array of settings, you can find the default settings in there.



return [
    /* Middleware that will be applied to the statistic pages */
    'middleware' => ConsoleTVs\Links\Middleware\LinksMiddleware::class,

    /* Password to use if ConsoleTVs\Links\Middleware\LinksMiddleware is beeing used */
    'password' => 'LinksRocks',

    /* The views layout */
    'layout' => 'links::template',

    /* The route prefix, will be applied to all of the routes. */
    'prefix' => 'links',
];

You should now modify the password if you're willing to use the default middleware.

The Middleware

The middleware is applied to the statistics page, this middleware can be changed and you're able to apply your own access rules.

Default: ConsoleTVs\Links\Middleware\LinksMiddleware::class

The default middleware requires a simple password to login.

The Password (Only with the default middleware)

The password needs to be set if you are using the default middleware. This will allow you to login.

Default: LinksRocks

The Layout

The layout can be changed, but the current pages are designed using Bootstrap 4 keep that in mind.

Default: links::template

The prefix

The prefix will be used in all of the routes. It determines the root of all the routes of the package.

Default: links

Usage

Create Links

To create links, go in the view where you want to add a traked link and instead of using the typical url operations:

{{ url('http://google.com') }}
{{ route('google') }}

Use the package facade:

{{ Links::url('http://google.com') }}
{{ Links::route('google') }}

Track Pages

if you want to track down the current page, simply do this:

Note: It uses jQuery!

// If jQuery .js is already included and you don't want conflits:
{!! Links::track() !!}

// If jQuery .js is not included in your view, this will also add it.
{!! Links::track(true) !!}

Quick tip: Adding the track to the views layout will track all pages using that layout once visited!

View the statistics

To view all the links statistics go to the root of the package (the prefix). The default prefix is: links.

Once you are inside the links app. You'll need to login if you're using the default mdiddleware. The default password is: LinksRocks

Once you're in the web app, you're ready to explore the statistics.

Comments
  • Problem with laravel 5.4

    Problem with laravel 5.4

    Hi, I hope you can help me to use this package with Laravel 5.4....I have tested with Laravel 5.3.30 and there aren't problems....but when I try to use in my project ( laravel 5.4) the url -> 'links' gives this error: ReflectionException in Container.php line 719: Class links.middleware does not exist in Container.php line 719 at ReflectionClass->__construct('links.middleware') in Container.php line 719 at Container->build('links.middleware') in Container.php line 598 at Container->resolve('links.middleware') in Container.php line 567 at Container->make('links.middleware') in Application.php line 708 at Application->make('links.middleware') in Pipeline.php line 138 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing{closure}(object(Request)) in SubstituteBindings.php line 41 at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 148 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing{closure}(object(Request)) in VerifyCsrfToken.php line 65.........................

    Can you help me to find a solution? Thanks

    opened by cgtaurino 3
  • Allow for delay of writing Link views to DB by using queues

    Allow for delay of writing Link views to DB by using queues

    You could create a queue job to write the Link data to the database rather than writing it immediately and then trigger the queue job.

    Most users set their queue driver to 'sync' but if someone sets up a proper queue listener, it'll allow for deferred database writes.

    opened by DeftNerd 1
  • Track current authenticated user ID

    Track current authenticated user ID

    The Links::track() feature built into a default layout is very valuable but I think it would be awesome if it could optionally associate the entry with a User model object.

    In the migration table, you can add a user_id field that's nullable and if the user is logged in, fill in the user_id using Auth::user()->id as long as Auth::check() returns TRUE.

    That way you can log all the access that occurs, but if a user is logged into a web app, it'll associate the log entry with the user. The Link model could even have the relationship created so it's easy to associate with the default Users model.

    opened by DeftNerd 1
  • Update Link.php to support sites behind Cloudflare

    Update Link.php to support sites behind Cloudflare

    Sites behind Cloudflare can access the IP address of the visitor by looking for a HTTP_CF_CONNECTING_IP header.

    Cloudflare does set the HTTP_X_FORWARDED_FOR header, but if the visitor is behind a Proxy themselves, it starts getting weird and hard to parse. The HTTP_CF_CONNECTING_IP header is the easiest way.

    If there is an "X-Forwarded-For" header present in the request, CloudFlare will append the client's IP to its value, as the last in the list.
    
    "X-Forwarded-For: A.B.C.D[,X.X.X.X,Y.Y.Y.Y,]"
    
    where A.B.C.D is the client's IP address, also known as the original visitor IP address. X.X.X.X and Y.Y.Y.Y in this example are IP addresses along the route in the header value.
    

    From https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-CloudFlare-handle-HTTP-Request-headers-

    opened by DeftNerd 1
  • Problem with Chart version 5

    Problem with Chart version 5

    Why links does not work with Chart version 5 ?

    Problem 1
        - consoletvs/links 1.0.3 requires consoletvs/charts 2.* -> no matching package found.
        - consoletvs/links 1.0.2 requires consoletvs/charts 2.* -> no matching package found.
        - consoletvs/links 1.0.1 requires consoletvs/charts 2.* -> no matching package found.
        - consoletvs/links 1.0 requires consoletvs/charts 2.* -> no matching package found.
        - consoletvs/links 1.0.3 requires consoletvs/charts 2.* -> no matching package found.
        - Installation request for consoletvs/links ^1.0 -> satisfiable by consoletvs/links[1.0, 1.0.1, 1.0.2, 1.0.3].
    
    opened by xembill 1
Releases(1.0.3)
Owner
Erik C. Forés
ICT Systems Engineer. Senior developer with years of experience on the web. I build and maintain a lot of libraries, frameworks and a programming language.
Erik C. Forés
This package tracks if products exist in Magento by storing the status locally in the DB.

Magento Products This package tracks if products exist in Magento by storing the status locally in the DB. We developed this to prevent multiple calls

JustBetter 14 Nov 11, 2022
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Jan 2, 2023
Log requests and group together for aggregated statistics of route usage

Log Laravel route usage statistics Log Laravel requests and responses for statistical purposes and optionally aggregate by hours/days/months for minim

Bilfeldt 108 Dec 11, 2022
A Laravel Statistics SDK

laravel-statistics shanjing laravel-statistics是一个基于 laravel 开发而成的统计工具,只需很少的代码即可快速构建出一个功能完善的统计模块。开箱即用,对后端开发者非常友好。 功能特性 简洁优雅 API 当缺失对应日期的数据时,自动补充 0 作为默认

青岛山景信息技术有限公司 2 Dec 14, 2022
An issue tracking tool based on laravel+reactjs for small and medium-sized enterprises, open-source and free, similar to Jira.

ActionView English | 中文 An issue tracking tool based on php laravel-framework in back-end and reactjs+redux in front-end, it's similar to Jira. You co

null 1.7k Dec 23, 2022
Add internal link to your published assets.

WORK IN PROGRESS, some functionalities may be changed in the future. Add internal link to your published assets. Installation You can install the pack

Kaqaz Studio 1 Aug 9, 2022
Get estimated read time of an article. Similar to medium.com's "x min read". Multilingual including right-to-left written languages. Supports JSON, Array and String output.

Read Time Calculates the read time of an article. Output string e.g: x min read or 5 minutes read. Features Multilingual translations support. Static

Waqar Ahmed 8 Dec 9, 2022
A simple Laravel package for generating download links with options such as expire time, IP restrictions, etc.

Generate download links in your Laravel applications This package allows you to generate download links for files. Once installed you can do stuff lik

Arman Ahmadi 12 Nov 24, 2022
undefined is an issue tracking product that allows agile project management.

undefined is an issue tracking product that allows agile project management. Our goal is to make work life simpler, more efficient and stress-free. In

Osvaldas Ulevičius 3 Jun 27, 2021
Admin Order Product Links

JBrada/AdminOrderProductLinks A simple module adds a navigation link between order, shipment, invoice and credit memo items and its related products.

Jiří Brada 0 Apr 17, 2022
Log executed Laravel SQL queries and their line number and more

A lightweight laravel package for logging executed SQL queries, line number and more

Md.Harun-Ur-Rashid 31 Dec 21, 2022
Laravel Setting - Easily save, update and get titles, descriptions, and more. it is very easy to use.

Laravel Setting Easily save, update and get titles, descriptions, and more. it is very easy to use. This is great for storing and receiving general si

Ali Ranjbar 2 Aug 23, 2022
Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries.

Laravel Countries Laravel Countries is a bundle for Laravel, providing Almost ISO 3166_2, 3166_3, currency, Capital and more for all countries. Please

Christoph Kempen 695 Dec 30, 2022
Laravel Livewire (TALL-stack) form generator with realtime validation, file uploads, array fields, blade form input components and more.

TALL-stack form generator Laravel Livewire, Tailwind forms with auto-generated views. Support Contributions Features This is not an admin panel genera

TinaH 622 Jan 2, 2023
A quiz application with laravel 8, spatie permissions, livewire, jetstream, chartjs, tailwindcss and more!

Todo Currently busy with some other important things, will definately would like to imporove the app with 1. Multiple choices selection and mapping to

Baig 67 Nov 21, 2022
Manage your staff from one place. Featuring Staff leave management 🏖, payslips 💵 generation & emailing, messaging 📨and more 🛠! Built with ❤️ with Laravel

Staff Management System This little buddy can help you manage your staff database! Built with ?? with Laravel #FEATURES 1 Staff management/ database S

Ezekiel Oladejo 45 Jan 3, 2023
🕵️ Inspect Laravel Eloquent models to collect properties, relationships and more.

??️ Eloquent Inspector Inspect Laravel Eloquent models to collect properties, relationships and more. Install Via Composer composer require cerbero/el

Andrea Marco Sartori 111 Nov 4, 2022
A Laravel Admin Starter project with Page Builder, Roles, Impersonation, Analytics, Blog, News, Banners, FAQ, Testimonials and more

Laravel CMS Starter Project A Laravel CMS Starter project with AdminLTE theme and core features. Preview project here User: [email protected]

Ben-Piet O'Callaghan 306 Nov 28, 2022
webtrees module: enhanced clippings cart with more functions to add records to the clippings cart and to start actions on these records

webtrees module hh_clippings_cart_enhanced !!! This is an alpha version! Do not use it in a productive webtrees system! !!! This webtrees custom modul

Hermann Hartenthaler 1 Sep 18, 2022