Coder Social home page Coder Social logo

KISSmetrics for PHP

Build Status

KISSmetrics PHP client that doesn't overuse the singleton pattern and has a slightly better API and no built-in cron support (that's a feature). Here's how to use it:

$km = new KISSmetrics\Client('API key', KISSmetrics\Transport\Sockets::initDefault()); // Initialize

$km->identify('[email protected]')   // Identify user (always)
  ->alias('old-anonymous-cookie')  // Alias to previously anonymous user, maybe
  ->set(array('gender' => 'male')) // Set some property
  ->record('Viewed thing');        // Record an event, optionally with properties

$km->submit(); // Submit all that to KISSmetrics in one go

In case of errors this thing throws a KISSmetrics\ClientException so if you have a fire-and-forget attitude to these metrics just try/catch those. Though it's helpful when you want to make sure everything is setup correctly!

Composer

{
  "require": {
    "kissmetrics/kissmetrics-php": "~0.4.2"
  }
}

License

Licensed under the MIT license.

Eugen Rochko's Projects

andstatus icon andstatus

Low traffic social networking client with tree-like threaded conversations. For Android

awesome-selfhosted icon awesome-selfhosted

This is a list of Free Software network services and web applications which can be hosted locally. Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

baron icon baron

Baron is a WebRTC-based IM for the browser

blurhash icon blurhash

Encode an image as a small string that can be saved in the database, returned in API responses, and displayed as a blurred preview before the real image loads

boost-bot icon boost-bot

Mastodon bot that boosts all local toots with a chosen hashtag.

capture icon capture

Open-source quick screen grabbing tool in Python

cl2irc icon cl2irc

TheColorless.net chat to IRC proxy

cobalt icon cobalt

An open-source self-hosted YouTube alternative. Subscribe to other users on other servers using ActivityPub. Reduced bandwidth costs for server owners via WebTorrent.

colorchat icon colorchat

Ruby and EventMachine-based webchat application supporting WebSockets and a Comet fallback

dingle icon dingle

Dingle is a rating/review hub for ISPs

essence icon essence

Extracts informations about medias on the web, like youtube videos, twitter statuses or blog articles.

exporthtml icon exporthtml

Sublime Text - Export code to HTML for copying/printing/saving. Also, export code to BBCode for forum posts.

fileupload icon fileupload

PHP FileUpload library that supports chunked uploads

font-awesome-svg-png icon font-awesome-svg-png

Font Awesome split to individual SVG and PNG files of different sizes along with Node.JS based generator

generic-ban icon generic-ban

A generic PHP ban class. Supports IP bans, alt account bans, and expiring bans. Uses redis.

hot2bot icon hot2bot

Python Twitter bot framework for use with Cobe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.