How to Track Pop-Up in Google Analytics

Cody Schneider8 min read

Your website pop-up is live and getting impressions, but do you actually know if it's working? It’s common to see that a pop-up was shown 10,000 times, but the real question is what happened next. Without proper tracking, you're flying blind, unable to tell if your well-intentioned CTA is genuinely engaging users or just annoying them. This guide will walk you through exactly how to track your pop-up’s performance in Google Analytics 4, from views to clicks to form submissions.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Is Tracking Pop-Up Performance So Important?

Setting up tracking might seem like an extra step, but the insights you gain are invaluable. It’s the difference between guessing what works and knowing for sure.

  • Measure True Effectiveness: Move beyond simple impression counts. Is your pop-up getting clicks? Are people actually submitting the form? Tracking conversions tells you if your message is convincing enough to drive action.
  • Optimize Your A/B Tests: If you're testing two different headlines or offers, you need more than just click data. By tracking submissions, you can definitively see which version converts better, allowing you to make data-driven decisions that improve results.
  • Understand User Behavior: Do users who see the pop-up on a specific blog post convert better than those who see it on your homepage? Tracking lets you connect pop-up interactions with source pages, helping you to tailor your offers to user intent.
  • Calculate ROI: Once you know how many leads or sales your pop-up generates, you can tie its performance directly to revenue. This helps justify the tool you're paying for and proves its val ue to your team.

The Tools You’ll Need

To get this done right, you'll need three things. The good news is they’re all free and likely tools you're already using.

  • A Google Analytics 4 Property: This is where all your tracking data will be sent and analyzed.
  • Google Tag Manager (GTM): This is the secret ingredient. GTM acts as the bridge between your website and GA4, allowing you to set up tracking for specific actions (like a pop-up view) without having to touch a single line of your website's code.
  • Access to your Pop-up Tool: You’ll need to find a unique identifier for your pop-up, like a CSS ID or class. We'll cover how to do this in a moment.

The Three Pop-Up Events You Absolutely Must Track

Tracking can get complicated, so let’s focus on the three interactions that give you a complete picture of your pop-up’s funnel:

  1. Pop-up View (Impression): Tracks every time the pop-up is successfully loaded and displayed to a user.
  2. Pop-up Click: Tracks clicks on any primary button or link inside the pop-up (e.g., "Get My Coupon" or "Learn More").
  3. Pop-up Submission (Conversion): Tracks every time a user successfully fills out and submits your form. This is your most important conversion metric.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

How to Set Up Pop-up Tracking with Google Tag Manager

We’ll use Google Tag Manager to create the tracking logic. This method is far superior to hard-coding because it’s flexible, contained, and doesn't require a developer every time you want to make a change.

Step 1: Find Your Pop-up’s Unique Identifier

GTM needs a way to know exactly what pop-up element it should be watching. You do this using a CSS selector. It sounds technical, but it’s quite simple to find.

  1. Navigate to a page on your website where the pop-up appears.
  2. Right-click on the pop-up itself (on the container, not just the text) and select "Inspect."
  3. Your browser’s developer tools will open. Look at the highlighted HTML code. Find the pop-up container’s id or class. IDs are usually best because they are unique.

For example, you might see something like <div id="mc-popup-container">. In this case, your CSS selector for the ID would be #mc-popup-container. If you only see a class, like <div class="convertbox-container">, your selector for the class would be .convertbox-container.

Jot this selector down - you’ll be using it in the next step.

Step 2: Create a Trigger for Each Pop-Up Event

In GTM, Triggers are the rules that tell your Tags when to fire. We need to create a unique trigger for each of the three events we want to track.

