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"

Screen_Shot_2013-05-22_at_3.45.28_PM.png

 

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

Screen_Shot_2013-05-22_at_3.53.19_PM.png

 

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. 

Screen_Shot_2013-05-22_at_3.56.21_PM.png

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>
</iframe>

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

0 Comments

Please sign in to leave a comment.
Powered by Zendesk