Skip to content

Model Data

tpitale edited this page Jan 13, 2012 · 2 revisions

It is essential to understand Metrics and Dimensions before proceeding.

There are ever-changing stipulations which describe the number of metrics and dimensions that can be queried at once, and more importantly, which metrics can be combined with which dimensions.

For example, "pageviews" is a metric. It's a count of pageviews over a given period of time. And something like "page_path" is a dimension. If you include both, you get something that equates to "pageviews per path over a given time period".

Simple Model

Here's an example of getting a page model to represent pageviews per page path.

class Page
  extend Legato::Model

  metrics :pageviews
  dimensions :page_path
end

Next, learn how to use Query Parameters and then how to Filter your data.

Clone this wiki locally