pieowl

How to migrate from Google Analytics to Pieowl

Switch from Google Analytics to Pieowl: map your GA4 events, run both tools side by side, then remove GA. Your GA history stays in Google Analytics.

Pieowl TeamIntermediate · 45 min · 8 Oct 2026
Guide · From GA4

For most websites, the code side of this move takes under an hour. You'll get cookie-free analytics, a simpler dashboard and an MCP server, so your own AI assistant can answer questions about your data. See the Google Analytics vs Pieowl comparison for the full picture.

One thing first: Pieowl can't import your Google Analytics history. There is no GA importer. Your old data stays in Google Analytics. So the plan is to run Pieowl next to GA for a while, check that the numbers make sense, and then switch. Your Pieowl history starts on the day you install it.

Pieowl and GA4 both track events with properties, so mapping your tracking is simple.

Prerequisites

  • An existing Google Analytics 4 (GA4) setup
  • A Pieowl account (start a 14-day free trial)
  • Access to your website's code or Google Tag Manager

Install Pieowl

Add Pieowl to your website next to Google Analytics. Don't remove GA yet. You'll run both during the move, so nothing is lost.

Add the Pieowl snippet to your site's HTML. Replace YOUR_CLIENT_ID with the Client ID from your Pieowl dashboard.

<script src="https://pieowl.com/pieowl.js" data-client-id="YOUR_CLIENT_ID" defer></script>

Pieowl tracks page views for you, much like GA4 does. By default it also tracks clicks to other domains and clicks on buttons and links with data-track attributes. You choose what it collects in Settings → Site → What Pieowl counts, with no code to edit.

If you use Google Tag Manager, create a new Custom HTML tag, paste the snippet, set the trigger to All Pages and publish your container.

If your site has a build step, you can install the npm package instead: npm install @pieowl/web. See the Script Tag SDK documentation for all options.

Map your GA4 events

Pieowl's track() call looks a lot like GA4's gtag('event', …). Most of your event tracking moves over with small changes.

Page views

GA4 tracks page views for you, and so does Pieowl (Page views is on by default in Settings → Site). If you need to send a page view yourself, for example in a single-page app with custom routing, call screenView. It uses the current URL and page title.

window.pieowl('screenView');

Custom events

Custom events look almost the same. This GA4 event:

gtag('event', 'button_click', {
  button_name: 'signup',
  button_location: 'hero'
});

becomes this in Pieowl:

window.pieowl('track', 'button_click', {
  button_name: 'signup',
  button_location: 'hero'
});

The event name and properties carry over as they are. Event names session_start and session_end are reserved in Pieowl, because Pieowl creates those itself.

User identification

In GA4 you set a user ID and user properties. In Pieowl, one identify call does both and builds a user profile with the user's event history.

window.pieowl('identify', {
  profileId: 'user_123', // Required
  firstName: 'Joe',
  lastName: 'Doe',
  email: 'joe@doe.com',
  properties: {
    tier: 'premium',
  },
});

profileId is required. Use the user's ID from your own database. Pieowl keeps it in memory for the page, not in a cookie, so call identify on every page where the user is logged in.

E-commerce events

You can keep GA4-style e-commerce events like add_to_cart and purchase as normal Pieowl events, with the same properties.

window.pieowl('track', 'purchase', {
  transaction_id: 'T12345',
  value: 99.99,
  currency: 'USD',
  items: [{
    item_id: 'SKU123',
    item_name: 'Widget',
    price: 99.99,
    quantity: 1
  }]
});

To see the money in Pieowl's revenue reports, also send it with purchase. GA4's transaction_id becomes id, value becomes amount and currency stays currency. The amount is in normal units, like 99.99, and the same id sent twice counts once. Revenue sent from the browser only works if you turn on Accept revenue sent from the browser in your site settings. Sending it from your backend is safer. The e-commerce guide shows both ways.

window.pieowl('purchase', { id: 'T12345', amount: 99.99, currency: 'USD' });

