Track Smart Wishlist activity with Google Analytics (GA4)

Track wishlist activity in Google Analytics 4 and use it to power reporting and remarketing. When enabled, Smart Wishlist pushes events into your store’s dataLayer, where Google Tag Manager (GTM) forwards them to GA4.

This guide is written for store owners. For Developers, a section at the end of this article covers event schemas, custom dimensions, and GTM setup.


What you can track

Smart Wishlist can send up to three events to GA4:

EventFires when…GA4 type
add_to_wishlistA shopper adds a product to their wishlistRecommended (standard)
remove_from_wishlistA shopper removes a product from their wishlistCustom
wishlist_add_to_cartA shopper adds a wishlisted product to their cartCustom

add_to_wishlist is a Google-recognized event and appears in GA4’s standard reports automatically once data is flowing. remove_from_wishlist and wishlist_add_to_cart are custom events — they are sent to GA4, but you must register them in GA4 before they show up in reports. See Registering custom events below.


Before you begin

This integration sends data to the dataLayer and relies on Google Tag Manager (GTM) to deliver it to GA4. To use it, your store needs:

  1. Google Tag Manager installed on your storefront, with its container snippet loaded on your pages.
  2. A GA4 configuration tag in that GTM container (so GTM knows which GA4 property to send to).

Important: If you connect GA4 to your store using Shopify’s native Google & YouTube channel (rather than GTM), these wishlist events will not appear in your GA4 property. A GTM-based setup is required. If you’re not sure which you have, ask whoever set up your analytics, or check whether a Google Tag Manager snippet (GTM-XXXXXXX) is present on your storefront.


Enabling the integration

  1. In the Smart Wishlist admin, open Labs → GA4 Integration.
  2. Tick Enable GA4 Integration. This turns on add_to_wishlist and remove_from_wishlist.
  3. (Optional) Tick Track Add to Cart from Wishlist to also send wishlist_add_to_cart. This option is only available when the master toggle above is on.
  4. Click Update Settings.

That’s it on the Smart Wishlist side. The next time a shopper interacts with their wishlist, the events begin flowing into your dataLayer.

The “Track Add to Cart from Wishlist” event is wishlist-attributed — it tells you that a cart addition came specifically from the wishlist. It does not replace or interfere with your store’s normal add_to_cart tracking.


Verifying it works

The fastest way to confirm events are firing is GA4 DebugView.

  1. Install the Google Analytics Debugger Chrome extension and enable it (this tags your own browsing as debug traffic).
  2. In GA4, go to Admin → DebugView.
  3. On your storefront, add a product to your wishlist.
  4. Within a few seconds, an add_to_wishlist event should appear in DebugView. Click it to inspect its parameters (currency, value, items).

If you have GTM Preview mode available, you can also confirm the dataLayer push directly:

  1. In GTM, click Preview and enter your store URL.
  2. Add something to your wishlist on the connected storefront.
  3. The event appears in the GTM debug panel’s event stream, where you can inspect the dataLayer values your tags will receive.

Registering custom events and dimensions

Because remove_from_wishlist and wishlist_add_to_cart are custom events, GA4 needs to be told about them before they appear in reports.

Register the custom events:

  1. In GA4: Admin → Events (under Data display).
  2. Confirm remove_from_wishlist and wishlist_add_to_cart appear in the list after a few have fired. (Events show up here automatically once GA4 has received them at least once.)
  3. Optionally mark them as Key events if they matter to your conversion reporting.

Register the custom dimensions (so the extra detail Smart Wishlist sends becomes usable in reports):

  1. In GA4: Admin → Custom definitions → Custom dimensions → Create custom dimension.
  2. Create an Event-scoped dimension for each of the following:
Dimension name (your choice)Event parameterWhat it tells you
Wishlist Button Typesw_button_typeWhere the action happened (product page, collection, wishlist page, etc.)
Wishlist Typesw_wishlist_typeWhether it was an express or account wishlist
Wishlist Bulksw_bulkWhether the event covered multiple items at once (e.g. “Add all”)
Wishlist Item Countsw_item_countHow many items a bulk action covered

Custom dimensions only start collecting data from the moment you create them — they are not retroactive. Set them up early.


Frequently asked questions

I enabled it but I don’t see any events in GA4. Work through these in order: (1) Confirm GTM is installed on your storefront and contains a GA4 configuration tag. (2) Confirm you are not relying solely on Shopify’s native GA4 connector — this integration needs GTM. (3) Use GA4 DebugView (above) to check whether events are arriving. (4) Remember standard reports can take 24–48 hours to populate even when DebugView shows events immediately.

remove_from_wishlist isn’t in my reports, but add_to_wishlist is. That’s expected. add_to_wishlist is a standard GA4 event and reports on it automatically. remove_from_wishlist is custom — it’s being collected, but you need to build a report/exploration around it (and ideally register its dimensions). See Registering custom events below.

Will this double-count my Add to Cart numbers? No. The wishlist cart event is named wishlist_add_to_cart, which is separate from GA4’s standard add_to_cart. Your existing cart funnel is unaffected.

