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


#1

Hi,

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, www.mysite.com/Page1 (hosted by us), in an iframe, on his own site (www.usersite.com). 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 (www.usersite.com).

Please let us know if this is a viable approach.

Thanks,
SoftDev


#2

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