Using Appcues with IFrames
Submit Article Requests
Do you have a suggestion for an article you would like to see created?
Feel free to submit this form and add your suggestions to our document board.
- Installation & Developers
- User Experiences
- Account Management
- Best Practices
Table of Contents
Do you use iFrames in your application? Are you unable to place tooltips? No problem, we're here to show you how to work
What Are iFrames?
iFrames, also known as Inline Frames, are essentially a web page within a web page. They're used to display other web pages on your web page whether it's for forms, media, or other material. Because they're a different web page being shown on your site, access to the original source code is needed so that Appcues can be installed to the original web page since the iFrame is not part of the source code of your web app.
Access to the iFrame original source code.
Appcues will need to be installed into any iFrame source code that you are using in order to build within the iFrame as well as publish flows to the iFrame. The installation will be just like installing Appcues to your own web app that you have done before. Check out our installation overview here!
Building within an iFrame
Appcues will require you to separate your flow between the steps you will need Outside of the iFrame and Within the iFrame.
Important: take the time to physically draw out your experience where you encounter your iFrame. That way you can visualize what is Outside vs Within the iFrame.
We use a Chrome Extension called Open Frame that allows you to open the iFrame in a new tab so you can interact with it and build flows! Download here: https://chrome.google.com/webstore/detail/open-frame/kdhjgkkaacdhdioocfbpmhjidbinfajj
From here, you can build a flow as normal as if you were building a flow in your web application.
NOTE: If you have a flow in an iFrame and a flow outside of an iFrame on the same page, Appcues will show both flows, due to the nature of iFrames, therefore, we recommend if you have a flow within an iFrame, to only have the flow within the iFrame
Quick iFrame Example
Below this line is a quick example of an iframe of our Docs site displaying a PIN in the iFrame
If you were to right-click on the iFrame with the Open Frame plugin installed, you can see an option to open the iFrame in a new tab/window.
From there you can simply open the Appcues extension and build within the iFrame as much as you would like.
1. Which URL conditions should I use in 'Page Targeting'?
As you're building content on a different URL than the parent URL, you should be using conditions that match the iFrame's URL. This will make it so that in the instance of a user reaching a page where there's technically two URLs (parent URL as well as the iFrame's URL), Appcues will attempt to trigger it based on the elements it has found on the Build URL where the iFrame is, instead of the parent URL.
See Page Targeting for more information.
2. Can I create a flow that has steps in an iFrame and outside the iFrame?
No. When building flows that are related to iFrames, it's best to separate flows from the iFrame and other pages as there isn't a smooth way for both pages to pass over information synchronously.