Does this work for both guest and logged-in wishlists? Yes. Express (guest) and account (logged-in) wishlists both fire the events. The sw_wishlist_type parameter distinguishes them.

A shopper added several items at once with “Add all to cart” — how is that reported? As a single event carrying all the items, marked with sw_bulk: true and an sw_item_count. If the items use different currencies, one event is sent per currency.

Is shopper personal data sent to GA4? The events carry product information (id, name, price, etc.) and, for logged-in customers, the Shopify customer ID as user_id for cross-device measurement. No names, emails, or payment details are sent. Ensure your analytics setup and privacy policy reflect your use of GA4.


For developers

This section documents the technical behavior for those configuring GTM tags or debugging the integration.

How it works

Smart Wishlist loads a companion script (smartwishlist-ga4.js) that exposes the integration. Configuration is delivered to the storefront as a window.SW_CONFIG object:

window.SW_CONFIG = {
  version: 1,
  ga4: {
    enabled: true,            // master: add_to_wishlist + remove_from_wishlist
    addToCartEnabled: false   // wishlist_add_to_cart
  }
};

When an event fires, the script clears the previous ecommerce object and pushes the new event, following GA4’s dataLayer convention:

window.dataLayer.push({ ecommerce: null });
window.dataLayer.push({ /* event payload */ });

Event payloads

add_to_wishlist (standard) — also representative of remove_from_wishlist:

{
  event: "add_to_wishlist",
  user_id: "7891234567890",        // present only when the customer is logged in
  sw_button_type: "collection",    // product | collection | search | cart | related | wishlist_page | others
  sw_wishlist_type: "express",     // express | account
  ecommerce: {
    currency: "INR",
    value: 50.00,
    items: [{
      item_id: "4564638826577",
      item_variant: "32098272903249",
      item_name: "ADIDAS | CLASSIC BACKPACK",
      item_brand: "ADIDAS",
      item_category: "ACCESSORIES",
      price: 50.00,
      quantity: 1
    }]
  }
}

wishlist_add_to_cart (custom) — single item is shown; bulk adds carry multiple items plus sw_bulk and sw_item_count:

{
  event: "wishlist_add_to_cart",
  user_id: "7891234567890",
  sw_button_type: "wishlist_page",
  sw_wishlist_type: "account",
  sw_bulk: true,                   // present only for multi-item actions
  sw_item_count: 5,                // present only for multi-item actions
  ecommerce: {
    currency: "INR",
    value: 315.00,                 // sum of item prices in this currency group
    items: [ /* one or more items, same shape as above */ ]
  }
}

Parameter reference

ParameterTypeNotes
eventstringadd_to_wishlist, remove_from_wishlist, or wishlist_add_to_cart
user_idstringOmitted entirely when the shopper is not logged in (not sent as null/0)
sw_button_typestringOrigin of the action
sw_wishlist_typestringexpress or account
sw_bulkbooleanPresent only on multi-item events
sw_item_countnumberPresent only on multi-item events
sw_debug_partialbooleanPresent when product detail couldn’t be fetched in time; the event still fires with item_id and item_variant only
ecommerce.currencystringISO currency code; omitted on partial events
ecommerce.valuenumberTotal value for the event’s items; omitted on partial events
ecommerce.items[]arrayStandard GA4 item objects

About sw_debug_partial: to enrich storefront events, the script fetches product detail in the background. If that fetch is slow (>1.5s) or fails, the event still fires with the IDs it already has, flagged sw_debug_partial: true. A high rate of these flags indicates a slow product endpoint or connectivity issues worth investigating — it is a data-quality signal, not an error shown to shoppers.

Setting up GTM tags

For each event you want in GA4:

  1. Create a triggerCustom Event trigger, Event name matching the event (e.g. add_to_wishlist). For all three, you can use a regex trigger matching add_to_wishlist|remove_from_wishlist|wishlist_add_to_cart.
  2. Create a GA4 Event tag — set the event name to {{Event}} (the dataLayer event name), and map the ecommerce object. If your container uses GA4’s built-in ecommerce handling, enable Send Ecommerce data and source it from the Data Layer.
  3. Map custom parameters — add sw_button_type, sw_wishlist_type, sw_bulk, sw_item_count as event parameters via dataLayer variables, so they reach GA4 for the custom dimensions described above.

Notes and edge cases

  • Bulk events are split by currency. A single “Add all” or “Clear all” action across mixed-currency items produces one event per currency group, each with its own value and items.
  • Very large bulk actions are chunked. Actions covering more than 100 items are split into multiple events of up to 100 items each (GA4’s per-event item guidance).
  • Add-to-cart-then-remove mode. If your wishlist is configured to remove an item from the wishlist when it’s added to cart, both wishlist_add_to_cart and remove_from_wishlist fire — these are two distinct, accurate facts.
  • Caching. Storefront product detail is cached per browsing session to avoid repeated lookups; this has no effect on event accuracy.

Questions or issues with the integration? Contact Smart Wishlist support.

Leave a Reply

Your email address will not be published. Required fields are marked *