02-22-2018 05:30 AM
We want to build our audiences based on traits and scoring, is it possible to enrich data by performing calculations on it?
The idea is that at each new hit a specific value is recalculated based on it's previous value and the value that comes with the current hit.
Is it possible to do these calculations within AudienceStream?
Solved! Go to Solution.
02-23-2018 01:08 PM
It is indeed possible to calculate a scoring model in AudienceStream.
If you just wish to have a Visitor/Visit number that is incremented by an event attribute, that is fine. More complex scoring methods are also possible.
If you wish to give a bit more detail on what your scoring method is, I can guide you further
02-27-2018 12:40 AM
Hi Mark, thanks for your reply.
We'd like to use a relatively simple algorithm that calculates the new score based on the current score and some other factors (such as time passed since last calculation).
Something like this: x= (x/2 + y*(z-z*0.5))/4
so the question really is; what mathmatical operators can we use and how can we use them?
02-27-2018 02:28 AM - last edited on 02-27-2018 11:25 AM by kathleen_jo
That score should be calculable in AudienceStream, although you won't be able to do it in a single "line of code". You will need to do it step-wise, using intermediate attributes.
The mathematical operators that are available for a Number Attribute at the Visitor or Visit level are;
Increment / decrement by constant or other number
Ratio / Product of two numbers
Difference / Sum of two numbers
Set Number to other number
Calculate Change in other Number
And from Dates at the Visitor or Visit level, you can calculate into a number either the difference in two dates in minutes, hours, days, etc or the change in a single date based on this event in minutes, hours, days etc
The list above is not exhaustive - you can do other things with numbers and other attribute types in AudienceStream.