Compose with blocks

  • Updated

Analytics provides a set of building blocks for analytics that you can apply in various scenarios to compute dynamic properties. By combining these blocks, you can create complex computations. For instance, you can define a derived column or specify an inline cohort within a retention exploration.

The block editor lets you define blocks based on computed properties. Its power comes from a comprehensive collection of pre-built blocks and the adaptability to combine blocks in various ways to meet diverse analytic needs.

Certain exploration templates and interfaces in Analytics use blocks to enhance their analytic capabilities. While the appearance of the block editor may vary slightly in these contexts, the underlying block library and its functionality remain consistent.

Block editor in derived columns, cohorts, and metrics

Derived columns, cohorts, and metrics are examples of catalog entities that represent computed properties. You define each of these entities within Analytics using the block editor. You can access the editor interface when you start the workflow to create entities.

Block editor in exploration templates

Exploration templates in Analytics let you derive computed properties directly within the template. You do not need to define and save a computed property in the catalog beforehand, such as a derived column, cohort, or metric. Instead, you can define the computed property within the template context, use it, and save it along with its definition.

Within the exploration template user interface, you can access the block editor in several ways.

  • Inline segments – Click + New Cohort within the Segment by Cohort section.

    opti-block-1.png

  • Computed properties – Use blocks to define computed properties for filtering or as first-class attributes, such as segmentation. You can expand and collapse the block editor. Within this UI, you can access blocks used by the exploration template. These blocks may depend on other blocks within the same template but not on blocks from other exploration templates, as those are not first-class catalog entities. 

Block editor actions

The block editor supports the following actions:

  • To add a block, click + or Add Block and select the desired block type to include it in the definition.
  • To delete a block, click More () > Delete.
  • To duplicate a block, click More (⋮) > Duplicate.
  • To edit a block, click edit and enter a name.

Output designation

The block editor has an output toggle. Activate this toggle for at least one block to designate it as the computation's overall output. This functionality is limited to derived columns, cohorts, and metrics.

Block library

Using Optimizely Analytics's comprehensive library of diverse blocks, you can perform complex computations on individual blocks or by combining the blocks. The following block types are available:

  • Aggregate
  • Alias
  • And/Or
  • Attribution
  • Behavioural cohort
  • Bin
  • Event aggregation
  • Filter
  • Filtered event
  • Formula
  • Group by
  • If/Then/Else
  • Intervals engaged
  • Moving aggregation
  • Period vs. previous period
  • Previous value lookup
  • Property
  • Rank
  • Retention cohort