How can I embed grafana dashboards in web application?

I am new to Grafana, I created grafana dashboard in grafana cloud and now I want to show those dashboards in my website. how can I embed grafana dashboards in web application?

@srikanthg doesnt matter you run self-hosted or cloud; method looks the same:

  • open desired dashboard,
  • click Share button near the dashboard name ( upper-left corner of the page ) ,
  • set options you like/need,
  • Copy the generated link
  • paste it as <img> on the website

I followed below steps but not worked

  • I clicked on share button and copy the link.
  • then included in html page like
  • when I open the file in the browser nothing showed.
    could you help me solving this?

sure :slight_smile: could you please show me html code of your web? The part where you pasted copied code.

below is th html code

<!doctype html>
<html lang="en">
<img src="">

thank you


You forgot to close IMG tag. Should be:
<img src=""></img>

it’ giving cors issue

@srikanthg excuse me for not writing sooner…

within your HTML, add <meta> section and add the following:
Set-Cookie: Value=_ga,; SameSite=None; Secure;

within <head> section of your html file. Whole HTML file will look ( moreless ) like this:

		<!-- Cookie #1 -->
		<meta http-equiv="set-cookie" content="Value=_ga,; SameSite=None; Secure;"/>
		<!-- Cookie #2 -->
		<meta http-equiv="set-cookie" content="Value=_gid,; SameSite=None; Secure;"/>
		<!-- Other things like title etc -->
		<img src=""></img>

He. is it possible to use embedded frame with authorisation? Cause when i didn’t allow anonymous access in grafana ini i can only see grafana login window into frame?
I’ve tried to use something like this

          headers: {
            Authorization: "Basic YW50aG9ueTpPwf4Nzd29yZA==",
      .then((response) => {

but without success, still got a login window