Blogs

By George Papadongonas 27th September 2012 Drupal

In the first part of this series, we discussed how to install and configure the Google Analytics Reports module for Drupal and display some basic metrics. In this second part, we are going to examine how to create your own custom dashboards, using the Google Analytics Core Reporting API. The latest update of the API on September 18th, added a lot of new Metrics and Dimensions related to social and mobile and now gives us the ability to create more useful marketing reports.

So, for our example, we are going to create a Social Media Dashboard, to track social activities and see if and how they drive engaged users and qualified traffic. Here’s how the final Dashboard will look like:

To create these reports, you have to to use the 7.x-3.x-dev version of the GA Reports module, as it offers integration with Views 3. You also need to apply this patch that adds all the new "datapoints" as Views Fields.

After the module installation, you will be able to create a new view, with the option to use Google Analytics data:

In order to build the Dashboard, first you have to create different Views Content Panes and then, using Page manager to build a custom Dashboard page with Panels. To create the Views, you can use all the available GA dimensions and metrics as fields, filters and sort criteria.
The first pane, named Social Visits, displays the most important Social Networks that drive traffic to the site, sorted by the number of visits.. In order to build it, you have to use the following settings:

There are three fields: The dimension ga:socialNetwork will represent the different Social Networks as rows in the table and the metrics ga:visits and ga:visitBounceRate will represent the two columns that display visits and bounce rate.

The second pane, Social Mobile Visits, displays identical data, but only for visitors that used a mobile device. The view is similar, but this time you have to use an extra filter for the mobile users.

The next pane, Social Mobile Visits by Device, displays the specific mobile devices that the visitors from Social Networks used. Google Analytics provides again the right metrics to track this kind of data:

In our fourth report, Landing Pages for Social, tracks the major Landing Pages for Social Networks Visits, helping to understand and optimize the visitor’s flow.

The fifth report, Social Actions, tracks the social actions that visitors perform in the site. If you’re using social buttons, you have to follow the directions from Google Analytics documentation, in order to track Facebook likes or tweets in the website.

In the final report, Goal Completion by Source, we display the total number of conversions for the main social sources.

The final step is to create a Page from Page Manager (admin/structure/pages/add) and add the View Panes to the Panels Layout:

Using the same method and with a little help from the Google Analytics API Documentation and Query Explorer, you can create any dashboard for different departments or specific needs (ex. Newsletter Dashboard, SEO Dashboard etc) and you can give access only to specific users or roles.

In the next part of this series, we are going to examine how we can use the Google Charts API to produce charts and present the Google Analytics data in a more interesting and useful manner.

This week Apple's iOS 6 certainly made some headlines. Here are five other stories that caught our attention.

Drupal

Drupal Answers: Drupal 6 end of life
Wondering when, our old friend, Drupal 6 will reach its inevitable end of life and what that means? Here are some good answers.

Drupal Usergroup Schweiz "Drupal Commerce" Treffen
The October edition of the Drupal Usergroup in Zurich will feature a special guest.

Technology

Wired: Happy 30th birthday, emoticons! *<:)
You won't be aware of Scott Fahlman but his "invention" celebrates its 30th birthday this week. Happy birthday!

Opinion

.net magazine: Burned by PayPal
PayPal certainly is the Marmite of online services. Craig Grannell takes a look at events which suffered from the payment provider.

This & That

The Amazing iOS 6 Maps
The new maps on Apple's latest version of iOS certainly created a lot of noise. This blog post features the oddest bugs found by users.

By George Papadongonas 19th September 2012 Drupal

As the ability to calculate digital marketing return on investment (ROI) is critical and even the C-suite cares about conversion rates, web analytics are becoming more important. All the members of an organization start to demand more information about the web site’s statistics. As it is not enough any more to just create reports about visits and pageviews, the access to different data for different persons became necessary.

Of course, we could start creating custom dashboards inside Google analytics, but then we would have to create credentials for different persons and also train them on how to use Google Analytics (GA) and how to locate important to them information.
 
Using the Google Analytics Reports module, we can begin by easily creating a dashboard with the basic metrics inside our Drupal web site. Then, by using the Google Analytics Data Export API, we can create custom reports, to inform for example the management for KPI’s of different channels, like SEO, social media or newsletter campaigns. There reports will be easily accessible by just signing in with their Drupal accounts, without the need to use an external system. 
 
The first step is to install the Google Analytics Reports module. Prerequisites are the Google Charts API module and the OAth module. Do not forget to set the module’s permissions about who has access to the reports.
 
