{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Program Analytics",
    "description": "Defines the program analytics configuration.",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "goals"
    ],
    "properties": {
        "goals": {
            "type": "object",
            "title": "Revenue Tracking Rules",
            "description": "Defines the program goals and how they relate to projected revenue.",
            "required": [
                "event",
                "value"
            ],
            "additionalProperties": false,
            "properties": {
                "event": {
                    "enum": [
                        "rewardCreated",
                        "rewardRedeemed"
                    ],
                    "enumNames": [
                        "When reward earned",
                        "After reward redeemed"
                    ],
                    "type": "string",
                    "title": "Goal Completion",
                    "description": "Set when the user achieves the program goal"
                },
                "value": {
                    "type": "number",
                    "title": "Revenue Multiplier",
                    "description": "Record the following revenue in analytics"
                }
            }
        }
    }
}