Top Banner
MOODLE AND GOOGLE ANALYTICS BAS BRANDS
31

Moodle and Google Analytics

May 06, 2015

Download

Technology

Bas Brands

Standard Google Analytics reporting takes the URL from the page to track the views.
With Moodle this means that it is not possible to easily track which activity URL belongs to what course within the Analytics.
This presentation looks at the work done to help address this issue and at the test of the solution during the Ireland & UK Moodlemoot.
Gavin Henrick was the original founder of this idea and together we found a solution.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Moodle and Google Analytics

MOODLE AND GOOGLE ANALYTICSBAS BRANDS

Page 2: Moodle and Google Analytics

I am a part freelance part employed webdeveloper. I enjoy programming with Moodle because of it’s excellent community and truly open source character

BAS BRANDS

Page 3: Moodle and Google Analytics

INTRODUCTION

Standard Google Analytics reporting takes the URL from the page to track the views.

With Moodle this means that it is not possible to easily track which activity URL belongs to what course within the Analytics.

This presentation looks at the work done to help address this issue and at the test of the solution during the Ireland & UK Moodlemoot.

Gavin Henrick was the original founder of this idea and together we found a solution.

Page 4: Moodle and Google Analytics

Advanced features :

- User behavior

- Custom charts

- Mailing of reports

- Pageload speed

- Traffic sources

- Demographics

- Mobile usage

- Visitor Flow

- Live statistics

ABOUT GOOGLE ANALYTICS (GA)

Page 5: Moodle and Google Analytics

<script type="text/javascript">

var _gaq = _gaq || [];

_gaq.push(['_setAccount', 'UA-000000-4']);

_gaq.push(['_trackPageview']);

(function() {

var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;

ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

})();

</script>

1. Register on:

http://google.com/analytics

2. Add your website

3. Receive the JavaScript code snippet

4. Embed in your Moodle theme layout files

HOW TO GET GOOGLE ANALYTICS FOR MOODLE

Page 6: Moodle and Google Analytics

SAMPLE ANALYTICS PAGE ON CONTENT

Page 7: Moodle and Google Analytics

SAMPLE OF A STANDARD GA REPORT OF MOODLE

Page 8: Moodle and Google Analytics

- Which course is the course with id = 13 ?

- In what course was the dialogue activity visited?

- What course category was visited most?

DEFAULT MOODLE REPORT IS HARD TO READ

Page 9: Moodle and Google Analytics

SAMPLE OF A GOOGLE ANALYTICS REPORT OF WORDPRESS

Page 10: Moodle and Google Analytics

- I can see which articles are viewed

- I can break it down into year, month, day

- I could create graphs of most viewed articles in May

DEFAULT WORDPRESS REPORT IS EASY TO READ

Page 11: Moodle and Google Analytics

STANDARD MOODLE URL’S

Page 12: Moodle and Google Analytics

- Which section is that resource linked in?

- Which course is that resource part of?

- Which category is that course in?

- Was it a student or an admin who clicked that link?

QUESTIONS WHEN LOOKING AT STANDARD MOODLE URL’S

Page 13: Moodle and Google Analytics

THE MOODLE URL’S WE WANT

Page 14: Moodle and Google Analytics

URL DESIGN

http://moodle.moodlemoot.ie/2012/delegatepack/Pre-Conference+Workshops/A+Moodle+2+Tool+Guide+for+Teachers

Category

Course Short name

Section name

Activity name

(Activity type)

Page 15: Moodle and Google Analytics

STANDARD ANALYTICS GRAPHS USING THESE URLS

Page 16: Moodle and Google Analytics

STANDARD ANALYTICS GRAPHS USING THESE URLS

Page 17: Moodle and Google Analytics

NOW THE FUN STARTS!COURSE OVERVIEW

Page 18: Moodle and Google Analytics

NOW THE FUN STARTS!COURSE OVERVIEW

Page 19: Moodle and Google Analytics

CREATING CUSTOM DASHBOARDS

Page 20: Moodle and Google Analytics

COURSE STATISTICS

Page 21: Moodle and Google Analytics

COURSE STATISTICS

Page 22: Moodle and Google Analytics

USER FLOW

Page 23: Moodle and Google Analytics

- JS snipped loaded by our browser

- setAccount var

- trackPageview var

- https://developers.google.com/analytics/devguides/collection/gajs/?hl=nl

ANOTHER LOOK AT THE GA JAVASCRIPT CODE

Page 24: Moodle and Google Analytics

FEED A URL TO THE JAVASCRIPT SNIPPET

Page 25: Moodle and Google Analytics

Code snippet that shows part of the URL design

- Section

- Activity type

- Activity name

- Action type

GENERATE A CUSTOM URL IN PHP

Page 26: Moodle and Google Analytics

GENERATE A CUSTOM URL

Page 27: Moodle and Google Analytics

THE FUTURE OF THIS PROJECTPage related variables

- category, role, department, uid ??

Logging of events

- activity completion, user created

Grades

- get grade statistics on course

Get GA data back into Moodle

- the emailed report

- creating your own graphs in Moodle

Page 28: Moodle and Google Analytics

GET GA DATA BACK

Page 29: Moodle and Google Analytics

GET INVOLVEDMore info on what has been done:

Blogpost by Gavin Henrick

http://www.somerandomthoughts.com/blog/2012/04/18/ireland-uk-moodlemoot-analytics-to-the-front/

Blogpost by Bas Brands

http://basbrands.nl/2012/04/18/google-analytics-with-moodle/

More info on

The GA JS snippet

https://developers.google.com/analytics/devguides/collection/gajs/?hl=nl

Google analytics Query explorer

http://ga-dev-tools.appspot.com/explorer/?csw=1

Getting Google analytics data using php

https://code.google.com/p/gapi-google-analytics-php-interface/

http://www.codediesel.com/php/reading-google-analytics-data-from-php/

Page 30: Moodle and Google Analytics

CONTACT US

Bas Brands

[email protected]

Twitter: bmbrands

Gavin Henrick

[email protected]

Page 31: Moodle and Google Analytics

Q&A / DISCUSSION

What about privacy?

Alternatives?

• Woopra

• Clicky

• Piwik (open source)

• Open Web Analytics (open source)

Read more: http://imimpact.com/web-stats-alternatives-to-google-analytics/

What about performance?