Skip to main content
All CollectionsOn-DemandGeneral
Track ViewMedica On-Demand with Google Analytics 4
Track ViewMedica On-Demand with Google Analytics 4

You can track events associated with individual ViewMedica On-Demand content items using your Google Analytics account.

Randall Elmo avatar
Written by Randall Elmo
Updated over 8 months ago

Note

These steps are for tracking events with Google Analytics 4 (GA4). If you are still using Google's Universal Analytics, please see our Track ViewMedica events with Google Universal Analytics article.


Enable tracking

  1. Make sure you have a Google Analytics account and have the analytics tracking code installed in your HTML page that displays the ViewMedica viewer. See Google’s site for Google Analytics support.

  2. Paste the following script into the <head> of your website. It is required, as it relays events from the ViewMedica iframe to the Google Analytics on your page.

<script src="https://ondemand.viewmedica.com/lib/vm.js" defer></script>

Defining ViewMedica On-Demand events in GA4

Google Analytics 4 is an event-based analytics tool where everything is an event. You may need to set up custom dimensions in GA4 to track events for individual ViewMedica On-Demand content items.

  1. Select your GA4 property.

  2. On the left, click Admin. Under Property settings, look for Data display and click Custom definitions.

  3. Click Create custom dimension.

  4. Create the following dimensions. You may need to manually type in the value for the Event parameter.

Dimension name

Event Category

Event Label

Event Action

Scope

Event

Event

Event

Description

On-Demand

Video Title

Video Interactions

Event parameter

event_category

event_label

event_action

6. Click Save.

The events listed below are associated with ViewMedica's content items.

  • Video Loaded

  • Video Started

  • Percent Reached | {percent}

  • Step Reached | {step}

  • Video End

  • Brochure Printed

  • Playlist Started

  • Playlist Item Reached | {item}

  • Playlist Ended

You may see a value of (not set) for a custom dimension for the first 48 hours.

Finding ViewMedica On-Demand events in GA4

  1. Select your GA4 property.

  2. On the left, click Reports > Engagement > Events.

Click the event you want to track or create filters to show more detailed information.

Example: Tracking views for individual ViewMedica views using the "Video Started" event.

Did this answer your question?