Filtering timeline events

class TimelineEventsFilter
__init__(event_type_id=None, event_type_ids=None, event_properties=None, from_date=None, to_date=None, count=20)

A TimelineEventsFilter represents a number of filters on timeline events. When passed to Client.get_profiles, it will only return timeline events that match all of the filters in this TimelineEventsFilter.

Parameters:
  • event_type_id (str, optional) – Filter the timeline events on type (e.g. “PAGEVIEW”). Can only be one event type. Defaults to None. Deprecated in favor of ‘event_type_ids’ parameter

  • event_type_ids (Sequence[str], optional) – Filter the timeline events on type (e.g. “PAGEVIEW”, “CLICK”). Defaults to None. If provided ‘event_type_id’ parameter is ignored.

  • event_properties (Sequence[str], optional) – Filter the timeline events on type and their properties (e.g. “PAGEVIEW.EVENT1”, “CLICK.EVENT2”). Defaults to None. When updating events using the ‘event_properties’ parameter and the ‘set’ strategy, exercise caution as it can lead to a loss of information.

  • from_date (datetime.date or datetime.datetime, optional) – Get timeline events that happened after this date. Defaults to None.

  • to_date (datetime.date or datetime.datetime, optional) – Get timeline events that happened before this date. Defaults to None.

  • count (int, optional) – The number of events to return. Number must be between 1 and 10,000, inclusive. Defaults to 20.

Raises:

ValueError – Profile ID is empty, the count is higher than 10,000, or the count is lower than 1.

Usage:
>>> from blueconic import Client, TimelineEventsFilter
>>> from datetime import date
>>> bc = Client()
>>> for profile in bc.get_profiles(
        "allvisitors",
        count = 0,
        timeline_events_filter = TimelineEventsFilter(
            count=100,
            to_date = date(
                year = 2019,
                month = 8,
                day = 6
            )
        )
    ):
    ...     ...
property extra_options

Returns the extra options of this timeline event filter.