In this post, i’ll tell you how to add Google Trande graph in your pages and posts.
Google Trends is a public web facility by Google, based on Google Search which shows how often a particular search-term is entered relative to the total search-volume across various regions of the world, and in various languages. The horizontal axis of the main graph represents time (starting from 2004), and the vertical shows how often a term is searched for relative to the total number of searches globally!
Below the main graph, the popularity is broken down by countries, regions, cities and also language. But that what Google calls “language”, however, does not display the relative results of searches in different languages for the same term/terms. It only displays the relative combined search volumes from all the countrieswhich share a particular language. It is possible to refine the main graph by region and time period.
Paste the following code to the functions.php file.
Also add a ” + ” between multiple words which are part of a single query.
For displaying the chart, you would need to place within your post the following shortcode :
[trends h="450" w="500" q="wpsnipp,wordpress,+wordpress+theme,+wordpress+plugin,+wordpress+snippets" geo="US"]
You can also change the values for the width, height, query and geolocation as by default the geo location is set to United States!!
Thanks to Kevin Chard for the code!