Code Monkey home page Code Monkey logo

wp-kissmetrics's Introduction

Kissmetrics For Developers

This is a WordPress plugin. It's intended to be used by developers, not end users. There's no user interface. Instead there is a class that interacts with the Kissmetrics API and a couple of helper functions.

Installation

Although there's no user interface, this is just a normal plugin. Install it in your /wp-content/plugin/ directory. You can also install it in /wp-content/mu-plugins/, depending on your use case.

Usage

The only way to interact with this plugin is through code, it has no UI. Before you can record any data, you have to tell Kissmetrics what your API key is. You can do this either through the kissmetrics_api_key filter or the WP_KISSMETRICS_API_KEY constant. Filters will override the constant if you use both. The same API key constant and filter applies to queries from both PHP and JavaScript.

For most data you want to record in PHP, you should use the helper functions kissmetrics_record() and kissmetrics_set(). If you need to do something more complicated you can use the WP_Kissmetrics class, but you probably don't need to. JavaScript has its own set of helpers in the wp.kissmetrics object. To enqueue the JavaScript file with the helpers, call kissmetrics_js() in PHP. You can use the same function to record data in JavaScript on page load.

wp-kissmetrics's People

Contributors

evansolomon avatar

Stargazers

 avatar Chelsea Otakan avatar

Watchers

 avatar James Cloos avatar

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.