When a form is embedded using an iframe from a different domain, the form is actually hosted somewhere else either on the same domain or with 3rd party provider on an external domain.
If your form is hosted within the same domain, add the tracking script to the page that is serving the form.
3rd Party Provider (External Domain)
If your form is hosted by a 3rd party provider, security measures implemented by browsers known as same-origin policy prevent the WhatConverts tracking script from accessing the content of the iframe. The following steps need to be followed in order to track the iframe:
- 1Add your tracking script to the page that is serving the form with the 3rd party provider.
<iframe id="iframe-website" width="100%" height="800" frameborder="0"></iframe>
This code passes along the traffic source details to the tracking script with the 3rd party provider. The URL source of the iframe should replace “https://www.whatconverts.com/” and the ID attribute should replace both instances of “iframe-website“.
Below is an example of an iframe form from Acuity Scheduling.