If you want to use the
network_userid (i.e. third party cookie ID value) to perform analysis, it is sensible to measure what fraction of your userbase has third party cookies enabled / disabled.
This can be done using the following query:
with tpcids_and_pvs_by_fpcids as ( select domain_userid, count(distinct(network_userid)) as number_of_3rd_party_cookie_ids, count() as page_views from atomic.events where event = 'page_view' group by 1 ) select case when number_of_3rd_party_cookie_ids = page_views then 'third party cookies blocked' else 'third party cookies enabled' end, count() from tpcids_and_pvs_by_fpcids where page_views > 1 group by 1;
The query works by:
- Identifying users (as identified by first party cookie IDs i.e. the
domain_useridthat have viewed more than one page
- Counting the number of
network_useridvalues that have been assigned to users who have visited more than one page
- Comparing the number of distinct
network_useridvalues to pages viewed. For a user who has 3rd party cookies blocked, each time they visit a new page a new value of
network_useridwill be set. So if a user has visited three pages, and has three distinct values for their
network_userid, we can be very confident that he/she has third party cookies blocked.