CleanInsights

class cleaninsights.CleanInsights(conf, store)

Core class for the CleanInsights SDK.

property campaign_consents
conf: cleaninsights.conf.Configuration
deny_campaign(campaign_id: str)
deny_feature(feature)
failed_submission_count: int
failed_submission_dt: datetime.datetime
property feature_consents
get_and_measure(haystack: List[D], campaign_id: str, campaign: cleaninsights.campaign.Campaign, where: Callable[[D], bool], dt: Optional[datetime.datetime] = None)Optional[D]
get_campaign_if_good(campaign_id: str, debug_str: str, dt: Optional[datetime.datetime] = None)Optional[cleaninsights.campaign.Campaign]
grant_campaign(campaign_id: str)
grant_feature(feature)
is_campaign_currently_granted(campaign_id: str)bool
measure_event(category: str, action: str, campaign_id: str, name: Optional[str] = None, value: Optional[Union[int, float]] = None)

Measure an event.

measure_visit(path: List[str], campaign_id: str, dt: Optional[datetime.datetime] = None)None

Measure a visit.

persist()None
persist_and_send()None
persistence_counter: int
store: cleaninsights.store.Store