Guide to Setting Up Google Analytics 4 and Conversion Tracking for SIMRS & Clinic Websites
N
Back to Blog

Guide to Setting Up Google Analytics 4 and Conversion Tracking for SIMRS & Clinic Websites

Tutorial
Nugroho Setiawan · Konsultan IT & Full Stack Developer 27 Oct 2026 6 min baca 1,396 kata 7 views
A step-by-step guide to setting up Google Analytics 4 and conversion tracking for SIMRS, clinic management system, and ERP websites: measurement plan, GTM, key events, and BigQuery export.

Most clinic owners and hospital IT managers have already installed Google Analytics on their websites. The problem is that after the tag is installed, no one really knows whether website visits lead to new patient registrations, SIMRS demo requests, or just scrolling and leaving. Since Universal Analytics stopped processing hits on July 1, 2023, and its API was fully shut down a year later, old properties have been truly dead. Many teams eventually installed GA4 carelessly: one global tag, no events, no conversions. Monthly reports then only contain sessions and engagement rate that cannot be used in management meetings. Yet for healthcare service websites, the three most important questions are actually: how many people fill out the registration form, how many click WhatsApp, and from which channel they come. This article guides the correct GA4 setup and conversion tracking, from measurement plan to key event, with examples that can be directly applied to SIMRS, SIM Klinik, ERP, or POS websites.

1. Measurement Plan: Define Conversions Before Touching the Tag

The most expensive mistake in GA4 implementation is not technical, but the absence of a measurement plan. Before creating a property, first write a list of visitor actions that have business value. For a SIM Klinik website, the list usually includes: submitting a demo request form, clicking the WhatsApp button, clicking the phone number tel:, downloading the PDF feature brochure, and signing up for a 14-day trial. For a hospital website, online patient registration and specialist doctor search can be added.

GA4 uses an event-based model, meaning all interactions are sent as events with parameters. Use a consistent snake_case convention and, when suitable, use Google's recommended event names so they automatically appear in reports: generate_lead, sign_up, purchase. Custom names such as submit_demo_simrs are allowed, but do not duplicate the same intent with three different names — reports will become messy within weeks.

One thing that is often overlooked: parameters. Every event should carry context. For generate_lead, send form_name, layanan (SIMRS, SIM Klinik, ERP, POS), and value. That way you can break down reports by product line without creating new events. This is important if you manage several business units at once, for example SIM Klinik and ERP Poultry on one domain.

Do not forget consent. If the website uses a cookie banner, enable Consent Mode v2 in GA4 (Admin → Data settings → Consent) and make sure the banner sends ad_user_data and ad_personalization. Without this, data from Google Ads is not sent completely and acquisition reports will be skewed.

2. Property Setup, Data Stream, and Verification in DebugView

Create a new property in analytics.google.com with the time zone (GMT+07:00) Jakarta and currency IDR. The time zone cannot be changed after the property is running; if it is wrong, your daily reports will shift permanently. After the property is created, create a Web Data Stream, note the Measurement ID in the format G-XXXXXXXXXX, then install its configuration.

There are two installation paths. The quick path: paste the gtag.js snippet in the <head> of all pages. The path I recommend for clients: a Google Tag Manager Web container with a minimum of three tags — GA4 Configuration, GA4 Event, and one trigger per action. GTM makes it easier for the ops team to add events without redeploying, a condition that is very helpful when the SIMRS website is managed by a vendor different from the marketing team.

Verification must be done through DebugView (Admin → DebugView) with the Google Tag Assistant extension active, or through GTM Preview mode. Do not settle for Realtime showing 1 user — what needs to be checked is the event name, parameter completeness, and no duplication. Duplication most often occurs when the gtag.js snippet in the header is still present even though the GA4 tag via GTM is already active. Example implementation of form tracking and WhatsApp clicks:

<script>
function trackLead(formName, layanan) {
  gtag('event', 'generate_lead', {
    form_name: formName, layanan: layanan,
    value: 250000, currency: 'IDR',
    transport_type: 'beacon'
  });
}
document.querySelector('#form-demo').addEventListener('submit', () => {
  trackLead('demo_simklinik', 'SIM Klinik');
});
document.querySelectorAll('a[href*="wa.me"]').forEach(el => {
  el.addEventListener('click', () => trackLead('klik_whatsapp', 'Konsultasi'));
});
</script>

