Paste Google Trend HTML into Canvas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd like to embed a Google Trend line graph into a Canvas page, so that it automatically updates. I tried pasting the code that Google provides into the html editor, but when I save it there is nothing on the page. The code is below.
<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/3011_RC01/embed_loader.js"></script> <script type="text/javascript"> trends.embed.renderExploreWidget("TIMESERIES", {"comparisonItem":[{"keyword":"/m/036m6","geo":"US","time":"2004-01-01 2022-06-27"}],"category":0,"property":""}, {"exploreQuery":"date=all&geo=US&q=%2Fm%2F036m6","guestPath":"https://trends.google.com:443/trends/embed/"}); </script>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @carofitz
Thank you for contacting the Canvas Community. We're sorry to hear you've been experiencing issues with embedding Google Trends data into a page. We also tried embedding that code using the HTML editor but there is nothing to display. The Canvas HTML editor is a pretty simple setup. It isn't like github or other platforms with customizing scripts for JS, HTML, CSS specifically etc. However, you may want to revisit the code from Google Trends as there may be some missing content here. Unfortunately, canvas doesn't really support custom HTML but it is an option for you to use. You'd either need to speak with a CSM about setting up something custom, reaching out to google to confirm the embed code is all here, or pasting an external link to direct users to the data directly. Hopefully this helps!