How to track the clicking of an image in iframe with Piwik?



We just started using piwik for a new application, and encountered this issue: some user will embed our application in an iframe, on their own websites.

BTW - We know how to track image clicking on our own website.

Let’s say an user embeds a page, (hosted by us), in an iframe, on his own site ( And on this page, there are some ad images.

Now, if we put the same content tracking code on this page, and then someone clicks on these ad images inside this iframe, will the impressions and interactions be recorded?

Assuming that we pass a valid idSIte along with the page; the key here is: of course, the idSIte will be for a different url than where the iframe is at (

Please let us know if this is a viable approach.



I think it should still work, haven’t tested it though. If not, feel free to issue a bug on Issues · matomo-org/piwik · GitHub