All posts

Add Google Analytics to a Rise course with Mighty

Use Mighty Custom Code to add Google Analytics tracking to Articulate Rise 360, keep it with your course, and verify it after publishing.

The Mighty teamMighty by Maestro
6 min read

If you’ve ever wanted more detail than your LMS report gives you, Google Analytics can help you see things like regional traffic and real-time course visits. With Mighty, you can add that tracking directly inside your Rise course.

Mighty

This is especially useful when stakeholders ask questions your normal course completion data can’t answer: Where are learners accessing this from? Is anyone actually opening the public version? Could we track a specific interaction or section later?

Here’s the workflow our Mighty developer walks through in the video, with one important Rise-specific caveat: you can’t just paste Google’s full <script> tag into Mighty’s JavaScript field. You’ll need to convert it into JavaScript that creates and loads the analytics script for the course.

What you’ll need before you start#

Before you open Rise, make sure you have:

  • A Google Analytics account
  • A GA4 property and data stream already set up
  • A Rise 360 course where Mighty is enabled
  • Access to Mighty’s Custom Code mod inside the Rise theme area

The goal is to take the Google Analytics tag instructions and add them through Mighty so the tracking code is stored with the Rise course. That means you don’t have to re-inject analytics every time you publish a new version.

Step 1: Open Rise and Google Analytics side by side#

Start with two browser tabs:

  1. Your Articulate Rise course
  2. Your Google Analytics dashboard

In Google Analytics, you’ll eventually use the Realtime report to confirm that your course is sending data. But first, you need the tracking code.

Step 2: Get your Google Analytics tag instructions#

In Google Analytics:

  1. Go to Admin.
  2. Under Data collection, choose Data streams.
  3. Open the GA4 data stream for the site or property you want to use.
  4. Select View tag instructions.
  5. Copy the JavaScript tag Google provides.

Google’s tag instructions are typically written as HTML you’d paste into an index.html file. In a standard website build, that’s fine. In Rise, and specifically in Mighty’s JavaScript editor, you’ll handle it differently.

Step 3: Open Mighty Custom Code in Rise#

Back in your Rise course:

  1. Open your course in the Rise editor.
  2. Go to Theme.
  3. Open Custom Code.
  4. Choose the JavaScript area.

Custom Code is a Mighty mod that lets you add CSS or JavaScript to your Rise course. For Google Analytics, you’ll use the JavaScript side.

A quick note: the Custom Code editor uses VS Code-style functionality under the hood, so you’ll see helpful things like autocomplete and familiar shortcut behavior if you’re used to writing code. If you’re not a developer, no problem—the main thing is that you can paste in the finished JavaScript once it’s prepared.

If you’re curious about coding, check out Code School to learn the basics of coding for learning design, create custom Rise interactions, and work effectively with AI tools—all without needing to become a professional developer.

Step 4: Don’t paste Google’s script tag as-is#

This is the part that trips people up.

Google gives you code that usually starts with a <script async src="..."></script> tag, followed by another <script> block that initializes gtag.

Mighty’s JavaScript tab runs JavaScript. It is not an HTML file. So if you paste the script tags exactly as Google provides them, it won’t work.

Instead, you’ll recreate what those tags do using JavaScript:

  • Create a new script element
  • Set its src to the Google Analytics URL from your tag instructions
  • Add the async attribute
  • Append that script to the course document’s head
  • Run the Google Analytics setup function

Here’s the general structure, using a placeholder measurement ID. Replace G-XXXXXXXXXX with the ID from your own GA4 tag instructions.

const script = document.createElement('script');
script.src = 'https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX';
script.setAttribute('async', '');

function startAnalytics() {
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
}

const head = document.querySelector('head');

if (head) {
  head.appendChild(script);
  startAnalytics();
}

The first section replaces Google’s external script tag. The startAnalytics function replaces the inline setup block from Google’s instructions. The final section finds the head element in the course and appends the analytics script there.

Step 5: Save the Custom Code mod#

Once your JavaScript is in place:

  1. Confirm your GA4 measurement ID is correct in both places.
  2. Save the Custom Code mod.
  3. Publish your course.

At this point, the Google Analytics tracking code is stored with the Rise course, meaning you won’t have to manually crack open a published package after every update to add tracking again.

You can publish wherever you normally deliver your Rise content. In the video, John publishes to Review 360 first to inspect the course and validate that the script is being created.

Step 6: Verify the script in Review 360#

After publishing to Review 360, open the course and inspect the page.

In Chrome:

  1. Right-click the course area.
  2. Choose Inspect.
  3. Look for the course iframe.
  4. Open the document structure and check the head.
  5. Confirm that the Google Analytics script tag was added with the async property.

This confirms that your JavaScript ran and created the analytics script in the Rise course.

That said, don’t panic if Google Analytics doesn’t show a realtime user while you’re viewing the course inside Review 360.

Why Review 360 may not show realtime tracking#

Review 360 wraps your Rise course in a shell so reviewers can leave comments. That shell places the course inside an iframe.

Because of browser security behavior, analytics tracking may not fire the way you expect inside that nested iframe. In the video, this is exactly what happens: the script is present in the course, but Google Analytics does not immediately show the Review 360 view as a realtime user.

That’s to be expected. And it’s also a good reminder: Review 360 is for review, not usually the final learner delivery environment. You probably won’t send learners a Review 360 link as the production course.

Step 7: Test the course outside the Review 360 iframe#

To validate tracking more realistically, open the course directly rather than inside the Review 360 wrapper.

Once the course is opened directly:

  1. Inspect the course again if you want to confirm the analytics script is still in the head.
  2. Return to Google Analytics.
  3. Go to Reports.
  4. Open Realtime.
  5. Wait a few minutes for the active user count to update.

In John’s test, the realtime users count moves from zero to one once the course is opened directly instead of inside the Review 360 iframe.

What you can track from here#

Basic Google Analytics setup gives you a starting point: you can see visits and realtime activity for the course. Depending on how you configure Analytics, you may also use it for additional information like regional data.

And because Mighty Custom Code lets you run JavaScript in the course, this can become the foundation for more specific event tracking later. For example, you could add more JavaScript to send events when learners reach certain parts of the course.

That part is custom work, and it depends on exactly what you want to measure. Mighty isn’t magically turning Rise into a full analytics platform on its own—it’s giving you a practical place to add and preserve the code that connects Rise to Google Analytics.

A quick note on LMS data vs. Google Analytics#

Google Analytics should not replace your LMS reporting for completions, scores, compliance records, or learner transcripts. Those systems serve different purposes.

Think of GA as an additional lens. It can help you understand traffic and usage patterns around a Rise course, especially when the course is hosted in a web environment or when you need visibility beyond what your standard delivery tool gives you.

Remember to do your due diligence. If your course contains sensitive learner information, coordinate with your privacy, legal, or analytics teams before adding any third-party tracking.

Adding Google Analytics to your Rise course is a small setup step that can save you from repeat post-publish edits—and give you a cleaner path to course analytics the next time a stakeholder asks, “Do we know who’s actually opening this?”

Try Mighty free for 30 days.

Install in Chrome, open your Rise course, and ship the interactives you couldn’t before. No credit card. Cancel any time.