Embed Tables and Charts in Web Pages

From Q
Jump to: navigation, search

You can embed Q's tables and charts in any web page on the Internet. This will require a Dashboard, which requires a separate license to be purchased.

Example

The following table is embedded from the demonstration dashboard http://www.q-demo.com page titled Tables and plots.

The embed code for this table is <script src='https://numberseus.blob.core.windows.net/embed/23/43/65f90523-1343-4208-b033-04ac5bc088db.js'></script>

You can use this embed code to test out the embedding functionality in your own web page.

Instructions for embedding a table in a web page

Get the HTML embed code

  1. Create the table in Q.
  2. Follow the steps in Instructions for creating a dashboard
  3. Go to your dashboard web page.
  4. Click the Edit button (Dashboard Edit Button.PNG) to go into Edit mode.
  5. Click on the table, then click the Embed button: Dashboard Embed Selection.PNG
  6. You will be instructed that a snapshot of your dashboard needs to be taken. Click Snapshot and View.
  7. The embed code will be generated. This may take up to one minute as a snapshot of your dashboard is performed.
  8. The embed code and a preview of the embedded table is shown: Dashboard Embed Preview.PNG
  9. Select the embed code and copy it (CTRL+C on a PC).

Insert the HTML embed code into your web page

  1. If using a blog or other visual web page editor, switch to HTML mode. You should see your web page text surrounded by HTML tags such as <p>, <div>, etc.
  2. Paste the embed code into the editor.
  3. Save your web page.
  4. View your web page again. You may need to reload your web browser to see the changes (CTRL+R or CTRL+F5 in most web browsers).

MediaWiki

  1. Edit your wiki page.
  2. Type <html>
  3. Paste the embed code afterwards.
  4. Then type </html> afterwards.

Note that this will only work if your MediaWiki software has the $wgAllowUserJs setting set to true. You should not turn this setting on if you have a public wiki, because it is a big security risk. It should only be turned on for private wikis where you trust the authors and prevent public editing.


Search Engine Optimization (SEO) concerns

The content of embedded tables, charts and text boxes is included in Google search results.

In late 2014 an experiment was conducted where a blog (http://embeddingtests.blogspot.com/) was created with several embedded items. It found:

  1. Upon Google's initial crawl of the web page, only text was captured. Embedded content was not included in search results.
  2. At a later stage (between 3-7 days), the embedded content was captured and included in search results.

This can still be confirmed today by searching for a word that is only included in the embedded table, such as "Less than 18": https://www.google.com/#q=site:embeddingtests.blogspot.com+%22Less+than+18%22