Open peterbo opened 3 years ago
@peterbo could you maybe check if there are failing requests when opening the overlay? Maybe there are some CORS headers in place that are causing issues?
@peterbo Other possible bug source: the site is in HTTP and Matomo in HTTPS. Your browser won't allow this (it won't allow display an HTTP frame in an HTTPS page)...
I can confirm this bug. Manually overriding pPiwikRoot is fixing the issue, as pPiwikRoot get the domain of URL A instead of URL B. Still present in 4.6.2. (all sites in HTTPS)
I have been looking into this today again.
We would really need to implement a solution where the "tracker domain" like this plugin from @mikkeschiren does https://github.com/digitalist-se/TrackerDomain and use that variable to handle this.
I will for now create a patch for the Overlay plugin to make our environment work with a separate tracker domain.
I really think this should be part of core in the end (both the TrackerDomain and the changes in the Overlay plugin and potentially a lot of other plugins that might have similar issues.
Started to dig into this again, but having a hard time figuring out where pPiwikRoot URL is coming from?
@mikkeschiren It is passed through from the tracking code. In piwik.js the overlay scripts are initiated here: https://github.com/matomo-org/matomo/blob/4.x-dev/js/piwik.js#L6588
It also provides the configTrackerUrl
as parameter, which is in the end used as pPiwikRoot
.
Why is the main reason behind that the code for the display of the Overlay is in the piwik.js? As that mainly is for tracking, should code not used for tracking, be part of that file? I am sure there is a good reason, but I just doesn't understand it :)
@mikkeschiren Haven't looked in detail, but I think it wouldn't be possible to inject custom javascript into a website shown in an iframe. As the tracking code is always included we use it to load additional javascript for the overlay features.
Ah, that makes sense.
Are there any updates regarding this issue ? (Matomo support asked me to comment here :sweat_smile: )
You are most welcome to comment on the GitHub issue as the more requests we get for this to be resolved, the more priority is given to the issue.
+1
Same issue for another customer. I can see the Page Overlay feature is trying to display the customer's site in an iFrame but the site does not allow cross origin requests...
Expected Behavior
When opening the Page Overlay feature for a given URL, the Page Overlay should open and display the corresponding numbers and overlay data for a given page.
Current Behavior
Currently, if the Matomo tracking URL is different from the Matomo GUI URL (e.g. in proxy environments), Overlay does open, but keeps the loading screen in the left frame (no data will be loaded), and no overlay data is shown in the website view frame.
Possible Solution
Steps to Reproduce (for Bugs)
Your Environment