Google Analytics in iframe sandbox

When google analytics analytics.js in loaded in an iframe (sandboxed) - can it still track all the data from the parent page.

Parent page would send data to iframe via postMessage API for data that needs to be sent.

In addition to the custom data we send, there are multiple other data google tracks like page title, cookies, device, screen resolution.

What data will we lose when we do this (restrict analytics.js in an iframe?)

This needs to be on multiple pages.