0

I am embedding google Trends into a HTML page and want to pass phrases including umlaut characters like ö,ä and ü.
But the chart always comes out empty.

I tried different encodings for these characters like: (example with ö)

H%25C3%25B6rfigur 

or

H%C3%B6rfigur 

or

H%F6rfigur

I tried this code:

<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/925_RC01/embed_loader.js"></script>
  <script type="text/javascript">
    trends.embed.renderExploreWidget("TIMESERIES", {"comparisonItem":[{"keyword":"H%25C3%25B6rfigur","geo":"AT","time":"today 5-y"}],"category":0,"property":""}, {"exploreQuery":"geo=AT-4&q=sheep","guestPath":"https://trends.google.at:443/trends/embed/"});
  </script>

Please help me, i am working hours for this now!

Tazbirul Haque
  • 233
  • 1
  • 3
  • 15
Hackl G
  • 1
  • 1

1 Answers1

1

Did you try going to google.com/trends/explore and copying from the embed dialog?

e.g. for https://trends.google.com/trends/explore?q=%C3%BCber, I get the following embed code, which works fine:

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

Is it possible your query simply doesn't have enough data to display?

Shalev Manor
  • 131
  • 7