Download the PHP package sstottelaar/pirsch-statamic-addon without Composer

On this page you can find all versions of the php package sstottelaar/pirsch-statamic-addon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pirsch-statamic-addon

Pirsch Statamic Addon

Seamlessly integrate Pirsch Analytics into your Statamic site with a focus on privacy and server-side tracking.

Features

Requirements

Installation

  1. Install the addon using Composer:

  2. (Optional) Publish the configuration file if you need to customize default settings (like excluded domains):

    This creates a config/pirsch.php file. Using .env variables is generally preferred for credentials.

Configuration

  1. Get your Pirsch Access Key:

    • Log in to your Pirsch dashboard.
    • Go to Settings -> Integration.
    • Ensure the correct domain/website is selected (top right).
    • Scroll down to the "Clients" section and click Add Client.
    • Select the Access Key (write-only) type.
    • Give the client a descriptive name (e.g., "Statamic Production Site").
    • Copy the generated Client Secret (this is your token).
  2. Add the Token to your Environment: Open your .env file and add the copied token:

    • Important: Make sure to add this variable to your production .env file as well.
    • Tip: Leave the PIRSCH_TOKEN variable empty or unset in non-production environments (like local or staging) to automatically disable tracking there.

How it Works

Once installed and configured with a valid PIRSCH_TOKEN, the addon automatically starts tracking pageviews on every request using Pirsch's server-side tracking capabilities. No further setup is needed for basic tracking.

This addon handles pageviews server-side, eliminating the need for the Pirsch JavaScript snippet for core tracking. Manually add the snippet only if you specifically require client-side event tracking via JavaScript.

Usage

Basic Pageview Tracking

Automatic, no action required after configuration.

Event Tracking (Antlers)

Use the provided Antlers tag in your templates to track custom events:

Example with meta data:

Never send Personally Identifiable Information (PII) or any sensitive user-specific data in the event metadata. You are responsible for ensuring compliance with privacy regulations (like GDPR). Use the metadata feature cautiously and at your own risk. For best practices, consult the Pirsch Event Documentation.

Dashboard link

Pirsch has the ability to create access links. To create an access link:

  1. Log in to your Pirsch dashboard.
  2. Go to Settings -> Access.
  3. Scroll down to the Access Links section
  4. Add a new access link and copy the link
  5. Open your .env file and the follow:

Roadmap

Issues

If you experience any issues, please make a GitHub issue or contact me at sjoerdstottelaar.nl

Contributing

Contributions are welcome! Please create an issue or submit a pull request.

License

This project is licensed under the MIT License.


All versions of pirsch-statamic-addon with dependencies

PHP Build Version
Package Version
Requires statamic/cms Version ^5.0
pirsch-analytics/laravel-pirsch Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sstottelaar/pirsch-statamic-addon contains the following files

Loading the files please wait ....