Moodle Google Analytics
Step 1: Set Up Google Analytics
Create a Google Analytics Account:
- Go to Google Analytics.
- Sign in with your Google account or create one if you don’t have it.
- Click on Start for free to set up a new property.
Create a New Property:
- Enter the name of your Moodle site as the property name.
- Set the reporting time zone and currency.
- Click Next and fill in the required business information.
- Click Create.
Set Up a Data Stream:
- Choose Web as your platform.
- Enter your Moodle site URL and give it a name (e.g., "Moodle").
- Click Create stream.
Get the Tracking Code:
- After creating the data stream, you’ll see the tracking ID and a JavaScript snippet.
- Copy the JavaScript code. This code will be embedded in your Moodle site to track user activity.
Step 2: Add Google Analytics Tracking Code to Moodle
Log in to Moodle as an Administrator.
Navigate to the Additional HTML Settings:
- Go to Site administration > Appearance > Additional HTML.
Insert the Google Analytics Code:
- In the Within HEAD section, paste the Google Analytics JavaScript code you copied earlier.
- It will look something like this:html
- <script async src="https://www.googletagmanager.com/gtag/js?id=YOUR_TRACKING_ID"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'YOUR_TRACKING_ID'); </script>
- Replace
YOUR_TRACKING_ID
with the actual ID provided by Google Analytics.
- Replace
Save Changes:
- Scroll down and click Save changes.
Visit Your Moodle Site:
- Open your Moodle site in a new browser tab.
Check Real-Time Data in Google Analytics:
- Go back to your Google Analytics dashboard.
- Navigate to Real-time > Overview to see live data.
- You should see your own visit tracked almost immediately.
Set Up Custom Dimensions (Optional):
- To track course-specific data, you can set up custom dimensions in Google Analytics. This is an advanced feature that allows you to capture specific information, such as course names.
- In Google Analytics, go to Admin > Custom Definitions > Custom Dimensions.
- Click + New Custom Dimension and create a dimension (e.g., "Course Name").
- Follow the instructions to add this dimension to your tracking code in Moodle, or use Google Tag Manager to handle this.
Use Google Tag Manager (Optional):
- If you need more advanced tracking (like tracking user actions within courses), consider using Google Tag Manager. You can set up triggers and variables to capture specific user interactions.
Log in to Google Analytics:
- Navigate to the property you set up for Moodle.
Access User Data:
- Go to Audience > Overview to see information about users visiting your Moodle site.
- To view geographic data, go to Audience > Geo > Location.
Monitor Course Activity:
- Use Behavior > Site Content > All Pages to see which pages (courses) users are accessing.
- Filter or segment the data by specific pages that correspond to your courses.
Moodle Reports:
- Use Moodle's built-in reporting tools under Reports in each course to view basic activity data.
Install Plugins:
- Consider using plugins like IntelliBoard or Configurable Reports for more advanced analytics directly within Moodle.
Comments
Post a Comment