New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analytics: some IDs/classes to track clicks on teacher /courses #20826
Conversation
Still figuring out the best way to markup pages for easy analysis in Google Tag Manager. For now, the course explorer and the grade band course blocks on /courses for teachers get classes of clicktag for tracking clicks and linktag for tracking link follows. Each gets a unique ID as well.
@@ -136,6 +140,7 @@ | |||
} | |||
|
|||
courses << { | |||
id: "csfe", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call this exp
instead? I think it's too easily confused with CSF Course E.
%button.launch{style: "font-size: 12px"} | ||
Learn more | ||
- if course[:course_link] | ||
| ||
%a{href: course[:course_link]} | ||
%a.linktag{id: "course-link-#{course[:id]}", href: course[:course_link]} | ||
%button.course-explorer-gray-button{style: "font-size: 12px"} | ||
View course | ||
.arrow_box_close{style: "position: absolute; right: 10px; top: 0px; cursor: pointer", data: {courseindex: course[:regular_order]}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's cool we can track open/close too! Do we also count clicking 'x' as a close? I don't think we need to distinguish it from clicking the block, but would like to make sure that a close counts either method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I don't track clicking 'x', but at any rate, because this is a toggle, we don't differentiate opening/closing.
Rather, my idea was that by focusing on unique events (rather than total), we could only count the first click on a bar for any category, which would always be the first open for that category.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok! I think that's still fine. So we're basically finding out
- Do people know this is clickable?
- Do they look at a course and which one?
- Do they actually click from the course explorer to learn more?
- Or do they go through the grade bands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
When tracking clicks, we want the click to come through on the element that has the class & ID set, so any children are set to not have pointer events. Also just a couple other tweaks to match with what we want to receive in Google Tag Manager.
Still figuring out the best way to markup pages for easy analysis in Google Tag Manager. For now, the course explorer and the grade band course blocks on
/courses
for teachers get classes ofclicktag
for tracking clicks andlinktag
for tracking link follows. Each gets a unique ID as well.This will track clicks to expand Course Explorer rows (also clicks to contract, but we can count "uniques" to get just the expansions), clicks on links in the Course Explorer, and clicks on the three grade band course blocks.