Template technical sheet
Data to returnGA4 Measurement IDSession Field
What it does
Variable that reads GA4 identifiers through the native readAnalyticsStorage API. Choose Client ID, Session ID or Session Number; session data requires a Measurement ID. It is useful for attribution debugging and for preparing data for other tags. Reading depends on analytics_storage being available.
Code and configuration
The repository includes the template file. Review its documentation, configuration and permissions before adding it to your Google Tag Manager container.
Credits
Alfonso Rodríguez, Txema Sánchez and Brais Calvo.