Subscribe to our newsletter and get proven marketing strategies for growing your business.
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, make sure your WhatConverts tracking script is on the page that is serving the form.
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 forms in the iframe:
1Add the following to the page where your form is hosted. This will be the third party provider such as Formsite, Pardot, etc.
This script identifies the Parent URL where you have put your form. Replace https://YourURL.com/ with your site's URL.
<script type="text/javascript"> wc_frame_parent = 'https://YourURL.com/'; </script>
Below this script, paste your WhatConverts tracking script
2Add one of the following JavaScript functions to the page on your site where the iframe is being initiated using the ID, Name, Class or Role of the Iframe above or before your WhatConverts tracking code on your site.
Iframe Name: Replace iframe_test with the Name attribute.
<script type="text/javascript">
wc_frame_target = '[name=iframe_test]';
</script>
Iframe ID: Replace iframe_test with the ID attribute.
<script type="text/javascript">
wc_frame_target = '#iframe_test';
</script>
Iframe Class: Replace iframe_test with the class attribute.
<script type="text/javascript">
wc_frame_target = '.iframe_test';
</script>
Iframe Role: Replace iframe_test with the role attribute.
<script type="text/javascript">
wc_frame_target = '[role=iframe_test]';
</script>
Below is an example of how to find an iframe ID attribute.
The ID of the iframe above is frame-one458908311.
One of our marketing experts will give you a full presentation of how WhatConverts can help you grow your business.
Schedule a DemoRead details from your calls without the need to listen to the entire call recording.
Route calls to multiple destination numbers at once using multi-ring functionality.
Reroute calls that occur outside your active business times.
All incoming calls will be directed to the business location closest to the caller.