Iframe embed has no padding? #2764
Replies: 5 comments
-
Yes we recently made a change to embedded dashboards: https://github.com/plausible/analytics/pull/2744/files You should be able to get the old behaviour by using the manual width mode and then creating a container for the embed: <div style="max-width: 1024px; margin-left: auto; margin-right: auto;">
<!--embed code with width=manual-->
</div> |
Beta Was this translation helpful? Give feedback.
-
Hi @ukutaht thx for your response! Your suggestion does not work. Here is how your code looks like: You see that there is no padding on the right and left WITHIN the iframe! This is the code used to embed the iframe: <div style="max-width: 1024px; margin-left: auto; margin-right: auto;">
<iframe plausible-embed src="' . $url . '&width=manual" scrolling="no" frameborder="0"
loading="lazy" style="width: 1px; min-width: 100%; height: 1600px;"></iframe>
</div>
<script async src="https://' . $host . '/js/embed.host.js"></script> When adding &embed=false it looks like this and has proper padding: But as stated above the plausible logo and login link appearing on top of the iframe do not work (and I don't want them to show up). Thx for your help! PS: Here is a screenshot showing that even with background=transparent we would need some padding otherwise it looks cropped: |
Beta Was this translation helpful? Give feedback.
-
@ukutaht do you need any more information from my side? Is the issue clear? Thx in advance. |
Beta Was this translation helpful? Give feedback.
-
is it possible to change the color of the bar? |
Beta Was this translation helpful? Give feedback.
-
I'm closing this as I've happily switched to Matomo :) |
Beta Was this translation helpful? Give feedback.
-
I have developed a module for the ProcessWire CMS to integrate the plausible dashboard into the CMS backend. Unfortunately it seems that the embed code has changed somehow so that my iframe does not have any padding on its sides:
I've read the docs, but &width=manual does also not work. I only get some padding if I remove the &embed=true, but then I get the plausible logo and login links, which I don't want to see (as they don't work in the iframe!).
Thx in advance!
Beta Was this translation helpful? Give feedback.
All reactions