Easily Embed Google Trends Graph on Websites

by

Google Trends is one of the most popular SEO tool available for webmasters. The tool shows how often a term is searched with respect to total number of searches performed globally. You can find there Hot Searches (top 20 fastest rising search-terms) and Top Charts for search queries.

By having a look on the graphs, you can create great titles, tags and description for your posts to boost ranks in SERP. Other than preparing your content, the tool can also be utilized to show such trends on your webpages without any hassle. The graph content will be dynamic and will reflect latest data on the topics you have selected.

Time Graph

For example the graph below shows how Bitcoin gained interest over years.

Regional Interest Chart

Regional interest can also be well analyzed with the tool. Here is the chart for Barack Obama.

Embed Code

To embed these graphs on any HTML page, this code snippet can be used.

<script type="text/javascript" 
src="//www.google.co.in/trends/embed.js?hl=en-US&content=1&export=5&q=bit coin&w=500&h=330&cid=TIMESERIES_GRAPH_0">
</script>

Changing the Parameters

There are four parameters you can change to pass values to the graph.

  1. ′q′ : pass your query term to this parameter. Here I have used q=bitcoin for first graph and q=obama for the second one.
  2. ′w′ : width of the graph
  3. ′h′ : height of the graph
  4. ′cid′ : It shows what type of graph needs to be shown. These can be possible values for the parameter:
    • TIMESERIES_GRAPH_0 : for time series graph
    • GEO_MAP_0_0 : for regional interest chart (region wise map)
    • GEO_MAP_0_1 : for regional interest chart (city wise map)
    • GEO_TABLE_0_0 : for regional interest chart (region wise table)
    • GEO_TABLE_0_1 : for regional interest chart (city wise table)
    • TOP_QUERIES_0_0 : top 10 queries
    • TOP_ENTITIES_0_0 : top 5 related searches