Download the PHP package castrocrea/mixpanel-bundle without Composer

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

CarstrocreaMixpanelBundle

Build Status

Integration of the Mixpanel library into Symfony.

Installation

Require gordalina/mixpanel-bundle using composer

Or require gordalina/mixpanel-bundle to your composer.json file:

Register the bundle in config/bundles.php:

Enable the bundle's configuration in app/config/config.yml:

Usage

This bundle registers a castrocrea_mixpanel.default, mixpanel.default and mixpanel service which is an instance of Mixpanel (from the official library). You'll be able to do whatever you want with it.

NOTE: This bundle sends your client's ip address automatically. If you have a reverse proxy in you servers you should set it in your front controller public/index.php:

You can find more documentation on Symfony website: How to Configure Symfony to Work behind a Load Balancer or a Reverse Proxy

Killer Feature

Track an event with a single annotation

Sending people information to Mixpanel

Mixpanel allows you to track your user's behaviours, but also some user information. When using annotations which require the distinct_id, this will be set automatically. This is done automatically provided you have configured it properly. You are able to override this value if you wish.

This bundle uses property access to get the values out of the user object, so event if you dont have a first_name property, but have a getFirstName method it will work.

NOTE: extra_data corresponding non-default properties in Mixpanel user profile

In the following example, we call UpdateUser, which sends all information registered in the configuration above, but we override the id property with an expression that evaluates the user id. The @Expression annotation uses ExpressionLanguage for evaluation.

Annotations

Mixpanel Actions

Events

Engagement

Custom Annotations

Note: The first argument is not required to specify the name explicitly, e.g: @Mixpanel\Expression("<expression>") or @Mixpanel\Set("<property>", value="<value>").

Note: All id properties can be omitted, as they will be set with the id of the current user in security.context

Send an event based on a condition

In all annotations, you can add conditions with Expression Language

Note: By default condition is true and is not required.

MixpanelEvent

You can also send an event through symfony events when the annotations are not sufficient like this:

Override Props in all Annotations

In all your annotations, you can have something like this:

It can be annoying to always have to put the same properties in your annotations. The functioning of the events allows us to avoid that.

And in your config:

Symfony Profiler Integration

Mixpanel bundle additionally integrates with Symfony2 profiler. You can check number of events and engagements sent, total execution time and other information.

Example
Toolbar

Reference Configuration

You'll find the reference configuration below:

Spec

In order to run the specs install all components with composer and run:

License

This bundle is released under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE


All versions of mixpanel-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2
symfony/framework-bundle Version ^4.4 || >=5.0
symfony/expression-language Version ^4.4 || ^5.0
symfony/security-http Version ^4.4 || ^5.0
symfony/http-kernel Version ^4.4.13 || ^5.1.5
mixpanel/mixpanel-php Version ~2.8
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 castrocrea/mixpanel-bundle contains the following files

Loading the files please wait ....