Learnyst Embeddables

Embeddables seamlessly integrate Learnyst functionalities - Courses, Signup and Login into any existing website or blogs. This helps maintain brand consistency, increase conversion, and reduces friction.

 
1. Course Embed

Courses embed allows you to add your Learnyst courses to your existing website or blog. Use the below script.

  <div id='learnyst-course-widget'></div>
  <div id='lr-viewall-btn' style='display:none'>View All</div>
  <script type="text/javascript">
    var receivedWidget = function(data) {
      document.getElementById("learnyst-course-widget").innerHTML = data["html"];
      if(data["course_count"] >= 8){
       showViewAllButton();
      }
    };
    var script2 = document.createElement('script');
    script2.src = "<your-school-url>/course_widget_script.js?v1=1";
    document.getElementsByTagName('body')[0].appendChild(script2);
    var script1 = document.createElement('script');
    script1.src = "<your-school-url>/courses/getCourseWidget.json?limit=8&type=[1,2,3]&callback=receivedWidget";
    document.getElementsByTagName('body')[0].appendChild(script1);
  </script>
 
 
NOTE: Replace <YOUR-SCHOOL-URL> with your URL. For example  iim.learnyst.com or yourwebsite.com
 
You can pass optional parameters in the URL
 
Parameters Values
limit No of courses you want (ex : limit=8)
type

What type of courses you want

1. if you want only Test courses > type=[2]

2. If you want only Lesson courses > type=[1]
3. If you want only Bundles > type=[3]
4. If you want Test,Lesson courses > type=[1,2]
5. If you want Lesson,bundle courses > type=[1,3]
tag

 If you need only specific courses with tag.

( ex : tag=CAT )

 
 
                     
 2. Signup Embed

Sign up embed allows you to add your Learnyst teaching platform sign up button to your existing website or blog.

 <div class='learnyst-signup-widget'></div>
   <script type="text/javascript">
     var receivedSignupWidget = function(data) {
       document.getElementsByClassName("learnyst-signup-widget")[0].innerHTML = data["html"];
     };
     var signup_widget_script_html = document.createElement('script');
     signup_widget_script_html.src = “<your-school-url>/sessions/getSignupWidget.json?callback=receivedSignupWidget";
     document.getElementsByTagName('body')[0].appendChild(signup_widget_script_html);
     var signup_widget_script_js = document.createElement('script');
     signup_widget_script_js.src = "<your-school-url>/signup_widget_script.js";
     document.getElementsByTagName('body')[0].appendChild(signup_widget_script_js);
   </script>
 
 
NOTE: Replace <YOUR-SCHOOL-URL> with your URL. For example  iim.learnyst.com or yourwebsite.com
 
3. Login Embed:

Log in embed allows you to add your Learnyst teaching platform log in button to your existing website or blog.

<div class='learnyst-login-widget'></div>
     <script type="text/javascript">
       var receivedLoginWidget = function(data) {
         document.getElementsByClassName("learnyst-login-widget")[0].innerHTML = data["html"];
       };
       var login_widget_script_html = document.createElement('script');
       login_widget_script_html.src = "<your-school-url>/sessions/getLoginWidget.json?widget_type=form&callback=receivedLoginWidget";
       document.getElementsByTagName('body')[0].appendChild(login_widget_script_html);
       var login_widget_script_js = document.createElement('script');
       login_widget_script_js.src = "<your-school-url>/login_widget_script.js";
       document.getElementsByTagName('body')[0].appendChild(login_widget_script_js);
     </script>
 
NOTE : Replace <YOUR-SCHOOL-URL> with your URL.
            ex : iim.learnyst.com or yourwebsite.com
 
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk