Skip to content

Commit

Permalink
Measure improve (#290)
Browse files Browse the repository at this point in the history
* closes #127

* feat: update amplitude event name taxonomy

present-tense verb + object syntax with spaces and all in lowercase for clarity on when the event triggers

closes #102
  • Loading branch information
bhaskarSingh authored Mar 18, 2021
1 parent b599177 commit ff2964a
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions src/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default function HTML(props) {
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta
name="ahrefs-site-verification"
content="8cd0305e74b2fd42de579434ad307197d6dd94c55c34246110be242c4df562ea"
/>
<script
type="module"
src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tezos/academy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const CourseCard = ({ m, i, progress }) => {
)}
<button
onClick={() => {
trackEventWithProperties('Module-Click-From-Academy', {
trackEventWithProperties('click academy view module button', {
slug: m.frontmatter.slug,
});
navigate(`/tezos/academy/${m.frontmatter.slug}`);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tezos/claim-transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function Transaction({ location }) {
const result = await op.confirmation(1);
// Go to 3rd Step
setStep(3);
trackEvent('Bot-Minted-Successfully');
trackEvent('successful bot mint');
console.log('result 🔥', result);
} catch (err) {
console.log(err);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tezos/customizebot.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ const Customizer = ({ location }) => {
setArmCount(armCount);
setLegCount(legCount);

trackEvent('Claim-Bot');
trackEvent('click claim bot button');
}}
size="sm"
type="primary"
Expand Down
4 changes: 2 additions & 2 deletions src/templates/chapter-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ChapterTemplate = ({ data: { mdx: chapter }, location }) => {
);

useEffect(() => {
trackEventWithProperties('Chapter-View', {
trackEventWithProperties('view modules chapters', {
slug: `${chapter.frontmatter.filterBy}/${chapter.frontmatter.slug}`,
title: chapter.frontmatter.title,
});
Expand All @@ -81,7 +81,7 @@ const ChapterTemplate = ({ data: { mdx: chapter }, location }) => {
setIsChapterCompleted(true);
setStartingCode(chapter.frontmatter.editor.answer);

trackEventWithProperties('Chapter-Completed', {
trackEventWithProperties('successfully complete modules chapters', {
slug: `${chapter.frontmatter.filterBy}/${chapter.frontmatter.slug}`,
title: chapter.frontmatter.title,
});
Expand Down
4 changes: 2 additions & 2 deletions src/templates/chapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const ChapterTemplate = ({ data: { mdx: chapter } }) => {
});

useEffect(() => {
trackEventWithProperties('Learning_Interface_View', {
trackEventWithProperties('view modules chapters', {
slug: chapterList[index.current - 1].slug,
title: chapterList[index.current - 1].title,
});
Expand Down Expand Up @@ -231,7 +231,7 @@ const ChapterTemplate = ({ data: { mdx: chapter } }) => {
if (!chapterAlreadyExists) {
list.push(ch);
//track user progress on successful chapter completion
trackEventWithProperties('Chapter-Completed', {
trackEventWithProperties('successfully complete modules chapters', {
chapterSlug: chapterList[index.current - 1].slug,
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/chapterWithLiveEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const ChapterWithLiveEditorTemplate = ({
);

useEffect(() => {
trackEventWithProperties('Chapter-View', {
trackEventWithProperties('view modules chapters', {
slug: `${chapter.frontmatter.filterBy}/${chapter.frontmatter.slug}`,
title: chapter.frontmatter.title,
});
Expand All @@ -71,7 +71,7 @@ const ChapterWithLiveEditorTemplate = ({
typeof window != 'undefined' &&
localStorage.setItem('progress', JSON.stringify(progress));

trackEventWithProperties('Chapter-Completed', {
trackEventWithProperties('successfully complete modules chapters', {
slug: `${chapter.frontmatter.filterBy}/${chapter.frontmatter.slug}`,
title: chapter.frontmatter.title,
});
Expand Down
4 changes: 2 additions & 2 deletions src/templates/chapterWithLiveEditorOld.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const ChapterTemplate = ({ data: { mdx: chapter } }) => {
const liveProvider = useRef(null);

useEffect(() => {
trackEventWithProperties('Learning_Interface_View', {
trackEventWithProperties('view modules chapters', {
slug: chapterList[index.current - 1].slug,
title: chapterList[index.current - 1].title,
});
Expand Down Expand Up @@ -204,7 +204,7 @@ const ChapterTemplate = ({ data: { mdx: chapter } }) => {
if (!chapterAlreadyExists) {
list.push(ch);
//track user progress on successful chapter completion
trackEventWithProperties('Chapter-Completed', {
trackEventWithProperties('successfully complete chapters', {
chapterSlug: chapterList[index.current - 1].slug,
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/components/chapter/CodingInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const CodingInterface = ({
className={`bg-base-500 hover:bg-base-600 flex items-center pl-2 pr-4 focus:outline-none`}
onClick={() => {
setShowAnswer(true);
trackEventWithProperties('Show-Answer-Clicked', {
trackEventWithProperties('click on show answer', {
slug: `${module}/${chapterSlug}`,
});
}}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function LessonsOverview({ data: { mdx: module } }) {
}, [module.frontmatter.slug]);

useEffect(() => {
trackEventWithProperties('Module-Overview-View', {
trackEventWithProperties('land on modules overview page', {
slug: module.frontmatter.slug,
title: module.frontmatter.title,
});
Expand Down

0 comments on commit ff2964a

Please sign in to comment.