This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
forked from Stanford-Online/edx-theme
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from gymnasium/theme-setup
Updating master before we go to dogwood...
- Loading branch information
Showing
26 changed files
with
679 additions
and
167 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,123 @@ Gymnasium.prototype.setBackgroundColorOfElementFromImage = function (element, im | |
$(element).css('background-color','rgba(' + r + ',' + g + ',' + b + ',' + a + ')'); | ||
}); | ||
}) | ||
}; | ||
|
||
///get a URL parameter passed in with HTTP GET | ||
///NOTE: this function is not case sensitive | ||
Gymnasium.prototype.getUrlParameter = function getUrlParameter(sParam) { | ||
var sPageURL = decodeURIComponent(window.location.search.substring(1)), | ||
sURLVariables = sPageURL.split('&'), | ||
sParameterName, | ||
i; | ||
|
||
for (i = 0; i < sURLVariables.length; i++) { | ||
sParameterName = sURLVariables[i].split('='); | ||
|
||
if (sParameterName[0].toLowerCase() === sParam.toLowerCase()) { | ||
return sParameterName[1] === undefined ? true : sParameterName[1]; | ||
} | ||
} | ||
}; | ||
|
||
Gymnasium.prototype.injectFBTrackingPixel = function(){ | ||
var trackingPix = $('<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1074612282557779&ev=PageView&noscript=1" /></noscript>'); | ||
$('body').append(trackingPix); | ||
fbq('init', '1074612282557779'); | ||
fbq('track', "PageView"); | ||
}; | ||
|
||
Gymnasium.prototype.RecordCourseEnrollment = function(firstName, lastName, emailAddress, courseId, callback) | ||
{ | ||
var data = { | ||
first_name: firstName, | ||
last_name: lastName, | ||
email: emailAddress, | ||
course: courseId, | ||
utm_campaign: courseId + " - Enrollment", | ||
carrot_type: "Gymnasium Enrollment", | ||
carrot_topic: "GYM-" + courseId, | ||
PROC: "AWUISubmitExternalLead", | ||
|
||
}; | ||
Gymnasium.RecordCloudwallRecord(data, callback); | ||
|
||
}; | ||
|
||
Gymnasium.prototype.RecordExamGrade = function(email, courseId, grade, callback) | ||
{ | ||
var data = { | ||
leadDestination: "cw-rc", | ||
email: email, | ||
score: grade, | ||
course_id: courseId, | ||
utm_campaign: courseId + " - Grade" | ||
}; | ||
}; | ||
|
||
Gymnasium.prototype.RecordRegistration = function(emailAddress, firstName, lastName, cityId, callback) | ||
{ | ||
var data = { | ||
first_name: firstName, | ||
last_name: lastName, | ||
email: emailAddress, | ||
location: cityId, | ||
utm_campaign: "Registration", | ||
carrot_type: "Gymnasium Registration", | ||
carrot_topic: "GYM REG", | ||
PROC: "AWUISubmitExternalLead" | ||
}; | ||
|
||
return Gymnasium.RecordCloudwallRecord(data, callback); | ||
}; | ||
|
||
Gymnasium.prototype.RecordCloudwallRecord = function(jsonData, callback) | ||
{ | ||
jsonData.utm_source = "gymnasium.com"; | ||
jsonData.utm_medium = "web"; | ||
jsonData.utm_content = "not-provided"; | ||
jsonData.utm_term = "not-provided"; | ||
jsonData.agent_email = "[email protected]"; | ||
jsonData.agent_id = "1694600"; | ||
jsonData.agent_name = "TALENT LEAD NURTURING"; | ||
jsonData.carrot = "thegymnasium.com"; | ||
jsonData.subdomain = "cw-rc"; | ||
jsonData.language = "en_US"; | ||
jsonData.medium = "1009"; | ||
jsonData.referring_site = "thegymnasium.com"; | ||
jsonData.status = "Talent"; | ||
jsonData.referer = "thegymnasium.com"; | ||
|
||
|
||
$.ajax("https://aquent.com/application/gymnasium-lead.htm", | ||
{ | ||
contentType: "application/json", | ||
dataType: "jsonp", | ||
data: jsonData | ||
}) | ||
.done(function(event) | ||
{ | ||
//console.log("Success!\n", event); | ||
}) | ||
.fail(function(event, textStatus, errorThrown) | ||
{ | ||
//console.log("Failure:\n", textStatus, "\n", errorThrown); | ||
}) | ||
.always(function(e){ | ||
//console.log("always:\n", e); | ||
if (callback) | ||
{ | ||
callback(); | ||
} | ||
}); | ||
} | ||
|
||
<!-- Facebook Pixel Code --> | ||
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | ||
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | ||
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | ||
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | ||
document,'script','//connect.facebook.net/en_US/fbevents.js'); | ||
<!-- End Facebook Pixel Code --> | ||
|
||
var Gymnasium = new Gymnasium(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.