Embedding queries

Tara Kieffer -

***linked from AIR, updated 07/23/14 JE

 There are three options for embedding queries (and insights) on your own web pages.  You can use the publishing API, the embed code (query only) or an iframe (embed the full insight page for the query, displaying query, approved responses and stories).  Here's how:

Using the publishing API 

See a separate article about the publishing API for full documentation on how to use it.

Using the embed code 

On the query overview tab, click "Get Insight Embed Code"



The Insight Embed Code window will display with the code to copy and paste. 



Using an iframe

If you want your query to display using the tabbed respond/responses layout as seen in the publicinsightnetwork.org insight pages, you can either do it via Javascript and embed it as in the API docs, or use the iframe version of the tabbed layout:

WIthin AIR, the iframe URL displays on the query overview tab. 


Embed on your site using the <iframe> tag

An example:

<iframe src="http://www.publicinsightnetwork.org/form/minnesota-public-radio/353..." style="width: 100%; height: 600px" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0">

<p>Your browser does not support iframes. <a href="http://www.publicinsightnetwork.org/form/minnesota-public-radio/353... the form in a new window</a>.</p>

You may need to adjust the height of your iframe to fit the height of the form. View a full list of iframe attributes.

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk