How does a counter data field work?

Counter fields are profile fields that act as counters.

The counter starts at zero and each time the field is passed in an event, the corresponding value in the field is added to the sum. When creating a counter, you can specify the decay:

Counter.png

The decay is a value that is automatically subtracted from the sum within the set time interval. 

Calculation fields are profile fields that are counters are compared with.

Example counter data field

Suppose you want to keep track of how interested profiles are in products for men, you can do this as follows:

  • Create a counter field called custom_man with a decay of 1 per 1 days
  • In events, pass the custom_man field, such as:
    • at ViewContent of men's products custom_man = 1
    • at AddToCart of men's products custom_man = 5
    • at Purchase of male products custom_man = 20
  • Suppose I trigger a ViewContent, AddToCart and Purchase of men's products, this produces the following:
    • start counter = 0
    • ViewContent with custom_man +1 = 1
    • AddToCart with custom_man +5 = 6
    • Purchase with custom_man +20 = 26
  • So on day 0 the counter has a value of 26, then the decay is applied:
    • day 1 = 26 - 1 = 25
    • day 2 = 25 - 1 = 24 etc.