Add An Awesome, Dynamic Google Chart To Any Wordpress Site

Goals Of This Exercise -

  • Update a WordPress site with awesome, dynamic Google Chart.
  • Dynamically host the data so that anyone who has access to Google Spreadsheets can make changes.

1.  First step.

  • Login to your wordpress website/wp-admin and enter your login and password
  • Go to the Appearance tab on the left hand side, then select Editor.

Wordpress wp-admin navigation element.

Wordpress wp-admin navigation element.

2. On the right hand side of the page, select the header template.

Wordpress templates navigation on the Appearance > Editor page in wp-admin.

Wordpress templates navigation on the Appearance > Editor page in wp-admin.

3.  Scroll down to where the </head> statement is and place the following code right before </head>

<script type="text/javascript" src="https://www.google.com/jsapi"></script>

4.  Click the "Update File" button.

5.  Now, select "Pages" from the left-side navigation.

Wordpress wp-admin navigation element

Wordpress wp-admin navigation element

6.  Click "Add New" under Pages.

7.  Name the page something meaningful as this is a test.

8.  Above the page edit toolbar is a "Visual" and "HTML"" tab - click the "HTML" tab.

9.  Add the following code to the text box.

<div id="chart_div" style="width: 900px; height: 400px; "></div><script type="text/javascript">
     google.load("visualization", "1", {packages:["corechart"]});
     google.setOnLoadCallback(drawChart);
     var sampleTable = [];
     var reportTitle = '';
     jQuery.getJSON( "https://spreadsheets.google.com/feeds/list/0AjskNiVWKcl8dHBvc3Z6ZDd5cmtjbXV2eDVDX0xTRnc/od6/public/values?alt=json",
 function (data) {
    var item = "";
    reportTitle = data.feed.title.$t;
    jQuery.each(data.feed.entry, function(i,entry) {sampleTable.push([entry.gsx$task.$t, parseInt(entry.gsx$hoursperday.$t)]);});             
  });
  function drawChart() {      
      var data = google.visualization.arrayToDataTable(sampleTable);
      var options = {
      title: reportTitle   };
     var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
   chart.draw(data, options);
   }
   </script>

10.  Click "Save Draft."

11.  Open a new tab in your browser and navigate to your Google Drive/Docs account.

12.  Once there, create a new spreadsheet.

Google Drive / Docs create new document page element.

Google Drive / Docs create new document page element.

13.  In cell A1, enter Task

14.  In cell B1, enter Hours Per Day

15.  In column A, goto row 2 and begin entering daily activities

16.  In column B, goto row 2 and begin entering corresponding number of hours spent per activity.

17.  Your Google Spreadsheet could look like the following.

Google Spreadsheet example showing two columns  with titles and data.

Google Spreadsheet example showing two columns  with titles and data.

18.  Now, click File > Publish To The Web, and you should see the following.
Google Spreadsheets publish options page element.

Google Spreadsheets publish options page element.

19.  Select the name of the sheet you need to publish.

20.  Make sure the automatically republish when changes are made (every 5 minutes).

21.  Copy and paste the entire link from the last text box to notepad - see below.

Google Spreadsheets URL example.

Google Spreadsheets URL example.

22.  Grab the value after key= up until &single, so the resulting cut and paste should look like the following

0AjskNiVWKcl8dHBvc3Z6ZDd5cmtjbXV2eDVDX0xTRnc

23.  Go back to the tab opened previously in wp-admin, and find the spreadsheet key in the code and replace it with the one in your clipboard.  It’s underlined in red in the image below.

Wordpress HTML view on the New Page screen in wp-admin.

Wordpress HTML view on the New Page screen in wp-admin.

24.  Click the "Save Draft" button, then click the "Preview" button.

Sample Google Pie Chart updated with Google Spreadsheet data.

Sample Google Pie Chart updated with Google Spreadsheet data.

25.  Go back into the Google Spreadsheet and rename the tab from Sheet1 to Daily Activities.

26.  Select File > Republish Now

27.  Go back into your Wordpress page from step 24 and refresh the page.

Sample Google Pie Chart with updated Title

Sample Google Pie Chart with updated Title

That's it.  Enjoy.

Killer Pinterest-Style Product Image Pages for eCommerce Sites.


People are visual searchers.  Through trial and error that has been discovered.  As a result,  Pinterest rose.

According to data collected from multiple websites, product images are still one of the most important aspects in selling products online.  In fact, having the most beautiful images that clearly represent the product are what's really necessary.  If you sell apparel and offer multiple colors, then your product images should reflect your color options, etc, etc.  

Knowing that people are visual searchers and images are still a big part of conversion,  leads me a new direction in eCommerce product page design: Pinterest-style product pages.

On JustBats, there's a defined zone for photos, but what happens when there are more photos for that responsive space?  Here are two views of the responsive page.  Notice the screenshot on the right?  It includes an extra black box with yellow arrow pointing down.

Three-column width image viewer

Two-column width image view with overflow present

To have the complete picture in your head, let me explain how JustBats collect photos.  JustBats has photographers on staff who take photos of all the products when they come in, then there are contests that JustBats run year-round which allows procurement of  user-generated photos from customers, and finally, JustBats obtains photos from our vendors.  All of these photos are measure independently and in aggregate.  Seeing the multiple ways JustBats collects photos should shed some light on how this problem could ever become a reality in the first place.

