Back to blog
Google Tag Manager updated 12 min read

How to create Web Push reports in GA4 via GTM

Subscriptions, permission funnel and errors in GA4, now with the two new events of version 1.9.3.

This tutorial measures subscriptions. To see the clicks and revenue from push, see the tutorial How to see the revenue from your push notifications (UTM, GA4 and Ad Manager).

This guide shows how to integrate the AI Web Push plugin with Google Tag Manager (GTM) and Google Analytics 4 (GA4). By the end, you will know how many people subscribed, where you lose visitors in the permission funnel, what the native prompt's rejection rate is, how many people let the request expire without answering and how to monitor technical errors in real time.

Updated for plugin version 1.9.3. Version 1.9.3 brings two new events, ai_web_push_permission_timeout and ai_web_push_subscription_skipped, and two new values in push_source. What changed with Chrome 155 is in the post The Chrome notification prompt changed on Android.

Important. To have all the events described in this guide, the AI Web Push plugin must be on version 1.9.3 or later. Check the installed version on your WordPress plugins page. The version history shows what each version brought and lets you download the file.

Why monitor Push events?

Web Push subscription is a critical conversion funnel for any site looking to retain its audience.

  • Permission funnel. Does the user see the modal? Do they click accept? Do they confirm in the browser?
  • Conversion source. Does the custom modal convert better than the direct native prompt?
  • Who did not decide. How many let the browser request expire without accepting or refusing?
  • Error monitoring. Failures communicating with Firebase or browser blocks.

The AI Web Push plugin sends 11 capture events to Tag Manager, through the data layer (dataLayer), and the table below describes them. If you turn on Saída de WebView Meta (WebView Meta Exit), an experimental feature that is off by default, you get 8 more from that window, which the table only mentions.

Complete event mapping

All events are sent with the prefix ai_web_push_.

EventDescriptionWhen it fires
ai_web_push_browser_not_supportedIncompatible browserThe browser does not have the notifications API. It tends to happen in app browsers, in iPhone Safari outside the installed app and on pages without HTTPS.
ai_web_push_modal_shownModal shownThe custom modal appeared on screen.
ai_web_push_modal_acceptedModal acceptedThe user clicked Accept on the custom modal.
ai_web_push_modal_dismissedModal canceledThe user clicked Cancel on the custom modal. It also fires after ai_web_push_permission_denied. From version 1.9.3, it no longer fires when the browser request expires or is closed without an answer.
ai_web_push_prompt_shownNative prompt shownThe browser displayed the native permission box (Notification.requestPermission was called).
ai_web_push_permission_grantedPermission grantedThe user clicked Allow on the native prompt.
ai_web_push_permission_deniedPermission deniedThe user denied the native prompt. On plugin version 1.9.3 or later, a request that expires or is closed without an answer does not land here and goes to ai_web_push_permission_timeout.
ai_web_push_permission_timeoutRequest without an answer (new in 1.9.3)The request ended without an answer, because it expired or was closed. It is not a refusal, and the reader can still accept later.
ai_web_push_subscription_successSubscription sent (conversion)The FCM token was obtained and the registration was sent to the server. The event fires on sending and does not confirm that the server saved the subscriber.
ai_web_push_subscription_skippedSubscription already exists (new in 1.9.3)The browser was already registered with the same token, and the plugin does not send a new registration.
ai_web_push_subscription_errorTechnical errorFailure to obtain the FCM token, from a network error, invalid configuration or another reason.
ai_web_push_webview_exit_*Leaving the app browser (8 events, only with Saída de WebView Meta turned on)They only fire with Saída de WebView Meta turned on. The details are in the paragraph below the table.

Besides these 11, there are 8 events for leaving the app browser (WebView), with names that start with ai_web_push_webview_exit_. They only fire if you turn on the Saída de WebView Meta (Experimental) option in the plugin's Configurações Avançadas (Advanced Settings). It is off by default, applies only to the pages you choose (never the home page) and only to visitors who arrive from Instagram, Facebook or Messenger. When they exist, the 8 share the same prefix, fall into the same regex trigger and are not part of the reports in this tutorial.

Parameters sent

Each event reaches the dataLayer with only event, push_provider and push_source. The last two serve for filtering and segmentation. The technical error message does not go to the dataLayer, and exists only in the manual capture, further down.

  • push_provider is always ai_web_push. It is useful for filtering if you have other scripts.
  • push_source shows the origin of the flow, with four values.

    • custom_modal means the flow started through the plugin's custom modal.
    • native_prompt means the flow went directly through the browser's native prompt.
    • site_controls means the visitor allowed notifications later, through the site controls in the browser. It appears only on subscription events (subscription_success, subscription_skipped and subscription_error), from version 1.9.3.
    • permission_preexisting means the visitor had already granted permission in the browser but was not yet registered in AI Web Push, and the plugin registers them on the next visit. It appears only on subscription events, from version 1.9.3.

