In the prior sections we mentioned some of the "trending" features related to content collections. Below we're going to take a deeper dive into how trending works and how it's calculated. The Trending Window you set on the content collection plays a big role in how trending data is calculated. To determine which items are trending, Rock looks at how many views (interactions) an item in the content collection has had over the time period specified as your Trending Window. For instance, if your Trending Window is 30 days then Rock will count how many interactions an item in the content collection has had in the last 30 days. Rock then takes that number and divides it by the age of the item (in days), up to a maximum of your Trending Window. For instance, if an item is six months old and your Trending Window is 30 days, the count of interactions over the past 30 days will be divided by 30. This calculation produces a number that is used to rank the items in the content collection. The Trending Gravity setting is used to apply more weight to items that are newer. The idea of gravity is that an item which is only two days old that has been viewed 10 times is more popular than one that has been viewed 30 times in the last 30 days. Gravity is applied to the number that is calculated as described above, changing that item's score.