Skip to content
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

Merged
merged 2 commits into from Feb 23, 2018

Conversation

breville
Copy link
Member

@breville breville commented Feb 22, 2018

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.

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.

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",
Copy link
Contributor

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]
&nbsp;
%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]}}
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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

  1. Do people know this is clickable?
  2. Do they look at a course and which one?
  3. Do they actually click from the course explorer to learn more?
  4. Or do they go through the grade bands?

Copy link
Member Author

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.
@breville breville merged commit df51e6f into staging Feb 23, 2018
@breville breville deleted the track-tags-teacher-courses branch February 23, 2018 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants