Highlighted

Audience Stream - Two dimensional arrays

william1
New Member
william1

Is it possible to store data in a 2 dimensinal arrays. For example:

 [
   ["Apple", "1"],
   ["Banana", "-3"],
   ["Pear", "5"]
]

 

2 REPLIES 2

Audience Stream - Two dimensional arrays

Tealium Employee

Hi @william1

A Tally is pretty much that.

Mark

Audience Stream - Two dimensional arrays

TimWaijers
Occasional Contributor
TimWaijers Occasional Contributor

Hi @william1 ,

You'd think that a tally would keep a score (tally) of a specific item, but actually it's a Key-Value store. However the values can only be numbers.

We're using this to see:

  1. what products the customer has looked at the most. This is a standard Tally where each Key is the product ID, and each value gets increased by 1 for every product view.
  2. what products the customer has looked most recently. This is a tally where each key is the product ID and the value get set to 0 (zero) first and afterwards the value get's set to the current timestamp in ms. This ensures that the last looked at product always has the highest value (the timestamp) 

 

All the best,

Tim