---
title: Add Google Analytics to your Learnyst website
description: Connect Google Analytics 4 to your Learnyst site with the Google tag in Code Snippets or the Google Analytics integration, then check it in Realtime.
---

[Skip to content](https://support.learnyst.com/how-to-integrate-google-analytics-with#main-content)

![Learnyst Logo-25-1.png\]](https://support.learnyst.com/hs-fs/hubfs/Learnyst%20Logo-25-1.png?height=40&name=Learnyst%20Logo-25-1.png)

- [Blogs](https://blog.learnyst.com/)
- [Product Demo](https://www.learnyst.com/product-demo)
- [Help Center](https://support.learnyst.com/?__hstc=63047858.c6632626f509e3bce8daa43b7e98f888.1712298652738.1721125968223.1721135407952.38&__hssc=63047858.1.1721135407952&__hsfp=1459259341&_gl=1*1hsz3xc*_gcl_aw*R0NMLjE3MzA4OTkxMzAuQ2p3S0NBaUF4S3k1QmhCYkVpd0FZaVctLTFMeml2UU9iS3JlNDdQaXE4Y2RDRTRPbE9iZnFVYS1sYkViTm5lcW52eHljMnNXOTRoMlRCb0N3QVVRQXZEX0J3RQ..*_gcl_au*MTM5MDI5MDc5LjE3MjU5Mzg3NTIuNjU1NTcwMzYxLjE3MzMyMzMxODAuMTczMzIzMzE3OQ..)
- [Success Stories](https://www.learnyst.com/customers/success-stories)

Open main navigation

Close main navigation

- [Blogs](https://blog.learnyst.com/)
- [Product Demo](https://www.learnyst.com/product-demo)
- [Help Center](https://support.learnyst.com/?__hstc=63047858.c6632626f509e3bce8daa43b7e98f888.1712298652738.1721125968223.1721135407952.38&__hssc=63047858.1.1721135407952&__hsfp=1459259341&_gl=1*1hsz3xc*_gcl_aw*R0NMLjE3MzA4OTkxMzAuQ2p3S0NBaUF4S3k1QmhCYkVpd0FZaVctLTFMeml2UU9iS3JlNDdQaXE4Y2RDRTRPbE9iZnFVYS1sYkViTm5lcW52eHljMnNXOTRoMlRCb0N3QVVRQXZEX0J3RQ..*_gcl_au*MTM5MDI5MDc5LjE3MjU5Mzg3NTIuNjU1NTcwMzYxLjE3MzMyMzMxODAuMTczMzIzMzE3OQ..)
- [Success Stories](https://www.learnyst.com/customers/success-stories)

 Hello, how can we help you today?

- There are no suggestions because the search field is empty.

1. [Support Center](https://support.learnyst.com/?hsLang=en)
2. [Integrations](https://support.learnyst.com/integrations?hsLang=en)
3. [Google Ads](https://support.learnyst.com/integrations?hsLang=en#google-ads)

# Add Google Analytics to your Learnyst website

## Connect Google Analytics 4 to your Learnyst site with the Google tag in Code Snippets or the Google Analytics integration, then check it in Realtime.

Google Analytics shows how many people visit your school website, where they come from and what they do. You can add it to Learnyst in two ways: paste the Google tag into Code Snippets, or enter your key in the Google Analytics integration.

### Before you start

- You need a Google Analytics 4 property with a web data stream for your school's website address. Google Analytics shows you the Google tag and the Measurement ID for the stream.
- Custom code and Google Ads & Meta Ads tracking are included in every Learnyst plan. See [learnyst.com/pricing](https://www.learnyst.com/pricing).

### Recommended setup

1. In Google Analytics, copy the Google tag for your web stream (the manual installation code).
2. Paste it in Learnyst Code Snippets (method 1).
3. Check that visits arrive in Google Analytics **Realtime**.

### Method 1 (recommended): paste the Google tag in Code Snippets

1. Go to **Grow** \> **Marketing** \> **Integrations**. The **App Integrations** page opens.
2. Click **Code Snippets**.
3. On the **Site Footer Code** tab, paste the whole Google tag, including its `<script>` tags.
4. Click **Save changes**.

![Code Snippets page with the Site Footer Code, Site Body Code, Signup Tracking Code and Order Tracking Code tabs, Enable In Classroom and Save changes](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-05-2026-02-37-51-9055-PM.png?width=670&height=377&name=image-png-Dec-05-2026-02-37-51-9055-PM.png)

### Sample code you can copy

These are the standard snippets from Google and Meta. Copy one, replace the ID in it with your own, and paste it into the tab shown.

**Google Analytics 4 (Google tag)**: paste into **Site Footer Code**. Replace both `G-XXXXXXXXXX` with your Measurement ID (in Google Analytics: Admin \> Data streams \> your web stream).

```
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
</script>
```

**Sign-up event**: paste into **Signup Tracking Code**. It works only when the base code above is already in **Site Footer Code**.

```
<script>
  // Meta Pixel: count a completed sign-up
  if (window.fbq) { fbq('track', 'CompleteRegistration'); }
  // Google Analytics 4: count a sign-up
  if (window.gtag) { gtag('event', 'sign_up'); }
</script>
```

**Purchase event**: paste into **Order Tracking Code**. It records that a purchase happened. It does not send the actual order amount, so use your ad or analytics reports for counts, and your Learnyst sales reports for revenue.

```
<script>
  // Meta Pixel: count a purchase (replace 0 and INR only if you send a fixed value)
  if (window.fbq) { fbq('track', 'Purchase', {value: 0, currency: 'INR'}); }
  // Google Analytics 4: count a purchase
  if (window.gtag) { gtag('event', 'purchase', {currency: 'INR'}); }
</script>
```

Add each base code only once. If you use Google Tag Manager, add GA4 and the Meta Pixel inside GTM instead of pasting them here, or visits are counted twice.

### Method 2: the Google Analytics integration

1. Go to **Grow** \> **Marketing** \> **Integrations** and click **Google Analytics**.
2. Enter your key in **Google Analytics Key**.
3. Click **Update**.
4. As the note on the page says, publish your landing page again in the site builder. The page links to it as **sitebuilder**.

![Google Analytics page with the Google Analytics Key field, the sitebuilder note and the Update button](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-05-2026-02-37-49-4446-PM.png?width=670&height=377&name=image-png-Dec-05-2026-02-37-49-4446-PM.png)

The example in the **Google Analytics Key** box shows the older UA-XXXXXX-X format. If you have a GA4 property, use method 1 so you can paste the full Google tag that GA4 gives you.

![App Integrations page listing Google Analytics, Pabbly, Zapier, Code Snippets and Webhooks](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-05-2026-02-37-50-7782-PM.png?width=670&height=377&name=image-png-Dec-05-2026-02-37-50-7782-PM.png)

### Check that data arrives

1. Open your school website in a private browser window.
2. In Google Analytics, open **Realtime**. Your visit should show within a few minutes.

Standard reports take longer to fill in. If nothing shows, see [Is my Meta Pixel or GA4 working?](https://support.learnyst.com/is-my-meta-pixel-or-ga4-working-tracking-checklist?hsLang=en)

### Use cases

- See which Instagram post or YouTube video sends the most visitors to your course page.
- Compare visits to your landing page before and after a new offer.

### Best practices

- Use one method only. Adding GA4 through both methods, or directly and again in Google Tag Manager, counts visits twice.
- Use your Learnyst reports for exact sales numbers and Google Analytics for traffic sources and trends.

### If it doesn't work

- With method 2, make sure you clicked **Update** and published your landing page in the site builder.
- If method 2 doesn't record visits, remove the key, click **Update**, and use method 1 instead.

### What to do next

- [Add code snippets to your website](https://support.learnyst.com/add-code-snippets-to-your-website-ga4-gtm-meta-pixel?hsLang=en)
- [Is my Meta Pixel or GA4 working?](https://support.learnyst.com/is-my-meta-pixel-or-ga4-working-tracking-checklist?hsLang=en)
- [Track sign-ups and purchases with the Meta Pixel](https://support.learnyst.com/event-tracking-for-a-course-purchase-using-meta?hsLang=en)

If you have questions, contact us at support@learnyst.com.

- [Get Started](https://support.learnyst.com/get-started#main-content)
- [AI Tools](https://support.learnyst.com/ai-tools#main-content)
- [Courses](https://support.learnyst.com/courses#main-content)

    - [Getting Started](https://support.learnyst.com/courses#getting-started)
    - [Build Course](https://support.learnyst.com/courses#build-course)
    - [Add Lesson](https://support.learnyst.com/courses#add-lesson)
    - [Course Settings](https://support.learnyst.com/courses#course-settings)
    - [Lesson Settings](https://support.learnyst.com/courses#lesson-settings)
    - [Course Certificate](https://support.learnyst.com/courses#course-certificate)
- [Mock test](https://support.learnyst.com/mock-test#main-content)

    - [Getting Started](https://support.learnyst.com/mock-test#getting-started)
    - [Build Mock Test](https://support.learnyst.com/mock-test#build-mock-test)
    - [GMAT Question Types](https://support.learnyst.com/mock-test#gmat-question-types)
    - [Mock test Settings](https://support.learnyst.com/mock-test#mock-test-settings)
    - [Mock Test Templates](https://support.learnyst.com/mock-test#mock-test-templates)
- [Test Series](https://support.learnyst.com/test-series#main-content)

    - [Getting Started](https://support.learnyst.com/test-series#getting-started)
    - [Build Test Series](https://support.learnyst.com/test-series#build-test-series)
    - [Settings](https://support.learnyst.com/test-series#settings)
    - [Test Series Templates](https://support.learnyst.com/test-series#test-series-templates)
- [Bundles](https://support.learnyst.com/bundles#main-content)

    - [Getting Started](https://support.learnyst.com/bundles#getting-started)
    - [Build Bundles](https://support.learnyst.com/bundles#build-bundles)
    - [Bundle Settings](https://support.learnyst.com/bundles#bundle-settings)
- [Batch](https://support.learnyst.com/batch#main-content)

    - [Batch Settings](https://support.learnyst.com/batch#batch-settings)
- [Track](https://support.learnyst.com/track#main-content)

    - [Getting Started](https://support.learnyst.com/track#getting-started)
    - [Track Settings](https://support.learnyst.com/track#track-settings)
- [Ebooks](https://support.learnyst.com/ebooks#main-content)
- [Podcasts](https://support.learnyst.com/podcasts#main-content)
- [Webinars](https://support.learnyst.com/webinars#main-content)
- [Digital/Custom Products](https://support.learnyst.com/digital-custom-products#main-content)
- [Free Resource](https://support.learnyst.com/free-resource#main-content)
- [1:1 Coaching](https://support.learnyst.com/11-coaching#main-content)
- [1 on 1 Tutoring](https://support.learnyst.com/1-on-1-tutoring#main-content)

    - [Courses](https://support.learnyst.com/1-on-1-tutoring#courses)
- [Poll](https://support.learnyst.com/poll#main-content)
- [Question Pool](https://support.learnyst.com/question-pool#main-content)

    - [Getting Started](https://support.learnyst.com/question-pool#getting-started)
    - [Build Question Pool](https://support.learnyst.com/question-pool#build-question-pool)
- [Classification](https://support.learnyst.com/classification#main-content)

    - [Categories](https://support.learnyst.com/classification#categories)
    - [Tags](https://support.learnyst.com/classification#tags)
- [Product Pricing](https://support.learnyst.com/product-pricing#main-content)

    - [Getting Started](https://support.learnyst.com/product-pricing#getting-started)
    - [Pricing Plans](https://support.learnyst.com/product-pricing#pricing-plans)
- [Quiz & Assessment](https://support.learnyst.com/quiz-assessment#main-content)

    - [Add Questions](https://support.learnyst.com/quiz-assessment#add-questions)
    - [Build Quiz](https://support.learnyst.com/quiz-assessment#build-quiz)
    - [Question Settings](https://support.learnyst.com/quiz-assessment#question-settings)
    - [Quiz Settings](https://support.learnyst.com/quiz-assessment#quiz-settings)
    - [Question Review Flow](https://support.learnyst.com/quiz-assessment#question-review-flow)
    - [Learner Results](https://support.learnyst.com/quiz-assessment#learner-results)
- [Website](https://support.learnyst.com/website#main-content)

    - [Getting Started](https://support.learnyst.com/website#getting-started)
    - [Building Website](https://support.learnyst.com/website#building-website)
    - [Website Navigation](https://support.learnyst.com/website#website-navigation)
    - [Superpower Widgets](https://support.learnyst.com/website#superpower-widgets)
    - [Sign Up Settings](https://support.learnyst.com/website#sign-up-settings)
    - [Widgets (Embeddables)](https://support.learnyst.com/website#widgets-embeddables)
- [Website Custom domain](https://support.learnyst.com/website-custom-domain#main-content)
- [Mobile Apps](https://support.learnyst.com/mobile-apps#main-content)

    - [Android](https://support.learnyst.com/mobile-apps#android)
    - [iOS](https://support.learnyst.com/mobile-apps#ios)
- [Communities](https://support.learnyst.com/communities#main-content)

    - [Learnyst Community](https://support.learnyst.com/communities#learnyst-community)
    - [Telegram Community](https://support.learnyst.com/communities#telegram-community)
- [Gamification](https://support.learnyst.com/gamification#main-content)
- [Learner Management](https://support.learnyst.com/learner-management#main-content)

    - [Learner Profile](https://support.learnyst.com/learner-management#learner-profile)
    - [Learner Actions](https://support.learnyst.com/learner-management#learner-actions)
    - [Learner Settings](https://support.learnyst.com/learner-management#learner-settings)
- [Roles and Permissions](https://support.learnyst.com/roles-and-permissions#main-content)
- [Marketing](https://support.learnyst.com/marketing#main-content)

    - [Refer Earn](https://support.learnyst.com/marketing#refer-earn)
    - [Push Message](https://support.learnyst.com/marketing#push-message)
    - [Marketing Email](https://support.learnyst.com/marketing#marketing-email)
    - [System Email](https://support.learnyst.com/marketing#system-email)
    - [Whatsapp Messenger](https://support.learnyst.com/marketing#whatsapp-messenger)
    - [Affiliates](https://support.learnyst.com/marketing#affiliates)
    - [Workflows](https://support.learnyst.com/marketing#workflows)
    - [Forms](https://support.learnyst.com/marketing#forms)
    - [Campaign](https://support.learnyst.com/marketing#campaign)
    - [CTA](https://support.learnyst.com/marketing#cta)
    - [Promo Slider](https://support.learnyst.com/marketing#promo-slider)
- [Sales](https://support.learnyst.com/sales#main-content)
- [Workflows](https://support.learnyst.com/workflows#main-content)
- [Integrations](https://support.learnyst.com/integrations#main-content)

    - [Pabbly Integration](https://support.learnyst.com/integrations#pabbly-integration)
    - [Zapier Integration](https://support.learnyst.com/integrations#zapier-integration)
    - [Google Ads](https://support.learnyst.com/integrations#google-ads)
    - [Meta Ads](https://support.learnyst.com/integrations#meta-ads)
- [Newsfeed](https://support.learnyst.com/newsfeed#main-content)
- [Subscriptions](https://support.learnyst.com/subscriptions#main-content)
- [Ratings and Reviews](https://support.learnyst.com/ratings-and-reviews#main-content)
- [Learner Support](https://support.learnyst.com/learner-support#main-content)
- [Sub School](https://support.learnyst.com/sub-school#main-content)
- [Reports](https://support.learnyst.com/reports#main-content)

    - [Score Reports & Quiz Insights](https://support.learnyst.com/reports#score-reports-quiz-insights)
- [Content Security](https://support.learnyst.com/content-security#main-content)

    - [CourseGaurd](https://support.learnyst.com/content-security#coursegaurd)
- [School Settings](https://support.learnyst.com/school-settings#main-content)

    - [General Settings](https://support.learnyst.com/school-settings#general-settings)
    - [Learner Billing](https://support.learnyst.com/school-settings#learner-billing)
    - [Payment gateway](https://support.learnyst.com/school-settings#payment-gateway)
    - [Features](https://support.learnyst.com/school-settings#features)
    - [Security](https://support.learnyst.com/school-settings#security)
    - [Channels](https://support.learnyst.com/school-settings#channels)
- [Zoom integration](https://support.learnyst.com/zoom-integration#main-content)
- [Payments](https://support.learnyst.com/payments#main-content)

    - [Custom installments](https://support.learnyst.com/payments#custom-installments)
- [Troubleshooting](https://support.learnyst.com/troubleshooting#main-content)
- [FAQs](https://support.learnyst.com/faqs#main-content)
- [Users](https://support.learnyst.com/users#main-content)

    - [Learners](https://support.learnyst.com/users#learners)
- [Intergrations](https://support.learnyst.com/intergrations#main-content)
- [Learners' Help article](https://support.learnyst.com/learners-help-article#main-content)
- [Socials](https://support.learnyst.com/socials#main-content)
- [Zoho E-signin](https://support.learnyst.com/zoho-e-signin#main-content)

- [Home](https://learnyst-1.hubspotpagebuilder.net/)
- [About Us](https://learnyst-1.hubspotpagebuilder.net/about-us)
- [Contact Us](https://learnyst-1.hubspotpagebuilder.net/contact-us)
- [Blog](https://learnyst.hs-sites-na2.com/blog)

[![Chill listening crop-3](https://support.learnyst.com/hs-fs/hubfs/Learnyst%20logo%20(2).png?width=24&height=24&name=Learnyst%20logo%20(2).png "Chill listening crop-3")](https://www.learnyst.com/)

Learnyst Support

Copyright © 2026, Learnyst Insights Pvt Ltd