I don't remember who was first, but once one did it, they all started, then came Pinterest.  What am I talking about?  The endless-scrolling search engine image search user-interface.  Search for Mickey Mouse in images on Google or Bing and you'll get an insanely visually experience where, you, as the user, can choose from a multitude of Mickey Mouse result images in all shapes, sizes, and colors.  Did Pinterest come before the new image search capability in Bing and Google?  I'm not sure who copied who here.  Anyway, the point is that Pinterest is here now and one of the most fastest growing websites on the Internet right now.  It's visual nature makes search intuitive, and with infinite scrolling, Pinterest makes it easy to slam content at it's users.  I will not go into the fact that most of the content on Pinterest in copyright-infringed, but that just proves the interface works so much so that Pinterest is willing to take a reactive stance to copyright infringement.

So when will this trend hit eCommerce?  Could it take a long time?  

I think so.  I say that because most eCommerce shops do not have multiple images for the product they sell.  There are a few exceptions.  One that comes to mind is NewEgg.  They have included a popup page "image viewer" for years.  The only problem is that the thumbnails are too small.  That's the main problem the Pinterest-interface solved.  Here’s the NewEgg product page for a lenovo laptop.

Now, by clicking on the three ellipses, a shadow-box is visible which includes the same visual metaphor that was on the product page.  

The same image is presented, and the other thumbnails are small just like when I was on the product page.  Only difference is that all the thumbnails are present and the interface allows for some overflow.  But what about showing all the images of equal or proportal value, then when I hover or click, increase the size.

People, the modern day eCommerce image viewers are dead and worthless.  How many times have you hovered over an image on an eCommerce site and it zoomed, but the before and after zoom level ended up being the same.  I feel jipped when this happens.  How about you?

There is seo value for separating your content, as well.  The way NewEgg does it puts all their eggs in one product page.  See the classic eCommerce url as well - http://www.newegg.com/Product/Product.aspx?Item=N82E16834310637&cm_sp=DailyDeal-_-34-310-637-_-Homepage.  Homepage / Product / Id.  Consider this url Homepage / images / Product Name which includes all the images plus a “ready to buy” section.

Could this be done for more than just images?  Sure!  A number of years ago JustBats created separate video, Q & A, and reviews pages.  The results have been great.  The key is to minimize duplicate content.

On the JustBats product page, the number of reviews and questions and answers are limited.  For example, customers seeking the entire list of reviews for an individual product are provided a link.  See screen shot below.

See the link above labeled, see all 74 reviews about the 2013 product.
The page url changes from Homepage / Product / Product Name to Homepage / Reviews / Product Name.  Therefore, the SEO benefit come when a customer is searching in Google or Bing for the product name or reviews of the product name, JustBats has two links present.  SEO gold.

My idea of a image product page is below.

So now that Pinterest has spoiled everyone, how long will it take for you to update your eCommerce website with this new user-interface?

20+ Custom Google Analytics Dashboards

If you are not using Google Analytics, you need to start using it.  Start here at www.Google.com/analytics, then come back once you have some data and read the rest of the article.  If you are using Google Analytics, are you leveraging dashboards?  Probably not.  If you’re anything like me and have tried to build a widget for a dashboard, you gave up, like I did.  Too tedious and time-consuming.  

Not anymore.

For over a year now, others can build Google Analytics dashboards, and share them with the world.  In fact, it’s gotten so out-of-hand there’s now a niche dashboard site called dashboard junkie dedicated to the Google Analytics dashboard.  

To get more details about Google Analytics dashboards, start at the about dashboards page.  From there, you can learn how to build your own dashboards.

However, if you’d rather have instant gratification, here are some links and sources for some bad ass dashboards that are already developed and are simply one click away from your Google Analytics accounts.

Behavior Google Analytics Dashboards

Visitor Behavior - Source Mike Meisner mikemeisner.com

Brand Google Analytics Dashboards

Brand Awareness - Source Koozai koozai.com
Brand Engagement - Source Koozai koozai.com

Blog Google Analytics Dashboards

Basic dashboard - Source Justin Cutroni Cutroni.com/blog
Wordpress blog dashboard - Source Yoast Yoast.com

Content Google Analytics Dashboards

Content performance - Source Blue Riot Labs Blueriotlabs.com
Content dashboard  - Source Justin Cutroni Cutroni.com/blog

eCommerce  Google Analytics Dashboards


eCommerce Dashboard - Source Portent Portent.com
Daily dashboard - Source Justin Cutroni Cutroni.com/blog
Site Conversion - Source Mike Meisner mikemeisner.com
Revenue Dashboard - Source Mike Meisner mikemeisner.com

Geography Google Analytics Dashboards

Geography Dashboard - Source Mike Meisner mikemeisner.com

Lead Generation Sites Google Analytics Dashboards


Lead Gen Dashboard - Source Portent Portent.com

Mobile eCommerce Google Analytics Dashboards


Mobile Dashboard - Source Mike Meisner mikemeisner.com
Mobile Dashboard - Source Justin Cutroni Cutroni.com/blog

PPC Google Analytics Dashboards

PPC Dashboard - Source Koozai koozai.com
PPC Report - Source Koozai koozai.com

SEO Monitoring Google Analytics Dashboards

360 SEO view of data - Source SEO Book SEOBook.com
This week VS Last week - Source Blue Riot Labs Blueriotlabs.com
SEO Dashboard - Source Koozai koozai.com
Organic Search - Source Mike Meisner mikemeisner.com

Site Performance Google Analytics Dashboards


Performance Dashboard - Source Justin Cutroni Cutroni.com/blog
Geek Dashboard - Source Justin Cutroni Cutroni.com/blog
Site Usage - Source Mike Meisner mikemeisner.com
Weekly overview - Source Mike Meisner mikemeisner.com

Social Media Google Analytics Dashboards


Social Dashboard - Source Justin Cutroni Cutroni.com/blog
Social Dashboard - Source Mike Meisner mikemeisner.com

Here's a sample of the site performance dashboard appears once it's installed.