PHPackages                             stickleapp/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. stickleapp/core

ActiveLibrary

stickleapp/core
===============

This is my package stickle core

01.7k↓44.4%[6 PRs](https://github.com/stickleapp/core/pulls)PHPCI passing

Since Oct 20Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/stickleapp/core)[ Packagist](https://packagist.org/packages/stickleapp/core)[ RSS](/packages/stickleapp-core/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (10)Used By (0)

PRE-RELEASE SOFTWARE
====================

[](#pre-release-software)

This software is not ready to be used. Contact me .
-------------------------------------------------------------------------

[](#this-software-is-not-ready-to-be-used-contact-me-dclaysmithgmailcom)

Stickle is a package for Laravel that helps you analyze--and interact with--your customer base.

[![Latest Version on Packagist](https://camo.githubusercontent.com/d73255ffd222200f19b3fd813def3663ab9ad6ce91f8c5026dc0d5abf09e996f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737469636b6c656170702f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stickleapp/core)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e82e48bebdbe0f83649b41320c2e79505ecb7bc8841f2c5bbb1d043b4ab3cbf7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737469636b6c656170702f636f72652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/stickleapp/core/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/9826708c2f5c6dd65f12c22787354cf9edcaa885156e33539009adc6d0d6f856/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737469636b6c656170702f636f72652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/stickleapp/core/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0d31e8462ada67ba61c2f37a84e090a4a09131eed44434e1b64682b235380881/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737469636b6c656170702f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stickleapp/core)

Use Cases
=========

[](#use-cases)

Stickle allows you to embed customer analytics and engagement functionality in your Laravel application. Use it to:

- Build real-time customer analytics dashboard;
- Trigger Laravel notifications based on end-user behavior;
- Highlight important customer behavior in your admin panel;
- Segment your customer base to identify high value or at-risk customers in realtime.

Stickle Apps allow you to do even more.

Stickle Core
============

[](#stickle-core)

Stickle Core is the foundation of Stickle that:

- Tracks user attributes and behavior via a Javascript tracking code;
- Logs authentication events;
- Logs changes in model attributes;
- Logs user-defined server-side events;
- Exposes Eloquent methods for querying your customers;
- Exposes a REST API for ingesting events from other channels (Mobile, etc);
- Provides the ability to define customer segments 'as-code' and track these segments over time.

Stickle Apps
============

[](#stickle-apps)

Stickle Apps extend the funtionality of Stickle Core. Anyone can write a Stickle app but we'll provide some first-party apps to get people started.

Getting Started
===============

[](#getting-started)

Requirements
------------

[](#requirements)

Stickle requires:

- PHP 8.3+
- Laravel 11.0+.

Installation
------------

[](#installation)

You may use Composer to require Stickle into your PHP project:

```
composer require stickleapp/core

```

You may install Stickle into your Laravel project using the following command:

```
php artisan install:stickle

```

The installer will guide you through the setup process helping you set configuration options for your project. You can specify:

- If you want to install the Stickle JS SDK and track client events;
- If you want to track events raised by Illuminate\\Auth events;
- If you want to track each authenticated event via middleware; and
- How you define the relationships between `Users` and `Groups` in your application.

Running Migrations
------------------

[](#running-migrations)

After you have specified your configuration options in the installation script, run migrations:

```
php artisan migrate

```

Initialization
--------------

[](#initialization)

When complete you can run Stickle with the following command:

```
php artisan run:stickle

```

This command will does the following:

- activates cron tasks;
- activates websockets server (if applicable).

You can access a test page at the URL specified in the terminal.

Advanced Configuration
======================

[](#advanced-configuration)

Stickle will work out of the box using the configuration options specified during the installation process. You can override these (and several other) options in the `config\stickle.php` file.

Database Options
----------------

[](#database-options)

You can specify the following configuration options:

- `connection`. (Defaults to `DB_CONNECTION` env value) This connection should contain the tracked models.
- `tablePrefix`. (Default `lc*`) This will be prepended to the tables created by the migrations.

Sync Schedule
-------------

[](#sync-schedule)

Stickle runs several jobs to transform your data. You can update the frequency that these jobs run:

- `ExportSegments`. (Default Every 360 minutes).
- `RecordSegmentStatistics`. (Default Every 360 minutes).
- `RecordEntityStatistics`. (Default Every 360 minutes).
- `RollupEvents`. (Default Every 360 minutes).
- `RollupPageViews`. (Default Every 360 minutes).
- `RollupSessions`. (Default Every 360 minutes).

Customer Models
---------------

[](#customer-models)

- `User`. By default, Stickle assumes the `App\Models\User` class is the user responsible for authentication events. You can override this class.
- `Group`. You can **optionally** specify a Group class that represents a real world company, account, organization, etc. that a `User` belongs to.
- `Relationship`. You should specify the relationship between the `Group` and the `User`. By default, the relationship is `Illuminate\Database\Eloquent\Relations\HasMany` meaning each `Group` has zero or more `Users` objects. Other options include:
    - `Illuminate\Database\Eloquent\Relations\HasOne`. Each `User` belongs to one `Group` and each `Group` has exactly one `User`.
    - `Illuminate\Database\Eloquent\Relations\BelongsToMany`. Each `User` can belong to zero or more `Groups` and each `Group` can have have zero or more `Users`.
- `Payment`. You can **optionally** specify a Payment model that represents a payment made by a StickleEntity model to your organization.

Tracking Options
----------------

[](#tracking-options)

Stickle can track requests and events on the server and on the client. There are several configuration options that determine the behavior of each method:

### Server

[](#server)

- `loadMiddleware`. Default `true`. When `true`, Stickle loads middleware during the Package Service Provider's `boot` method.
- `trackAuthenticationEvents`. Default `true`. Automatically log all authenticated `Illuminate\Auth` events.
- `trackRequests`. Default `true`. Automatically track all authenticated requests made in the application.

### Client

[](#client)

- `loadMiddleware`. Default `true`. When `true`, Stickle injects a tracking code via middleware during the Package Service Provider's `boot` method.
- `trackPageViews`. Default `true`. When `true`, the Javascript tracking code will listen for pushState changes and record a pageview for each.
- `routePrefix`. Default `''`. Tracking events are sent to the `/request` endpoint by default. If you move this endpoint to a different location, update `routePrefix` to reflect this location.

Paths
-----

[](#paths)

Where to autoload `Segments` (ActiveAccounts.php) and export them. Where to autoload `Listeners`Where to autoload `Playbooks` (ActiveAccounts.php) and export them (Move to =&gt; Stickle Playbooks)

Changelog
=========

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
============

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
========================

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
=======

[](#credits)

- [D Clay Smith](https://github.com/dclaysmith)
- [All Contributors](../../contributors)

License
=======

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance58

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c6d72dca8affdd1c7cfffd77c80fdffd3480ab9b734b7ddbd288ef98cc913aa?d=identicon)[dclaysmith](/maintainers/dclaysmith)

---

Top Contributors

[![dclaysmith](https://avatars.githubusercontent.com/u/226740?v=4)](https://github.com/dclaysmith "dclaysmith (166 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/stickleapp-core/health.svg)

```
[![Health](https://phpackages.com/badges/stickleapp-core/health.svg)](https://phpackages.com/packages/stickleapp-core)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