Run parallel tracking

Run both tools for one to two weeks. That lets you compare the data and catch gaps before you remove GA. A small wrapper sends each event to both:

function trackEvent(eventName, properties) {
  // Send to GA4
  if (typeof gtag !== 'undefined') {
    gtag('event', eventName, properties);
  }

  // Send to Pieowl
  if (window.pieowl) {
    window.pieowl('track', eventName, properties);
  }
}

// Use this wrapper for all event tracking
trackEvent('button_click', { button_name: 'signup' });

Replace your gtag('event', …) calls with this wrapper. Both tools then get the same events, and the final switch is a one-line change in the wrapper.

Verify and compare data

After a week of parallel tracking, compare the two tools. First check both realtime views to confirm events are coming in.

Then compare page views, visitors and your key events over the same days. Expect some gaps. The tools count visitors and sessions in different ways and filter bots differently, so the numbers won't match exactly. Look for big gaps on certain pages or events. Those point to a missing snippet or a wrapper you forgot to use.

Check custom events and user identification closely. Open a few user profiles in Pieowl and confirm that identify links events to the right person.

If the gaps are large, check that the snippet loads on every page, that the wrapper is used everywhere, and that the console shows no JavaScript errors.

Remove Google Analytics

Once Pieowl tracks what you need and you trust the numbers, remove Google Analytics from your site.

If you added GA4 to your HTML directly, remove the gtag.js script and its setup code.

<!-- Remove this entire block -->
<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>

If you use Google Tag Manager, pause or delete the GA4 tags and publish your container. You can keep GTM for other tags.

Update your wrapper so it only sends to Pieowl.

function trackEvent(eventName, properties) {
  if (window.pieowl) {
    window.pieowl('track', eventName, properties);
  }
}

Pieowl sets no cookies and stores nothing on your visitors' devices. If Google Analytics was the only reason for your cookie banner, you may be able to drop the banner. That depends on your country, on the Pieowl features you use (session replay needs consent) and on the other tools on your site. See Do you need a cookie banner? and check with your legal advisor. The cookieless analytics article explains how Pieowl counts visitors without cookies.

What changes after migration

What you gain. Cookie-free tracking, a dashboard built for everyday questions, and product analytics like funnels, retention and user profiles. You can also ask your own AI assistant, like Claude or Cursor, about your data over MCP. Your data is stored in the EU. Pieowl also connects to Google Search Console, so you can still see your search data.

What you leave behind. Your GA history stays in Google Analytics, because Pieowl can't import it. Keep access to your GA property if you want to look back at older data. Pieowl also has no Google Ads integration. If you rely on GA4 for Google Ads conversions or ad attribution, keep GA4 for that job, or set up conversion tracking in Google Ads itself.

Next steps

Once Pieowl is running, read the funnel guide to track user journeys through your conversion paths. For a full comparison, see the Google Analytics alternative page.

For framework setup, see these guides:

Can I import historical data from Google Analytics?

No. Pieowl has no Google Analytics importer, so your GA history can't be moved. It stays in your Google Analytics property. That's why this guide runs both tools side by side for a while: Pieowl builds up its own history before you switch. Pieowl's importers cover Mixpanel, Amplitude and Umami.

How do I handle GA4 custom dimensions?

Pieowl uses properties instead of dimensions. Send each custom dimension as an event property. For example, if you had a user_type dimension in GA4, add it to your track calls: window.pieowl('track', 'event_name', { user_type: 'premium' }). For values that belong on every event, use setGlobalProperties.

Does Pieowl use cookies?

No. The tracker never sets a cookie and stores nothing on your visitors' devices. In many cases that means no consent banner for your analytics. See Do you need a cookie banner?.

Does Pieowl help with GDPR?

Pieowl is built for GDPR: no cookies, no stored IPs. Your data is stored in the EU. Ask your legal advisor about your own setup.

Your first dashboard in five minutes.

14-day free trial, no card needed. Cloud in the EU. No cookies.