extensions/amp-analytics/why-not-iframe.md
AMP uses the AMP Analytics system instead of relegating analytics providers to a separate iframe. This was done for a number of reasons, including:
amp-analytics, such as:The disadvantages of this approach are:
amp-analytics extension's data collection will not be as complete as existing systems. This is being addressed by multiple partners in the Github repo. AMP is committed to enhancing the capabilities of amp-analytics based on the foundation that’s been built thus far.If this is insufficient, MRC-accredited vendors may still use an embedded iframe. This is discussed in the amp-analytics documentation. Note that the cross-domain frame is loaded after the creative due to AMP’s prioritization constraints for cross-domain iframes, which may lead to ping loss. Should the previously-existing solution (beacon, image, and/or xhrpost) meet your needs, it is recommended that it be used.