Embedding reports

If you want to make an Intranet Statistics widget available in an external applicaiton, such as your ThoughtFarmer intranet, you are able to do so. Any widget in Piwik can be embedded and will function exactly as it does if you were logged into Piwik itself. This is a great way to share reports directly with others without requiring them to obtain their own Piwik accounts or login.

To embed a report:

Click on Widgets in the top of the Piwik site.

Select the date range desired for the report (using the Date Range picker).

Choose the report category.

Choose the exact report. This will display a preview of the report on the page.

Copy the Embed iFrame code from below the preview window.

Once you have the embed code there is only one final step required to embed this. In order for the report to be anonymous and accessible without login a token auth parameter must be added to the iframe src parameter. To do this you can just grab the token parameter directly from the API link at the top of the Intranet Statistics page. The parameter will be highlighted there and be copied in whole. It will look like the following:

&token_auth=e5cb856a7abcdef38ca43fd6638bb1ed

Simply take that value and paste it to the end of the src attribute in the iFrame embed code. The final result (example below) can now be added to any ThoughtFarmer page using the Insert Code tool, or directly by switching to the Source view. You can also embed this on any web page on an external site.