The Custom Code Block can be used to embed or add custom code for a variety of purposes, including: embedding comment section, tracking code, widgets, buttons etc.
You have three ways to add custom code
Using a content section β in this case embedded code will be applied to a selected lecture tab in the lesson. When you add code using this way, you will be able to rearrange the block to your desired place:
Select a lesson you want to embed a custom code
Click on Embed section type to add one
Insert your custom code into text area
Click Save
Update changes to apply them and make it live
If you want to preview applied custom code from student side click the Preview button and you will be redirected to student's cabinet
Your custom code will be displayed in the place you add the embed section. In the example below you can see the embedded CTA button from checkout builder. It will be displayed only in first lecture tab of the first lesson in the course.
The second way β is to Use custom code section at the bottom of the lesson content you add in Lecture settings. By embedding the code in this way, it will be applied to the entire lesson for all lecture tabs:
Select a lesson you want to embed a custom code
Toggle ON the Use custom code section
Insert your custom code
Update changes to save it to your lesson
In this case you will be not able to see the rendered custom code. We recommend to use this section to insert the code for trackings provided by Google or Facebook for example to track specific lecture tabs. You can also check the Preview mode to see how it looks on case if your code might be rendered.
This block cannot be rearranged, it is always at the bottom and the embedded custom code will be displayed in the student's cabinet at the end of the lesson after all the content.
The third way is to embed custom code from Course settings tab β In this case, the code will be applied to all lessons in all lecture tabs: