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. Calculation fields are profile fields that are counters are compared with.
What is a counter decay?
The decay is a value that is automatically subtracted from the sum within the set time interval.
The moment the value of the Counter field is increased by +1 or more for the first time, the set decay is applied 24 hours from that point. This continues until the total value of the Counter field returns to 0. Once the field gains a value greater than 0 again, that becomes the new reference point for applying the decay every 24 hours. As a result, the timing of the decay will never be the same everywhere.
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.