Normalize ga event data in shop.jade

Normalize ga event data in main.js

Normalize ga event data in bindings.js

Remove unecessary info in labels
This commit is contained in:
alanbares
2016-07-21 19:46:17 -07:00
parent b89a5a8443
commit e7a0379490
3 changed files with 13 additions and 13 deletions

View File

@ -147,7 +147,7 @@ window.common = (function(global) {
}); });
if (common.challengeName) { if (common.challengeName) {
window.ga('send', 'event', 'Challenge', 'load', common.gaName); window.ga('send', 'event', 'Challenge', 'loaded', common.gaName);
} }
$('.modal').on('show.bs.modal', function() { $('.modal').on('show.bs.modal', function() {

View File

@ -103,7 +103,7 @@ main = (function(main, global) {
if (!(event.ctrlKey || event.metaKey)) { if (!(event.ctrlKey || event.metaKey)) {
toggleMainChat(); toggleMainChat();
} }
window.ga('send', 'event', 'NAV', 'NAV-CHAT', 'Nav Chat Button Clicked'); window.ga('send', 'event', 'Nav', 'clicked', 'Nav chat opened');
}); });
function showMainChat() { function showMainChat() {
@ -220,7 +220,7 @@ $(document).ready(function() {
'&redirect_uri=http%3A%2F%2Ffreecodecamp%2Ecom%2Fmap'; '&redirect_uri=http%3A%2F%2Ffreecodecamp%2Ecom%2Fmap';
main.setMapShare(challengeBlockName); main.setMapShare(challengeBlockName);
window.ga('send', 'event', 'FB_LINK', 'SHARE', 'Facebook map share'); window.ga('send', 'event', 'Facebook', 'clicked', 'Shared on Facebook');
window.location.href = link; window.location.href = link;
}); });

View File

@ -9,7 +9,7 @@ block content
h4 Get 2 for only $5, with free shipping anywhere! h4 Get 2 for only $5, with free shipping anywhere!
p These durable 2" (5 cm) stickers sport a matte finish, and look great anywhere - especially on your laptop. p These durable 2" (5 cm) stickers sport a matte finish, and look great anywhere - especially on your laptop.
html. html.
<form action="//www.paypal.com/cgi-bin/webscr" onSubmit="ga('send', 'event', 'SHOP', 'SHOP-STICKER', 'Sticker PayPal button clicked');" method="post" target="_blank"> <form action="//www.paypal.com/cgi-bin/webscr" onSubmit="ga('send', 'event', 'Shop', 'clicked', 'Freecodecamp sticker');" method="post" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="R9AGYKJUCU37N"> <input type="hidden" name="hosted_button_id" value="R9AGYKJUCU37N">
<input type="submit" class="btn btn-cta signup-btn btn-block" name="submit" value='Get these with PayPal or a Credit Card'> <input type="submit" class="btn btn-cta signup-btn btn-block" name="submit" value='Get these with PayPal or a Credit Card'>
@ -24,7 +24,7 @@ block content
p Audible gives our community $5 when you you sign up for a free trial. p Audible gives our community $5 when you you sign up for a free trial.
p You get two free audiobooks immediately. You can cancel any time and still keep your audiobooks. p You get two free audiobooks immediately. You can cancel any time and still keep your audiobooks.
p If you don't cancel within 30 days, you get one audiobook per month for $15/month. p If you don't cancel within 30 days, you get one audiobook per month for $15/month.
a.btn.btn-cta.signup-btn.btn-block(href="//www.amazon.com/gp/product/B00NB86OYE/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00NB86OYE&linkCode=as2&tag=out0b4b-20&linkId=dfacf0a194dcd3d1c9376f64ed690214" onClick="ga('send', 'event', 'SHOP', 'SHOP-AUDIBLE', 'Audible affiliate button clicked');") Get two free audio books a.btn.btn-cta.signup-btn.btn-block(href="//www.amazon.com/gp/product/B00NB86OYE/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00NB86OYE&linkCode=as2&tag=out0b4b-20&linkId=dfacf0a194dcd3d1c9376f64ed690214" onClick="ga('send', 'event', 'Shop', 'clicked', '2 free audio books');") Get two free audio books
hr hr
.row .row
@ -32,7 +32,7 @@ block content
img.img-responsive.img-center(src='//i.imgur.com/BTtb8P0g.jpg') img.img-responsive.img-center(src='//i.imgur.com/BTtb8P0g.jpg')
h3 Get $10 in credit for your own Digital Ocean server h3 Get $10 in credit for your own Digital Ocean server
p Digital Ocean gives our community $25 in credit after you spend $25. p Digital Ocean gives our community $25 in credit after you spend $25.
a.btn.btn-cta.signup-btn.btn-block(href="//m.do.co/c/ba8a71773373" target='_blank' onClick="ga('send', 'event', 'SHOP', 'SHOP-DIGITAL-OCEAN', 'Digital Ocean affiliate button clicked');") Claim your $10 credit a.btn.btn-cta.signup-btn.btn-block(href="//m.do.co/c/ba8a71773373" target='_blank' onClick="ga('send', 'event', 'Shop', 'clicked', '$10 Digital Ocean credit');") Claim your $10 credit
hr hr
.row .row
@ -40,7 +40,7 @@ block content
img.img-responsive.img-center(src='http://i.imgur.com/YqZqTN6g.jpg') img.img-responsive.img-center(src='http://i.imgur.com/YqZqTN6g.jpg')
h3 Buy some affordable domain names h3 Buy some affordable domain names
p Namecheap gives our community a 15% commission on your first purchase. p Namecheap gives our community a 15% commission on your first purchase.
a.btn.btn-cta.signup-btn.btn-block(href="//www.namecheap.com/?aff=102130" onClick="ga('send', 'event', 'SHOP', 'SHOP-NAMECHEAP', 'Namecheap affiliate button clicked');") Get your domain name a.btn.btn-cta.signup-btn.btn-block(href="//www.namecheap.com/?aff=102130" onClick="ga('send', 'event', 'Shop', 'clicked', 'Namecheap domain');") Get your domain name
hr hr
.row .row
@ -50,34 +50,34 @@ block content
.spacer .spacer
img.img-responsive.img-center(src='//i.imgur.com/hV9F2bo.jpg' alt='Cracking the Coding Interivew book cover') img.img-responsive.img-center(src='//i.imgur.com/hV9F2bo.jpg' alt='Cracking the Coding Interivew book cover')
.button-spacer .button-spacer
a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/0984782850/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0984782850&linkCode=as2&tag=out0b4b-20&linkId=41b9f338b2a1a8ba00d67f944f68a982" onClick="ga('send', 'event', 'SHOP', 'SHOP-CRACKING', 'Cracking the Code Interivew affiliate button clicked');" target='_blank') Get it on Amazon a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/0984782850/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0984782850&linkCode=as2&tag=out0b4b-20&linkId=41b9f338b2a1a8ba00d67f944f68a982" onClick="ga('send', 'event', 'Shop', 'clicked', 'Cracking the Coding Interview');" target='_blank') Get it on Amazon
.spacer .spacer
hr hr
.spacer .spacer
img.img-responsive.img-center(src='//i.imgur.com/rLN9oKk.jpg' alt='JavaScript: The Definitive Guide book cover') img.img-responsive.img-center(src='//i.imgur.com/rLN9oKk.jpg' alt='JavaScript: The Definitive Guide book cover')
.button-spacer .button-spacer
a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/0596805527/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0596805527&linkCode=as2&tag=out0b4b-20&linkId=f490d30d420bf57fc1efe2de57eece65" onClick="ga('send', 'event', 'SHOP', 'SHOP-JS-DIFINITIVE-GUIDE', 'JavaScript the Definitive Guide affiliate button clicked');" target='_blank') Get it on Amazon a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/0596805527/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0596805527&linkCode=as2&tag=out0b4b-20&linkId=f490d30d420bf57fc1efe2de57eece65" onClick="ga('send', 'event', 'Shop', 'clicked', 'JavaScript The Definitive Guide');" target='_blank') Get it on Amazon
.spacer .spacer
hr hr
.spacer .spacer
img.img-responsive.img-center(src='//i.imgur.com/KU60I7r.jpg' alt='How Linux Works: What Every Superuser Should Know book cover') img.img-responsive.img-center(src='//i.imgur.com/KU60I7r.jpg' alt='How Linux Works: What Every Superuser Should Know book cover')
.button-spacer .button-spacer
a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/1593275676/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1593275676&linkCode=as2&tag=out0b4b-20&linkId=a6a83ec9ed8d137f3ff56fbcfc6c05ce" onClick="ga('send', 'event', 'SHOP', 'SHOP-HOW-LINUX-WORKS', 'How Linux Works affiliate button clicked');" target='_blank') Get it on Amazon a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/1593275676/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1593275676&linkCode=as2&tag=out0b4b-20&linkId=a6a83ec9ed8d137f3ff56fbcfc6c05ce" onClick="ga('send', 'event', 'Shop', 'clicked', 'How Linux Works');" target='_blank') Get it on Amazon
.spacer .spacer
hr hr
.spacer .spacer
img.img-responsive.img-center(src='//i.imgur.com/nR4VIU4.jpg' alt='JavaScript: The Good Parts book cover') img.img-responsive.img-center(src='//i.imgur.com/nR4VIU4.jpg' alt='JavaScript: The Good Parts book cover')
.button-spacer .button-spacer
a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/0596517742/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0596517742&linkCode=as2&tag=out0b4b-20&linkId=644f8ba9661c9db7dd4bb3ff6216a8d1" onClick="ga('send', 'event', 'SHOP', 'SHOP-JAVASCRIPT-THE-GOOD-PARTS', 'JavaScript the Good Parts affiliate button clicked');" target='_blank') Get it on Amazon a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/0596517742/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0596517742&linkCode=as2&tag=out0b4b-20&linkId=644f8ba9661c9db7dd4bb3ff6216a8d1" onClick="ga('send', 'event', 'Shop', 'clicked', 'JavaScript the Good Parts');" target='_blank') Get it on Amazon
.spacer .spacer
hr hr
.spacer .spacer
img.img-responsive.img-center(src='//i.imgur.com/CR2dSql.jpg' alt='Eloquent JavaScript: A Modern Introduction to Programming book cover') img.img-responsive.img-center(src='//i.imgur.com/CR2dSql.jpg' alt='Eloquent JavaScript: A Modern Introduction to Programming book cover')
.button-spacer .button-spacer
a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/1593275846/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1593275846&linkCode=as2&tag=out0b4b-20&linkId=6870174eac22afca8e1c1ef5204f16ee" onClick="ga('send', 'event', 'SHOP', 'SHOP-ELOQUENT-JAVASCRIPT', 'Eloquent JavaScript affiliate button clicked');" target='_blank') Get it on Amazon a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/1593275846/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1593275846&linkCode=as2&tag=out0b4b-20&linkId=6870174eac22afca8e1c1ef5204f16ee" onClick="ga('send', 'event', 'Shop', 'clicked', 'Eloquent JavaScript');" target='_blank') Get it on Amazon
.spacer .spacer
hr hr
.spacer .spacer
img.img-responsive.img-center(src='//i.imgur.com/IplEMb4.jpg' alt='JavaScript and jQuery: Interactive Front End Development') img.img-responsive.img-center(src='//i.imgur.com/IplEMb4.jpg' alt='JavaScript and jQuery: Interactive Front End Development')
.button-spacer .button-spacer
a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/1118531647/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1118531647&linkCode=as2&tag=out0b4b-20&linkId=fdce3ef75bf3cd1cb220020a595decba" onClick="ga('send', 'event', 'SHOP', 'SHOP-JAVASCRIPT-AND-JQUERY', 'JavaScript and jQuery affiliate button clicked');" target='_blank') Get it on Amazon a.btn.signup-btn.btn-cta(href="//www.amazon.com/gp/product/1118531647/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1118531647&linkCode=as2&tag=out0b4b-20&linkId=fdce3ef75bf3cd1cb220020a595decba" onClick="ga('send', 'event', 'Shop', 'clicked', 'JavaScript and jQuery');" target='_blank') Get it on Amazon