Part 1. Setup in Google Tag Manager (GTM)

Let's set up GTM to read this data and send everything to GA4.

Before you start, your GTM must have GA4 installed through the Google Tag, triggered on all pages. In Triggering, choose the Initialization trigger that covers all pages. On screen, its name may end in All Initialization Events or in All Pages. If your site does not have GA4 yet, see the tutorial How to add Google Analytics (GA4) to your site using a plugin, code or GTM. Do not install GA4 twice, through a plugin and through GTM at the same time. If your GA4 is already in a Google Analytics plugin, AI Web Push does not replace it, and the Google pages we read do not say whether the event tag works without the Google Tag in GTM. Use the Google Analytics plugin's own feature to paste the GTM code, if it has one, check it in the GTM preview and, if in doubt, talk to AI Web Push support.

On the English Tag Manager page, Google now recommends the Google Analytics destination and keeps the Google Tag as an alternate method. The pages in Portuguese and Spanish still speak only of the Google Tag. If your GTM shows the notice to optimize the container, follow the screen. From our reading, the two paths send the same measurement, so do not install both in the same container. Google does not cover that point.

Step 1. Create data layer variables

We need to capture the parameters the plugin sends.

  1. Go to Variables, then New, in the area for variables defined by the user.
  2. In Variable Configuration, choose Data Layer Variable.
  3. Create the variables in the table.
Variable name in GTMData layer variable nameDescription
dlv push_sourcepush_sourceSource (modal, native prompt, site controls or permission that already existed)
dlv push_providerpush_providerProvider (ai_web_push)

Step 2. Create a smart trigger (regex)

Instead of creating one trigger for each event, we will use a regular expression (regex) to capture all the plugin's events at once. This keeps your GTM clean, and the new 1.9.3 events already fall into it with no change.

  1. Go to Triggers, then New.
  2. In Type, choose Custom Event.
  3. In Event name, write ^ai_web_push_.*. The ^ means "starts with," and .* means "anything after." This captures every event the plugin sends from your site, the 11 capture events and, if you turned on Saída de WebView Meta, also the 8 from that window.
  4. Check the use regex matching option next to the event name.
  5. Name the trigger AI Web Push event (all) and save.

Step 3. Create the generic GA4 tag

Now a single tag will send all events to GA4, keeping the original name.

  1. Go to Tags, then New.
  2. Choose the GA4 Event tag type, under Google Analytics. On your GTM screen, the selector may group the types in another way, so check.
  3. In Measurement ID, enter the ID of your GA4, the same one as the Google tag already installed. The ID starts with G.
  4. In Event Name, write {{Event}}.
  5. In Event parameters, add the parameters for analysis.

    • source with the value {{dlv push_source}}
    • provider with the value {{dlv push_provider}}
  6. In Triggering, choose the AI Web Push event (all) trigger that we created.
  7. Click Save. Then click Submit and, on the submit screen, Publish.

Tip. Using the automatic variable {{Event}}, GA4 receives the exact event name, such as ai_web_push_subscription_success. If you want to clean up the name and remove the prefix, you can create a regex table variable in GTM, but sending the original name is simpler and works perfectly.

Part 2. Setup in Google Analytics 4 (GA4)

Now the data is flowing into GA4. Let's organize what arrived.

1. Mark the key event

The most important event is ai_web_push_subscription_success.

  1. In GA4, go to Admin, then Data display, then Events.
  2. In the list, find ai_web_push_subscription_success and click the star next to it. The star marks the event as a key event. Some Google pages still call this a conversion.
  3. If the event is not in the list yet, Google also speaks of marking a new event as a key event on that screen. Check the button on your screen.

Now every subscription sent counts as a key event in your acquisition and engagement reports. Remember that subscription_success marks the sending of the registration, not the server's confirmation. Do not mark ai_web_push_subscription_skipped as a key event, because it indicates a browser that was already registered.

2. Create the custom dimension (optional, but recommended)

To use the source parameter in reports, you need to register that parameter.

  1. Go to Admin, then Data display, then Custom definitions.
  2. Create a custom dimension named Push Source with the event parameter source.

Part 3. Advanced reports (Explore)

Here you create views that the standard report does not show.

Report 1. The real permission funnel