After installing the modules, you have to authorize your site to use data from Google Analytics, from admin/config/system/google-analytics-reports. If your domain is registered with Google Apps for Business, you can enter it in the related field. The easiest way is to authenticate with your Google Analytics account, by clicking on “Start setup and authorize account”.  
 
 
In the next step, you allow access to your Google Analytics account from the website, to obtain access to the data. If you have multiple GA profiles, you choose the appropriate one. In this step you can also choose a Query cache period, as the GA quota is 50,000 requests per project per day. 
 
 
After this step, the basic dashboard is ready at: admin/reports/google-analytics. The layout and the provided information are too basic, but at least we now have a framework to start creating our ideal dashboards.
 
 
There are also two blocks named “Google Analytics page traffic” and “Google Analytics site visits” that can be enabled for specific roles.
 
 
In the next part we are going to examine how we can use the Google Analytics Data Export API, to create more useful reports and how we can customize their layout.
 

This week the Essence of a web week takes a look at a iPhone 5 related story, the roadmap of Drupal 8 and what Twitter could learn from Amazon. Enjoy!

Drupal

Dries Buytaert: Updated Drupal 8 release schedule
A must read article for all interested in the roadmap of the next release of Drupal.

Drupalize.me: The Learn Drupal Ladder
The Drupal ladder is a community initiative to get more people to help working on Drupal core. Here are some screen casts to teach you the essential skills required.

Responsive Design

.net magazine: Devs ponder iPhone 5 web design impact
The biggest technology announcement of the week raises some questions for developers.

Opinion

Binary Bonsai: The Amazon Doctrine
Michael Heilemann, passionately, makes a point that Twitter should take a page out of Amazon's book.

This & That

Milwaukee Police News
'Dress to impress' isn't a idiom you would immediately associate with any police force. But the Milwaukee Police manages to break that stereotype with their fancy parallax scrolling website.

By Kathryn McClintock 11th September 2012 Events

Last week we attended the 2nd annual Frontend Conference, a two-day event organized by the awesome people of the Frontend Conference Association Zurich. Our Michael Schmid (@Schnitzel) is part of that team.

This year was a great success — and at capacity with 250 attendees!

The event is split into two sections: a Design track and a Tech track. Each hour, participants choose between one of two sessions from either subject.

As the pictures reveal, the rooms were full and the speakers engaging.

At the end of the first day, once everyone's minds are sufficiently racing with new ideas and inspiration, you can unwind at a conference afterparty with tasty food, relaxing conversation, and lots of beer.

Did we mention tasty food?

If you haven't made it out to the Frontend Conference yet, we highly recommend it. The event attracts excellent, industry-leading speakers, connects people with common goals, and is generally, just a fantastic time:

What caught our attention this week: Gamification, India, Obama 2012 and more.

Drupal

Data Portal India
The world largest democracy has launched a beta version of its new open data platform. Like the UK, India chose to go with Drupal as the Content Management Framework.

Gábor Hojtsy: Drupal 8 Multilingual Sprint report from Munich
If you are a regular reader you will know that one of the areas were we contribute to the Drupal community is in multilingual solutions. Here is the Drupal 8 Multilingual Initiative leader's round up of the D8MI sprint in Munich where we were present and contributing.

Gamification

Mathias Menzl: Interaktionsraten auf joiz
Swiss TV station joiz fames itself with the deepest integration of social media of all TV stations in the country. Besides social media, joiz has integrated gamification elements in its website and mobile app to improve the viewers experience. Here are some facts and figures. (Unfortunately their blog post is only available in German.)

Technology

The Verge: Sir Tim Berners-Lee's Web Index measures the Internet's impact on society
This week the inventor of the World Wide Web, Sir Tim Berners-Lee, launched the Web Index. The goal of this tool is to measure the impact of the internet across countries.

Social Media

Mashable: Obama Digital Chief: ‘Winning’ Online Conversation Not Our Objective
Joe Rospars, Obama's chief digital strategist, gave some insight on the focus of the social media strategy for the reelection campaign.

By Michael Schmid 4th September 2012 Fun, Team

Everybody tries to live a healthy life and be more active, but usually we find better things to do: go out with friends, work or just enjoy a glass of wine and a movie at home. Of course the guilty conscience is there, but it is easily suppressed. This is the problem Nike attempts to solve with the FuelBand.

The FuelBand is a small device in the form of a bracelet, which measures your body's movement and awards you Fuel points based on your activity level. You set your own daily goal. Guess what happens in the evening when you realize you're 500 fuel points off your target? You find yourself taking the stairs or going out for a walk. Welcome to your gamified life! It might sounds silly, but it really works and it's cool!

Because gamification works even better when competing in a team, every team member at Amazee Labs has a FuelBand. To make it even more fun, our daily stats are displayed on our team page! So everyone can see who was most active in the past week. Unfortunately Nike doesn't provide an API for the Fuel points yet, but this didn't stop us from finding a way to show the data on our website.

How we got it working

We built a small scraper to grab the daily statistics about fuel points, distance, steps, calories and activity time. Luckily the new Nike+ website is heavily based on JavaScript. While analyzing the profile page, we realized there's a JavaScript object called "window.np.secondMostRecentActivity." This object contains all the interesting information for a full day's worth of activity. It was easy to parse this information in PHP, save it in a database and display on the website.