The transport_type: 'beacon' parameter uses navigator.sendBeacon so the event is still sent even if the page immediately navigates away after submit — a classic case that makes 20–30% of form conversions disappear from reports.

3. Turning Events into Key Events and Reading Their Attribution

In GA4, the term conversion is now replaced by key event. Open Admin → Events → Key events, then mark generate_lead, sign_up, and purchase. This marking does not change historical data, so it is safe to do at any time after events start being collected.

After marking them, build reports in Reports → Engagement → Conversions, or explore in Explore with the dimension Session source/medium and the metric Key events. GA4's default attribution period is data-driven with a 30-day click window and 90-day view window. For a SIMRS sales cycle to hospitals that can be 3–6 months, 30 days is too short — change it to 60 or 90 days in Admin → Attribution settings, and prepare an export to BigQuery so raw data is not lost after retention ends.

For campaigns, UTM discipline is everything. Standardize utm_source (google, linkedin, newsletter), utm_medium (cpc, organic, email), and utm_campaign (promo-simklinik-q3). One inconsistent capital letter will split report rows. Store all campaign URLs in a spreadsheet in all lowercase, and audit every quarter.

Best Practices

  1. Start with a one-page measurement plan. List 5–7 business-value actions, who reads the report, and what decisions will be made. Without this, events just become data waste.
  2. Use GTM, not hardcode. One container for all tags (GA4, Google Ads, Meta Pixel) makes auditing, versioning, and rollback easier when there is a tag error in production.
  3. Send value on every lead. Even a rough estimate like Rp250.000 per demo lead helps calculate acquisition cost per product line, not just lead count.
  4. Test in staging first. Use a separate GA4 property for staging so test data does not contaminate production reports; also filter internal traffic by office IP.
  5. Export to BigQuery from day one. GA4 standard retention is only 2 or 14 months. Daily export is free and saves historical data when you need analysis two years back.

FAQ

Is using Google Tag Manager mandatory?

Not mandatory, but highly recommended. Hardcoded gtag.js is enough for a 5–10 page website, but once you have many forms, microsites, or need to add events without deploying, GTM saves time and reduces the risk of errors.

How long does GA4 store data?

Standard properties only provide event retention options of 2 months or 14 months, set in Admin → Data settings → Data retention. For long-term analysis, enable daily BigQuery Export because data there is not subject to retention limits.

How do you track patient registrations that happen offline?

Use Measurement Protocol. When a patient registers at the counter and the system stores the client_id from the online form, send an offline_registration event via HTTP POST to the Measurement Protocol endpoint using the API secret from the data stream. Offline conversions remain attributed to digital channels.

Is it safe to use GA4 for a healthcare website?

It is safe as long as no personal or medical data is sent to GA4. In accordance with the PDP Law, never send patient names, NIK, medical record numbers, or diagnoses as event parameters. Send only anonymous IDs and service types, and ensure the privacy policy mentions the use of Google Analytics.

GA4 is not just an obligation because Universal Analytics is dead, but an opportunity to build a foundation for measurable decisions: which campaigns actually generate demo requests, which pages drive registrations, and how much acquisition cost per lead is in each service line. Start with a measurement plan, implement via GTM, mark key events, then export to BigQuery so data is not lost. If your team needs implementation assistance — from tag audits, measurement plan design, to event integration with SIMRS, SIM Klinik, ERP, POS, or website — our IT consulting and application development team in Yogyakarta (DIY) and Magelang is ready to help. Schedule a free 30-minute consultation session to map your analytics and system integration needs.

This article is part of the knowledge base of Nugroho Setiawan, an IT consultant in Jogja (Yogyakarta). Related solutions: PilarPOS SIMRS (Hospital Information System) Clinic Management System. Need a free consultation?

Terakhir diperbarui 27 Oct 2026

Komentar

Komentar ditinjau sebelum tampil.

Belum ada komentar. Jadilah yang pertama!

Butuh bantuan implementasi?

Saya membantu konsultasi IT & pengembangan aplikasi untuk rumah sakit, klinik, dan bisnis di Yogyakarta (DIY), Magelang, dan sekitarnya.

Produk & Solusi SIMRS ERP Portfolio Konsultasi Gratis