You can calculate the values of the Google Analytics 4 ‘Engaged Sessions’ metric in BigQuery by counting distinct sessions for which the value of the ‘session_engaged’ event parameter is 1.

The ‘session_engaged’ is an array of structures within the ‘event_params’ array of structures.

Use the following SQL (automatically generated via a text prompt in ChatGPT) to track GA4 Sessions and Engaged Sessions by traffic source and medium in BigQuery: