PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

GOOGLE ANALYTICS AND GRAVITY FORMS IN IFRAME ON ANOTHER DOMAIN

  1. Hi,
    I have a gravity form on a page on my website. I have then added an iframe to the gravity form on another site at a different domain. The other site can then see the gravity form and complete it. However, I need to be able to add Google Analytics to the iframe so that google analytics can track how many times the form was completed using the iframe on the external site. How can this be implemented?

    Posted 12 years ago on Tuesday November 6, 2012 | Permalink
  2. Is there any tracking code on the Gravity Form page now, the one which you are embedding in an iframe?

    You can add an HTML block to your form and insert the Google Analytics code to that, if you like. But then, that code will be executed for every page view, not just the ones in the iframe.

    Is the form being used on both sites, and you separate analytics for them?

    Posted 12 years ago on Monday November 19, 2012 | Permalink
  3. Hmm, adding analytics to a HTML block sounds interesting. However, the Gravity form is being viewed inside an iframe on an external website on another domain. The analytics in the HTML block will not be able to determine that the form was submitted from the external site will it?

    Posted 12 years ago on Monday November 19, 2012 | Permalink
  4. I'm not a Google Analytics expert, so I'm not sure how it all should work. It might be possible to push another variable to the ga.js script to indicate where the form is being viewed and submitted, but I'm not sure how to do that. It's not related to Gravity Forms really, just to opening websites in iframes, and tracking that. There is some information about GA and iFrames here:

    https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#trackingIFrames

    Google has a lot of hits as well.

    Posted 12 years ago on Monday November 19, 2012 | Permalink