2

here is a trends search for the world "google": https://trends.google.com/trends/explore?q=google&geo=US

i want to embed this into my jekyll website, so i paste the embed code into my markdown file:

<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/2213_RC01/embed_loader.js"></script>
<script type="text/javascript">
  trends.embed.renderExploreWidget("TIMESERIES", {
    "comparisonItem": [{
      "keyword": "google",
      "geo": "US",
      "time": "today 12-m"
    }],
    "category": 0,
    "property": ""
  }, {
    "exploreQuery": "q=google&geo=US&date=today 12-m",
    "guestPath": "https://trends.google.com:443/trends/embed/"
  });

</script>

but the chart does not appear. same if i copy-paste into the html of a fiddle. some old posts tell you to use an iframe, but their solutions don't render.

what am i doing wrong?

invictus
  • 1,821
  • 3
  • 25
  • 30

1 Answers1

0

this is an xframes issue (see related post). the embedded chart renders fine in chrome, but in safari it throws the error:

Refused to display [url] in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

from what i understand this is a safari issue, and there is nothing you can do.

invictus
  • 1,821
  • 3
  • 25
  • 30