OptOut iFrame not working...white space


#1

On all my browsers Firefox, Chrome + Chrome Mobile, Edge and IE the embedded Opt Out iFrame is not working…it´s only white space.

Other iFrames from different sources are working fine.

Piwik Script is getting integrated into my website with Haeder-Footer-Plugin…works fine.

I don´t want to use more Plugins like "WP-Matomo (WP-Piwik) + Matomo web analytics application.

Any solution for that?

Best Regards


(Lukas Winkler) #2

Hi,

Can you check if the <iframe> has a propper closing </iframe> tag?

The latest version has a bug where it is missing, which may causes your issue.

It has already been solved and will be included in the next release.


#3

Actually the code given by the code generator did not had a proper closing…I added it manually.


#4

I closed it with : </iframe>

<iframe style="border: 0; height: 200px; width: 600px;" src="https://piwik.website.de/index.php?module=CoreAdminHome&amp;action=optOut&amp;language=de&amp;backgroundColor=ffffff&amp;fontColor=ff0000&amp;fontSize=17px&amp;fontFamily=Hind" width="300" height="150"></iframe>


#5

Adding for example a youtube iFrame works fine!


#6

But even with the propper closing tag it is not working!


(Lukas Winkler) #7

Hi,

Can you maybe send me an link to the page. I can’t think of a reason at the moment.


#8

It should be visible here:


(Lukas Winkler) #9

Hi,

You are using a JS library which tries to lazy-load the iframe (I think).

But this isn’t the issue.

Your Matomo instance is sending X-Frame-Options: sameorigin (You probably added it once in your webserver config together with the XSS-Headers. But as the Website and the Matomo instance are not on the same origin (different domains), the website isn’t allowed to embed the iFrame.

So you’ll need to change the header.


Opt-Out ohne Funktion
(Fabian Dellwing) #10

Oh and please don’t use X-Frame-Options because it is unflexibel. Instead use a proper CSP like this:
Header always append Content-Security-Policy: "frame-ancestors 'self' *.golfball-uhu.de"


#11

Hmmm is there an manual how to do that!?


#12

I have no idea what this X-Frames-Options are!???


(Fabian Dellwing) #13

This header is most likely set in a .htaccess file or the apache vhost. Do you have shell access to your document root?


#14

How did I do that??? No idea :thinking:

As I said, the Piwik Code is added with the Header-Footer-Plugin…that´s it. Piwik is installed in the database of the main domain

and is getting used for

and


#15

FTP-access…that´s what I have…shell???


(Fabian Dellwing) #16

So, no is the correct answer.

As you have only ftp access, your sites are hosted by a shared hoster?


#17

yes :grinning: exactly


(Fabian Dellwing) #18

Than please write a support ticket (if possible) asking your hoster to replace the X-Frame-Origin: sameorigin header with Content-Security-Policy: "frame-ancestors 'self' *.golfball-uhu.de" for your domain piwik.golfball-uhu.de.


#19

How do I get a support ticket? I´m new here


(Fabian Dellwing) #20

A support ticket to your hoster :wink: