ibolmo / cametrics

A RESTful logging system for Campaign Metrics
http://cametrics.appspot.com/
3 stars 1 forks source link

Name

Cametrics

Running Your Own Cametrics

  1. Download from Github (http://github.com/ibolmo/cametrics/zipball/master) or git clone git://github.com/ibolmo/cametrics.git
  2. Rename config.py.sample to config.py and edit the file appropriately
  3. Update app.yaml (in particular the application)

Types

Modify Statistics

Sometimes it would be useful to modify statistics to exclude certain statistics. The following are examples of such filters. Concept from Django Template Filters.

type|filters

Filters

Ontology

All things related to models, objects, or classes and their respected statistics that are auto incremented/decremented/updated. The '*' items are not yet implemented. The '?' items are unverified for appropiateness.

Base (common for all types)

Datetime

Location

Coordinate*

Number

String

Interval*

Events

Web hooks can be attached for when an event (for a namespace) occurs. Supports standard HTTP methods and position conditions (pre- and post- execution of the method).

# attach(namespace, callback_uri[, method = post|get|put|delete[, condition = post|pre);
attach(namespace, callback_uri)

# detach([namespace, callback_uri[, method = post|get|put|delete[, condition = post|pre]]);
detach(namespace, callback_uri, 'get', 'post')
detach()

Map

The following map/alias between different type of inputs

Examples

# measure(namespace[, value = 1[, type = number]]);  

measure('execution.start', 1240869175, 'timestamp');
measure('visitor::click');
measure(['participant', guid('ibolmo@gmail.com'), 'join']);

# measure.start|pause|resume|stop(namespace)

UUID

Universally Unique Identifier can be useful for namespacing to get a specific measurement for an object that is known to the campaign but is anonymous to the system. For example, I can track a user's data quality without implicating the user in the backend.

GCharts

Google Charts API is supported by passing all the normal query parameters, as described in the Google Charts API and appending .gc or .gchart to the end of your URL.

For example visit:
[http://cametrics.appspot.com/agljYW1ldHJpY3NyFQsSDm15YXBwX2NhbXBhaWduGNEPDA/name/space**.gchart?**cht=p3&chs=250x100]()

Note

You do not need to include the chd argument since this will be automatically populated by the system.

TODO

Thoughts