Trigger 1: Pop-up View

  1. In GTM, go to Triggers > New.
  2. Give it a descriptive name, like “Trigger - Pop-up View.”
  3. Under "Trigger Configuration," select the Element Visibility trigger type.
  4. In "Selection Method," choose CSS Selector.
  5. Paste the unique ID or class selector you found in Step 1 (e.g., #mc-popup-container) into the "Element Selector" field.
  6. Set "When to fire" to Once per page. This ensures you only count one view per page load, even if a user closes and re-opens it.
  7. Save the trigger.

Trigger 2: Pop-up Click

  1. Go to Triggers > New and name it “Trigger - Pop-up Click.”
  2. For the trigger type, choose All Elements under the "Click" section.
  3. Set it to fire on Some Clicks.
  4. Now we create the condition. The dropdowns should be set to Click Element > matches CSS selector.
  5. In the final field, we'll combine the pop-up’s selector and the button’s selector. For example, if your pop-up ID is #mc-popup-container and your button’s class is .popup-submit-button, you would enter #mc-popup-container .popup-submit-button. Be sure to put a space between the two.
  6. Save the trigger.

Trigger 3: Pop-up Submission

This is often the trickiest because modern forms don’t always use standard form submission methods. For 90% of cases, tracking a click on the final "submit" button is the most reliable way to track a submission.

The setup is identical to the Pop-up Click trigger, but you target the specific submit button. If your submit button has a unique ID like #newsletter-submit, your selector might look like #mc-popup-container #newsletter-submit.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 3: Create a GA4 Event Tag for Each Action

Now that your Triggers are ready, you can create the Tags that will send the data to GA4.

  1. Go to Tags > New.
  2. Name your tag something clear, like “GA4 Event - Pop-up Submission.”
  3. In "Tag Configuration," choose Google Analytics: GA4 Event.
  4. Select your main GA4 Configuration Tag from the dropdown.
  5. For the Event Name, use a standard naming convention like popup_submission. For the other two events, you could use popup_view and popup_click.
  6. (Optional but recommended) Add Event Parameters to give your tracking more context. For example, you could add a parameter named popup_name with the value Winter Sale Offer to differentiate between pop-ups.
  7. In the "Triggering" section at the bottom, select the corresponding trigger you created (e.g., “Trigger - Pop-up Submission”).
  8. Save the tag.

Repeat this process to create separate tags for popup_view and popup_click, connecting each to its respective trigger.

Step 4: Test and Publish Your Changes

Before making your new tags live, always use GTM's Preview mode to make sure everything works.

  1. Click the Preview button in the top right of GTM.
  2. Enter your website URL and click "Connect."
  3. Your website will open in a new tab, with the GTM Debug pane open.
  4. Interact with your website to trigger the pop-up. When it appears, you should see your “GA4 Event - Pop-up View” tag fire in the debug console.
  5. Click the main button. Your “GA4 Event - Pop-up Click” tag should fire.
  6. Submit the form. Your “GA4 Event - Pop-up Submission” tag should fire.

If everything fires as expected, go back to GTM, click Submit, and then Publish your changes.

How to See Your Pop-up Data in GA4

Your custom event data should start populating in GA4 within 24 hours. Here’s where to find it:

  • For immediate confirmation: Go to Realtime reports. Trigger your pop-up events on your live site and you should see them appear in the "Event count by Event name" card.
  • For long-term analysis: Go to Reports > Engagement > Events. Your new events (popup_view, popup_submission, etc.) will appear in the list.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Pro Tip: Register Your Custom Parameters

If you added event parameters like popup_name, you need to register them as custom dimensions in GA4 to use them in your reports. Go to Admin > Custom definitions > Create custom dimensions. Enter the dimension name (e.g., "Popup Name") and then select the exact event parameter (e.g., "popup_name"). This will allow you to break down your pop-up data by name, page, or any other context you’ve sent.

Final Thoughts

Tracking your pop-ups in Google Analytics turns them from simple website elements into measurable marketing tools. By understanding who interacts with your offers and which ones drive conversions, you can refine your strategy, improve user experience, and generate more leads and sales from the traffic you already have.

Following the steps above in GTM and GA4 gives you a powerful reporting foundation. Often, the next challenge becomes connecting these pop-up events to the rest of the customer journeys buried in platforms like Shopify, HubSpot, or Salesforce. At Graphed, we automate that entire cross-platform analysis for you. Just connect your sources and ask questions in plain English, like "How many users who subscribed to my 'Winter Sale' pop-up ended up making a purchase?" to get live dashboards and instant answers, saving you from the complex job of creating custom reports between platforms.

Related Articles