Can I embed a Heatmap in an iFrame on our website?

There is an API to get Heatmaps for a given page (Reporting API Reference: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3) but it would be really useful if we could just embed the Heatmap just like we can embed other widgets on third-party websites.

Is this even possible? I can’t find supporting documentation for this feature.

Hi,

Yes this is possible:

https://example.com/index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=showHeatmap&idSiteHsr=41&idSite=2&period=day&date=yesterday&token_auth=xyz

where xyz is your auth_token

1 Like

IS this just an individual recording or the page where they are all listed ready to be played ?

I can’t get it to work for my cloud version at the moment

I would like to Iframe the entore page where all the recordings are so the users can select which one to view

Hi Christopher,

Yes you could make a query like this: https://example.innocraft.cloud/index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=getManageSessionRecordings&idSiteHsr=41&idSite=2&period=day&date=yesterday&token_auth=xyz

Hi Jason , nearly right and that did perfectly render the page in my iframe , bit thats the manage page i want to just have the list of all the actual recordings , i can navigate to the page from there but then it exposes the complete admin page

Hi Christopher,

Then you would want the following:

https://example.innocraft.cloud/index.php?module=Widgetize&action=iframe&moduleToWidgetize=HeatmapSessionRecording&actionToWidgetize=getRecordedSessions&idSiteHsr=62&idSite=2&period=day&date=yesterday&showtitle=1&random=5754

Jason That’s fantastic , many thanks for your help , I really don’t understand the API reference so this is a great help