# Consent source figures

**Summary:** Consent source counts accepted or withdrawn consent events by recorded channel. Repeated changes count separately.

- Role: [Technical Support](https://www.subrite.no/technical-support)
- Source: https://www.subrite.no/technical-support/insights-consent-source
- Updated: 2026-09-28
- Markdown index: https://www.subrite.no/technical-support/llms.txt

The figures do not represent current consent status, unique-member counts or marketing acquisition attribution.

<a id="history-events-and-daily-summaries"></a>
## History events and daily summaries

`processAndSaveConsentChannelActivitySummary` counts `ConsentHistory` rows whose `createdAt` falls within the reporting day. Rows are grouped by channel, consent ID and type within the tenant.

The writer uses explicit `dataDate` or yesterday, with configured timezone boundaries. It saves daily `eventCount` plus cumulative accepted and withdrawn fields. This report reads only `eventCount`.

Multiple changes or consent types for one member count separately. For example, one member accepting 2 consent types through My page contributes 2 accepted `mypage` events.

The collector returns early if any summary exists for the same tenant and `dateOfRecord`. No daily events means no daily source rows are saved; cumulative history alone does not create a row. [Source: source-summary writer](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/stats/services/stats-store.service.ts#L898-L987).

<a id="query-and-selection-rules"></a>
## Query and selection rules

`historical-consent-channel-summary` sums `eventCount` by `channel` and `dateOfRecord` period. It filters tenant, nondeleted summaries and the requested `type` exactly.

Accepted and withdrawn events are separate queries. Withdrawals remain positive counts here; [Consent changes](https://www.subrite.no/technical-support/insights-consent-changes?md=true) displays them negatively and counts updated records instead of history events. [Source: historical query](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/stats/repositories/consent-channel-activity-summary.repository.ts#L25-L81).

The UI offers currently active consent types. Supplied `consentIds` filter the query; missing or empty IDs default to active IDs.

If the active-ID list is empty, the repository adds no consent predicate. Historical inactive types can remain in the tenant's results. [Sources: selection default](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/stats/services/stats.services.ts#L642-L662), [active picker](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/frontend/src/app/%28admin%29/admin/%28panel%29/analytics/statistics/consent-source/ConsentSourceStatsFilter/index.tsx#L49-L100).

<a id="what-the-channel-identifies"></a>
## What the channel identifies

The graph displays channel strings without translation. Defined values include `mypage`, `onboarding`, `newsletter`, `admin`, `mailchimp`, `make`, `m2m`, `mailmojo` and `import`.

`mypage` identifies member self-service; `admin` identifies administrator actions. These are the channels supplied by those consent forms, not a member's original acquisition source. [Sources: channel values](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/consent/enums/consent-channel.ts#L1-L11), [My page caller](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/frontend/src/app/%28members%29/%5Blocale%5D/account/consent/components/ConsentList/index.tsx#L55-L64), [admin caller](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/frontend/src/components/admin/Members/components/ConsentsList/index.tsx#L55-L70).

<a id="groups-totals-and-dates"></a>
## Groups, totals and dates

The service reserves one display slot for Others: view 5 selects 4 named channels; All selects at most 99. Selection uses the largest counts in the latest returned period.

Others appears only when that period exceeds the named-channel limit. Without it, older channels outside the selection disappear. Total sums returned datasets and cannot recover omitted channels. [Sources: limit](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/stats/services/stats.services.ts#L642-L662), [ranking and Others](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/stats/services/stats.services.ts#L818-L894).

Defaults are accepted status, weekly periods and view 5. Daily ranges end yesterday; coarser periods include the current unfinished bucket. Timeline windows are capped at 550 periods.

The earliest-date lookup uses active consents but does not filter accepted versus withdrawn. All time can therefore begin before the first event for the selected status. [Source: timeline extent](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/stats/repositories/consent-channel-activity-summary.repository.ts#L83-L102).

<a id="diagnose-a-discrepancy"></a>
## Diagnose a discrepancy

- Source totals exceed members: compare events per member and consent; the report does not deduplicate people.
- Different values from Consent changes: compare history `createdAt` events here with current member-consent `updatedAt` rows there.
- An old source disappears: check latest-period ranking and whether Others is emitted before treating historical events as missing.
- Counts remain with no active types: inspect resolved `consentIds`; an empty array leaves the consent predicate absent.
- Blank graph: check the API response and values. Invalid responses render empty; zeros become `null`.
- Blank Total after hiding a source: restore the legend. Hidden returned groups still contribute to aggregation.

Tooltip shares use visible source counts, not all members or an acceptance-rate denominator. [Sources: chart mapping](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/frontend/src/app/%28admin%29/admin/%28panel%29/analytics/statistics/consent-source/ConsentSourceStats/index.tsx#L40-L122), [tooltip arithmetic](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/frontend/src/ui/StatsView/index.tsx#L182-L246).

The endpoint requires Dashboard read permission; menu access also depends on Analytics access and Insights. [Source: endpoint gate](https://github.com/subrite/subrite-crm/blob/6cd1850569be3b1702ca736a19320c7626efb7bc/api-server/src/modules/stats/controllers/stats.controller.ts#L395-L404).

<a id="sources-and-verification"></a>
## Sources and verification

Source checked 28 September 2026 at `6cd1850569be3b1702ca736a19320c7626efb7bc`. Prior UI evidence confirms navigation, heading and accepted/default controls. No fresh UI, numeric, empty-selection, provider-attribution or ordinary-role test was performed.

For graph interpretation and controls, see [Consent source figures](https://www.subrite.no/administrators/insights-consent-source?md=true).

## Related pages

- [Consent source figures](https://www.subrite.no/administrators/insights-consent-source?md=true): Consent source counts accepted or withdrawn consent events by recorded channel. Repeated changes count separately.
