micnews/megafunnel-view — pull request #5 by iefserge (2014-11-03 18:34:04+00:00)
Title: Multiple targets support

Not sure if it's a perfect solution, but this adds support for multiple targets at the same time. It outputs JSON encoded strings as keys.

Example view (`location` and `trackableValue`):
```js
"abtest": {
"count": {
"location": true,
"trackableValue": true,
"eventName": "trackable-custom",
"trackableType": 'abtest-view'
}
}
```

Example result:
```js
[{
"key": 1414778400000,
"value": {
"{\"location\":\"http://127.0.0.1:8080/abtest\",\"trackableValue\":\"B\"}": 25,
"{\"location\":\"http://127.0.0.1:8080/abtest\",\"trackableValue\":\"A\"}": 22
}
},
{
"key": 1414782000000,
"value": {
"{\"location\":\"http://0.0.0.0:8080/abtest\",\"trackableValue\":\"B\"}": 1,
"{\"location\":\"http://0.0.0.0:8080/abtest\",\"trackableValue\":\"A\"}": 4
}
},
{
"key": 1414785600000,
"value": {
"{\"location\":\"http://0.0.0.0:8080/abtest\",\"trackableValue\":\"B\"}": 1,
"{\"location\":\"http://0.0.0.0:8080/abtest\",\"trackableValue\":\"A\"}": 1
}
}]
```

/cc @dominictarr