By default, for security reasons, Matomo (Piwik) prevents standard pages and reports to be included in an iframe.
If you try to include Matomo pages as Iframe you will likely get the error Refused to display ‘https://example.com/’ in a frame because it set ‘X-Frame-Options’ to ‘deny’..

To solve this issue, and let you include Matomo Analytics widgets in your website or app, we recommend you use the standard “Widgets” mechanism.

Or if you really wish to include the whole Matomo in an iframe, edit your config/config.ini.php under the category [General] add the following line:

[General]
enable_framed_pages=1

If you also wish to enable the “Settings” pages (Manage websites, Users, etc.) to load in an iframe you can also add the setting:

enable_framed_settings=1

See also: How do I enable users to login into Matomo inside an iframe?