The website which hosts the iframe is mysite.com. The iframe source is othersite.com. I have code/admin access to both websites.
This is how the iframe added to mysite.com
<iframe src="https://othersite.com" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%;></iframe>
I want them to share the same analytics code and report events happening in them both to a single dashboard.
I have tried inserting analytics code into othersite.com but it does not work.
Adding the analytics code to the header of mysite.com before the iframe tag records page_view but does not record events within the iframe.
Is there a way for the same analytics code to report events within the iframe?