Because we believe in open source, you can download our solution from GitHub!

Nike has announced they will provide an API in the future but nothing's happened yet, so let's hope this initiative brings them to publish something in the near future.

Come on Nike, just do it, so we can make it count and find our greatness!

This week's Essence of a web week takes a look at open source certification, The White House's contribution to Drupal and takes a look at the BBC's Search Engine Optimisation. Enjoy!

Drupal

Drupalcon Munich: Drupal 8: What you need to know
Angie Byron's session on Drupal 8 was no doubt one of the stand out presentations. The 50 minute recording will bring you up to date with the upcoming release.

Dries Buytaert: White House contributes to Drupal
The White House, one of Drupal's favourite show cases, has decided to contribute the code behind its petitioning platform "We the People" .

Conversion

Google Analytics In Real Life - Online Checkout

Jeffrey Zeldman shared this gem of a Google Analytics advertisement on his blog this week. As an agency that also offers web analytics services we can wholeheartedly agree with the essence of it.

BBC Internet Blog: Search Engine Optimisation
Over on its "Internet Blog" the BBC tech team shares insight into its experiences. Last week they started a series on SEO which, by the size of the BBC's web presence, promises to provide some interesting findings. Here are the first two parts of the series: A Journey through Search Engine Optimisation & Search Engine Optimisation: Rebuilding Food

Opinion

Kris Buytaert: Open Source Certification, Friend or Foe
Kris Buytaert, chair of the DevOps track at DrupalCon Munich, shares his view on the value of open source certification based on previous experiences with Redhat.

By Michael Schmid 27th August 2012 Drupal

DrupalCons are not only a great place for sessions and parties, they also provide a great source for training, "Birds of a Feather" sessions, general discussions and sprints.

Let's illustrate the power of the latter: Sprints mostly happen in a large room with a lot of working space, fast internet and enough power. The Drupal community leverages the opportunity of having so many people working together, in person, to accomplish things that would be more difficult to achieve while collaborating online.

The biggest sprint at DrupalCon usually takes place on Friday. This year there were over 400 Drupalistas working together on Drupal 8 and other topics such as documentation, usability, contributed modules, etc.

There is also an initiative called "Get Involved with Core", which helps beginners contribute to the core of Drupal. Because many beginners think that being a core contributor means you need at least five years of experience with Drupal, this is a great opportunity to show them that this is not the case. Of course there is a lot of deep and interminable discussions, but there are also many issues which are easy tasks for beginners to start with. Check out the novices issues here.

A tradition which evolved in the last few years is that Drupal creator, Dries Buytaert, commits a patch directly on stage at the sprint. Last year at DrupalCon Denver he committed a patch which was contributed by Kathryn and me.

 
But the sprint fun isn't limited to Fridays. This year there were sprints happening days before and after the conference. One of the main topics was the Drupal 8 Multi-language initiative where the Amazee Labs team was heavily involved and directly contributing code. It was a great experience where we got a lot of things done, had important discussions and of course, had a lot of fun.
 
So in case you are attending one of the next DrupalCons, definitely plan to stay for the sprint day and help push Drupal to the next level!
 
By Andrew McClintock 27th August 2012 Drupal, Events, Team

Last week nearly 2,000 lovers of Drupal descended on Munich, Germany for Drupalcon Europe 2012.  From keynotes and code sprints to sponsor booths and beer gardens, the Amazee Labs team had the four-day event covered from every angle. What follows is a cinemagraphic look back at our time in Munich. We'll see you all next year, in Prague!

Pages

Subscribe to Amazee Labs Blog

Latest comments

  • Daniel's picture

    By the way, by "no documentation" I´m referring to Views Autorefresh. It is either not complete or conflicting.

    Daniel
  • Daniel's picture

    Thanks for this info, but can't get it working with Statuses view. There is just about no documentation or it's conflicting, even from module maintainer (on Drupal vs. Blog). I'm using the default Statuses block, which only autorefreshes the current user's status updates, does not autorefresh friends' status updates (that is how it normally works). So I added Views Autorefresh. I have tried using the maintainer's instructions, but don't get a Secondary Display on the original view unless I have a Page display within that same view. Have you tried with Statuses? Just to confirm your steps:
    1. First, I clone the original view and ADD a Contextual filter. In mine it is Statuses Comments: Created time (with operator).
    2. ADD to the cloned view the Global: Text Area, PHP. Nothing else in the Header. Have also tried it with a simple Global: Autorefresh.
    2. In the ORIGINAL view, I ADD the same Global: Text Area, PHP code. Nothing else in the Header or contextual filters?

    I've tried just about every variation and nothing works. Can you offer any advice?
    Thanks
    Daniel

    Daniel
  • katalog's picture

    Excellent way of explaining, and pleasant post
    to obtain data on the topic of my presentation topic, which i am going to deliver
    in college.

    katalog