Find out where users drop off.

  1. In GA4, go to Explore and open a blank exploration.
  2. Choose the Funnel exploration technique.
  3. Set up the steps.

    • Step 1 (Viewed), event ai_web_push_modal_shown OR ai_web_push_prompt_shown.
    • Step 2 (Interacted), event ai_web_push_modal_accepted.
    • Step 3 (Allowed), event ai_web_push_permission_granted.
    • Step 4 (Subscribed), event ai_web_push_subscription_success.

Result. You see the drop off rate at each step.

This funnel suits sites with the custom modal turned on. On the browser's direct request, without a modal, step 2 does not exist and the flow goes from ai_web_push_prompt_shown onward. In that case, build the funnel with steps 1, 3 and 4 only.

Report 2. Source comparison

Which path generates more subscribers?

  1. Create a Free form exploration.
  2. In Rows, drag the Push Source dimension.
  3. Filter by the ai_web_push_subscription_success event and, in Values, place Event count.

Result. A table comparing how many subscribers came through custom_modal, native_prompt, site_controls and permission_preexisting. The last two values only exist from version 1.9.3 and show who allowed notifications later, through the site controls, and who already had permission from before.

Report 3. Error monitoring

Are your users having technical problems?

  1. Create a Free form exploration.
  2. Filter by the ai_web_push_subscription_error event.
  3. In Rows, place the Event name dimension. If you want to see where the errors happen, add a page or browser dimension from the exploration's list of dimensions.
  4. In Values, place Event count.

Result. You see how many subscription errors happened and, with the added dimension, on which pages or browsers. The technical error message does not reach GA4. To read it, use the manual capture further down.

Report 4. Who refused and who did not decide

Since version 1.9.3, a request that expires or is closed without an answer goes to ai_web_push_permission_timeout, and the real refusal stays in ai_web_push_permission_denied.

  1. Create a Free form exploration.
  2. Filter by the ai_web_push_permission_denied and ai_web_push_permission_timeout events.
  3. In Rows, place the Event name dimension.
  4. In Values, place Event count.

Result. You see separately who refused and who let the request end without an answer, and that second group can still accept later. To compare with the period before version 1.9.3, add the two together, because before it both cases stayed in the same event.

Manual capture via JavaScript (for developers)

If you do not use GTM and want to send the data straight to your CRM, your database or another analytics tool, use the plugin's event system. The global aiWebPushFront object has an on() method for listening to events.

// Exemplo, enviar a inscrição para o seu backend ou CRM
if (window.aiWebPushFront) {
    window.aiWebPushFront.on('subscription_success', function(detail) {
        console.log('Usuário inscrito', detail);
        fetch('/minha-api/registrar-push', {
            method: 'POST',
            body: JSON.stringify({
                source: detail.source
            })
        });
    });

    // Exemplo, monitorar erros
    window.aiWebPushFront.on('subscription_error', function(detail) {
        console.error('Erro no push', detail.error);
    });
}

The detail of subscription_success carries the source, in detail.source. subscription_skipped also carries detail.reason, and subscription_error carries detail.error, the technical error message, which does not go to the dataLayer.

The subscription events available for on() are browser_not_supported, modal_shown, modal_accepted, modal_dismissed, prompt_shown, permission_granted, permission_denied, permission_timeout, subscription_success, subscription_skipped and subscription_error. on() also receives push_received_while_away, which only reaches those who listen through on() and does not go to the dataLayer, and the 8 webview_exit_* events, if Saída de WebView Meta is turned on.

How to debug and test

Do not publish without testing.

  1. Turn on the plugin's debug mode. Open the browser console (F12), type the command below and reload the page. The plugin starts showing colored logs in the console for each step.
localStorage.setItem('ai-web-push-debug', 'true');
  1. Use the GTM preview. Click Preview in GTM, connect to your site and go through the subscription flow. In the Tag Assistant, check whether the ai_web_push_* events appear in the left sidebar and whether the GA4 tag fired.
  2. Use GA4 DebugView. Go to Admin, then Data display, then DebugView. DebugView needs debug mode turned on. You should see events arriving in real time on the timeline.

Keep debug off in production and turn it on only to investigate a problem.

Summary of files involved

  • Plugin. Emits the events into the dataLayer.
  • GTM. Captures the events through the regex trigger and sends them to GA4.
  • GA4. Processes the data, marks key events and generates reports.

With this setup, you have an observatory of the health and performance of your Web Push subscriptions. To see what happens after the click on the push, including ad revenue, see the tutorial How to see the revenue from your push notifications (UTM, GA4 and Ad Manager). The plugin's events and test scenarios are in the post AI Web Push and Google Tag Manager.

Read more at Google

The Google pages cited were consulted on October 14, 2026.

Put it into practice with AI Web Push.

100% automatic push notifications with AI: more recurring traffic for your site.