Articles in this section
Category / Section

A Step-by-Step Guide to Using the Code Inject Feature

7 mins read

Discover how the Code Inject feature empowers you to enhance your learning management system (LMS) with custom scripts and tracking codes.

By allowing you to inject code snippets into different sections of your LMS, Code Inject enables advanced customization, integration of analytics tools, and seamless deployment of marketing tags, providing a tailored experience for both administrators and learners.

Step 1:

Log in to your BrainCert account, navigate to ' Global Settings' in the dashboard, and then open ' Basic Settings'.

Step 2:

Go to the ' Code Inject' feature in the ' Basic Settings' menu.

Google Analytics Tracking ID

Locate the ' Google Analytics Tracking Id' field and enter your Google Analytics Tracking ID (e.g., G-XXXXXXXXX).

To track and analyze user interactions on your LMS, use this code.

It provides you with insights into user behavior, traffic sources, and engagement levels.

This helps you identify popular courses and areas that need improvement.


Google Tag Manager ID

Locate the ' Google Tag Manager ID' field and enter your Google Tag Manager ID (e.g., GTM-XXXXXX).

To manage and deploy marketing tags (such as tracking and remarketing codes) on your LMS without editing the codebase, use Google Tag Manager.

This tool simplifies the process of adding and updating tags, giving you more flexibility and control over your marketing and analytics efforts.

It also enables seamless integration with other tools like Google Ads and Facebook Pixel, enhancing your overall marketing strategy.


Cookie Policy Code Snippet

Locate the ' Cookie Policy Code Snippet' field and Paste your cookie policy code snippet into it.

To display a cookie consent banner and manage cookie preferences for your users.

Ensures you comply with privacy regulations such as GDPR and CCPA.

Informs your users about the use of cookies and provides options to accept or reject them.


Analytics Tracking Code Snippet

Locate the ' Analytics Tracking Code Snippet' field and paste your analytics tracking code snippet into the field.

To integrate custom analytics tracking beyond standard Google Analytics.

This allows you to collect additional data points specific to your needs, providing a more detailed understanding of user interactions and platform performance.


Global Head Snippet

Locate the 'Global Head Snippet' field and Paste your global head snippet code into it.

This code will be injected into the ` <head>` section of every page.

This is useful for adding meta tags, stylesheets, or third-party scripts that need to load early in the page lifecycle.

It enhances SEO, performance tracking, and third-party tool integration.

Global Footer Snippet

Locate the ' Global Footer Snippet' field Paste your global code snippet into it.

This code will be injected into the `<footer>` section of every page.

This is perfect for adding elements like tracking pixels, live chat widgets, or additional scripts that need to load at the end of the page lifecycle.

By doing this, you ensure that the page content loads quickly while still providing advanced functionality and enhancing user engagement.


Global Code Snippet

Locate the ' Global Code Snippet' field Paste your global code snippet into it.
This code will be injected into the body of every page.

To insert custom code into the body of every page on your LMS, use this feature.

It's ideal for adding elements like chat widgets, dynamic content, or additional JavaScript needed at the bottom of the page. 


Conversion Code Snippet

Locate the ' Conversion Code Snippet' field and paste your conversion tracking code snippet into it.
This is often used for tracking conversions from ads.

To track conversions such as course enrollments, purchases, or sign-ups from your marketing campaigns, use this snippet.

This helps you measure the effectiveness of your marketing campaigns, optimize ad spend, and improve ROI.

You'll gain valuable data on user actions after they engage with your ads.


By following these steps, you can effectively utilize the 'Code Inject' feature to integrate various tracking and analytics codes seamlessly. This will help you monitor and optimize your platform's performance and user engagement.

Was this article useful?
Help us improve this page
Please provide feedback or comments
Access denied
Access denied