Download the PHP package wp-media/wp-mixpanel without Composer

On this page you can find all versions of the php package wp-media/wp-mixpanel. 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 wp-mixpanel

WP Mixpanel

A library for integrating Mixpanel analytics into WordPress projects of Group.One.

Overview

WP Mixpanel provides seamless integration between WordPress and Mixpanel, allowing you to track events in your WordPress projects.

Installation

Via Composer

Add the package to your project using Composer:

Configuration

The library is composed of 3 main classes:

Initialize the Tracking class alone

The $mixpanel_token is the token provided by Mixpanel corresponding to the project you want to send data to.

For Group.One, we have a sandbox project and a production project.

The $options parameter is an optional array which can be used to configure further the Mixpanel PHP library configuration.

Initialize the TrackingPlugin in a WordPress plugin

Initialize the Optin class

Usage Examples

Track a simple event without optin

Calling identify() is required to associate sent events with a user ID. The $user_id provided is automatically hashed with the appropriate algorithm.

The track() method takes 2 required arguments:

Track an event with optin check in a plugin

The track() method of the TrackingPlugin class is a bit different than its parent:

First, it takes an additional optional parameter $event_capability. By default, the capability required for all events is manage_options. This can be changed in two different ways:

Second, the method will automatically associate the following properties to the event:

wp_mixpanel_event_capability Filter usage

The filter can takes 3 arguments:

Request behaviour

Events are sent with wp_remote_post() when the in-memory queue is flushed. Requests are non-blocking with a 1 second timeout, and neither value is filterable or configurable: analytics must never delay a response.

Two details are worth knowing:

A failed request is reported through the consumer's error callback and then dropped, not retried, because the producer's retry-on-flush behaviour would multiply the cost of an unreachable endpoint.

Read more about MixPanel at group.one

More information about how MixPanel is used at group.one is available in our internal documentation.


All versions of wp-mixpanel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
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 wp-media/wp-mixpanel contains the following files

Loading the files please wait ...