module AttributionCreditSplit

Overview

Split revenue credit across the touchpoints of one won deal.

Defined in:

split.cr

Constant Summary

MODELS = ["first", "last", "linear", "u-shaped"]
VERSION = "1.0.0"

Class Method Summary

Class Method Detail

def self.split(model : String, revenue : Float64, touches : Array(String)) : Array(Tuple(String, Float64)) #

Credit per touch, then added up per channel in order of first appearance.


[View source]
def self.weights(model : String, n : Int32) : Array(Float64) #

Returns one weight per touch; the weights add up to 1.


[View source]