I would like to send data to multiple GA4 data streams from one web page. I simply want the data to go to two properties instead of just one. It would be nice if it was as simple as something like this:
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag( js , new Date());
gtag( config , G-XXXXXXXXXX );
gtag( config , G-YYYYYYYYYY );
</script>
Is it possible to do what I am trying to do? If so, how should I do it?
I cannot seem to find information on how this is done specifically with GA4 and I don t want to experiment and risk making an error that causes problems in data collection.