Embed widget in custom page

Hi,

I’m testing the platform and currently I’d like to embed a widget into an experience view page of type custom.

I tried pasting widget embedded code into the custom page, but when I do so I automatically get logged out from Losant page.
It also happens if I paste the embedded code into JsFiddle.

1 Like

Hi @nahuel,

Could you provide a link to the dashboard you are pulling the block from? I will send you a private message for that information. I was able to replicate a “refreshing” that occurs with the embedded block, but can do further testing with your dashboardID.

Thanks!
Julia

Hi @nahuel,

Thank you for providing those details! I took a closer look behind the scenes and it looks as though you are being logged out as your dashboard is set to private. You will be able to embed a single block only if your dashboard is set to public. You can browse our documentation on embedding single blocks and full dashboards here.

Let me know how else I can help!
Julia

Hi Julia,

I’ve checked and the Dashboard is set to public but I still keep getting logged out when I visit the custom page that holds that embedded widget.

Hi @nahuel,

Sorry this is occurring, I was able to replicate the log out with a public dashboard as well. I will inform our engineers, and let you know shortly if we find a solution.

Thank you so much for your patience! :smile:
Julia

Hi @JuliaKempf,

Any news about this issue?

Hi Nahuel,

A solution has not yet gone live for this problem. I have found the log out happens in Chrome, while Safari causes the Losant page to only refresh and not log out. Currently, I am able to work around it by having the two pages in different browser windows, but I will update you once the permanent solution is in place.

Thanks!
Julia

Thanks. I’ll give your workaround a try.

I have another question :smile:
Since both, the dashboard and the custom page, are hosted on Losant is there a way of embedding the widget into the custom page without having to make dashboard public?

Hi @nahuel,

Currently there is not a way to embed one block unless the dashboard is public, but I will make a feature request for this functionality. If you are trying to embed a custom block that does not use Losant state data, you could also directly put it on the page instead of in a block (for example, the stopwatch JS library you referenced previously). Otherwise, you could also display the entire private dashboard with a Dashboard Experience Page.

Thanks!
Julia