Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Track a save when the application confirms the item was saved—not merely when someone clicks the button. For exports, keep the request separate from successful completion: an export click or job start shows intent, while a completion event should mean the operation actually finished. Automatic file-download tracking can supplement this setup for ordinary file links, but it may not represent an app-managed export.

Choose the outcome each event should mean

Before adding analytics calls, define what counts as a save and what counts as an export. Events are only useful when their meanings stay consistent across the interface, reports, and application code.

  • Save intent: the user activated a save control. This can help measure button engagement, but it does not prove the save succeeded.
  • Save success: the application received authoritative confirmation that the saved state changed.
  • Export request: the user asked the application to create or deliver an export.
  • Export success: the application confirmed that the export operation finished successfully. This may mean a file was generated or an export job completed; it does not necessarily prove the user opened the file.

Use a stable event taxonomy that reflects those distinctions. For example, emit item_saved after a successful save, item_unsaved after a successful removal, export_requested when an export begins, and export_completed after confirmed completion. These are illustrative custom names, not required names from Google Analytics 4 (GA4).

Decide how repeated actions should count. If a user saves an already-saved item, determine whether that is a new successful action or a no-op. Likewise, decide whether retries create additional export requests, whether a canceled job has its own event, and whether failures should be recorded separately. Write those definitions down so that a dashboard does not silently mix clicks, state changes, retries, and completions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Attach events to confirmed application outcomes

For a save, the reliable trigger is normally the point at which the application has confirmation of the state change—for example, after a successful response from the save operation. For an export, emit a request event when the user initiates the operation, then emit the completion event only when the application can confirm success. A failed or canceled job must not be counted as a completed export.

The implementation below assumes the page already has GA4’s gtag function configured. It sends custom events with contextual parameters. Call the success functions from the corresponding confirmed-success path in your application, rather than directly from the button’s click handler.

function trackItemSaved({ itemId, itemType, method }) {
  gtag('event', 'item_saved', {
    item_id: itemId,
    item_type: itemType,
    interaction_method: method,
    result_status: 'success'
  });
}

function trackExportRequested({ format, itemType, method }) {
  gtag('event', 'export_requested', {
    export_format: format,
    item_type: itemType,
    interaction_method: method
  });
}

function trackExportCompleted({ format, itemType }) {
  gtag('event', 'export_completed', {
    export_format: format,
    item_type: itemType,
    result_status: 'success'
  });
}

function trackExportFailed({ format, itemType, reasonCategory }) {
  gtag('event', 'export_failed', {
    export_format: format,
    item_type: itemType,
    failure_category: reasonCategory
  });
}

Connect these functions to application lifecycle events, not just UI gestures. For example:

async function saveItem(item) {
  const result = await api.saveItem(item);
  if (result.ok) {
    trackItemSaved({
      itemId: item.id,
      itemType: item.type,
      method: 'button'
    });
  }
}

async function exportItems(format) {
  trackExportRequested({
    format,
    itemType: 'report',
    method: 'button'
  });

  try {
    const job = await api.startExport(format);
    const result = await api.waitForExport(job.id);
    if (result.status === 'completed') {
      trackExportCompleted({ format, itemType: 'report' });
    } else {
      trackExportFailed({
        format,
        itemType: 'report',
        reasonCategory: result.status
      });
    }
  } catch (error) {
    trackExportFailed({
      format,
      itemType: 'report',
      reasonCategory: 'request_error'
    });
  }
}

This is an integration pattern, not a drop-in implementation for every API: adapt the success checks to the responses and asynchronous job lifecycle your application actually uses. If an export finishes through a later callback or webhook, send the completion event from the path that can verify that final status. Avoid sending an event from both the browser and server for the same outcome unless you intentionally reconcile duplicates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Logitech G305 Lightspeed Wireless Gaming Mouse - Black
  • The next-generation optical HERO sensor delivers incredible performance and up to 10x the power efficiency over previous generations, with 400 IPS precision and up to 12,000 DPI sensitivity
  • Ultra-fast LIGHTSPEED wireless technology gives you a lag-free gaming experience, delivering incredible responsiveness and reliability with 1 ms report rate for competition-level performance
  • G305 wireless mouse boasts an incredible 250 hours of continuous gameplay on just 1 AA battery; switch to Endurance mode via Logitech G HUB software and extend battery life up to 9 months
  • Wireless does not have to mean heavy, G305 lightweight mouse provides high maneuverability coming in at only 3.4 oz thanks to efficient lightweight mechanical design and ultra-efficient battery usage
  • The durable, compact design with built-in nano receiver storage makes G305 not just a great portable desktop mouse, but also a great laptop travel companion, use with a gaming laptop and play anywhere

Choose useful parameters without leaking data

Parameters help explain what happened: an item type, export format, result status, and interaction method can support useful breakdowns. Use a stable item identifier only if you have a valid product need and your privacy practices permit it. Do not send item contents, private document names, account credentials, or other sensitive values as analytics parameters.

GA4 accepts event parameters as context, but custom parameter values may require corresponding custom dimensions or metrics before they are available in reports. Keep the parameter set deliberate: inconsistent names such as format, file_type, and exportFormat for the same concept make analysis harder.

Use automatic download tracking only for qualifying links

GA4 enhanced measurement can capture common website interactions, including file downloads, when the relevant measurement option is enabled. Amplitude also documents automatic download capture for links whose file extensions match its recognized set. These capabilities can be convenient when an export is a normal link to a file.

They do not establish that every export succeeded. An automatic event triggered by a qualifying link interaction may record a click or link action, rather than confirm that an asynchronous job completed or that a generated file was received. Application-managed exports can instead use a background job, API response, generated browser blob, or in-app state change. For those flows, emit custom events at the lifecycle point that matches the outcome you want to measure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Logitech M185 Compact Ambidextrous Wireless Mouse with Rubber Grips - Blue
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Use the two approaches together when it helps: automatic measurement can cover ordinary file links, while your own events represent successful saves and export lifecycle states. Compare automatic download records with a few real export paths before relying on them for a completion metric.

Configure the events in GA4

Use custom events for product actions

GA4 groups events as automatically collected, enhanced measurement, recommended, or custom. A product-specific save or confirmed export outcome generally needs a custom event if no built-in event represents it. Send it using the Google tag or Google Tag Manager, and keep the meaning of each event stable.

Follow event naming rules

GA4 event names are case-sensitive, must begin with a letter, and can contain letters, numbers, and underscores. Reserved names and prefixes are not allowed. Prefer lowercase names such as item_saved; avoid changing capitalization or spelling between releases, since Item_Saved and item_saved are distinct names.

Make parameters reportable

Sending a parameter does not automatically make every custom value available as a report dimension or metric. Create the corresponding custom dimension or metric when needed for reporting, and use consistent parameter names and values. Validate parameter availability in the GA4 property you are using.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
  • Computer mouse for easily navigating a computer interface; click, scroll, and more
  • USB-A wired connection; if existing device only supports USB-C, an additional adapter will be required
  • High-definition (1000 dpi) optical tracking ensures responsive cursor control for precise tracking and easy text selection
  • 3 buttons offer effortless fingertip control
  • Plug-and-go ready for instant use

Send server-confirmed events when the server owns the outcome

If the browser cannot reliably know that a save or export finished, server-side collection may better represent the result. GA4 Measurement Protocol sends events directly to Analytics and supplements collection through the Google tag, Tag Manager, or Firebase SDK. Web requests use a client_id; app requests use an app_instance_id.

This is an architecture choice, not a requirement to move all event collection to the server. A client event is suitable when the browser receives a trustworthy success response and can emit once. A server event can be appropriate when a background job completes after the user navigates away. Choose a single authoritative success point and account for retries and duplicate delivery; the right implementation depends on your product’s architecture.

Validate saves, failures, retries, and exports

  1. Save successfully: confirm the expected save event appears once and carries the correct item context.
  2. Force a save failure: confirm that no successful-save event is emitted.
  3. Repeat or remove a save: verify that repeat saves and unsaves match your written event definitions.
  4. Complete an export: check that a request and a completion are separate events, and that the completion follows confirmed success.
  5. Fail or cancel an export: verify it is not counted as completed; test any separate failure or cancellation event you chose.
  6. Compare automatic tracking: inspect whether file-download capture matches actual export paths, particularly generated or asynchronous exports.
  7. Inspect received data: use GA4 Realtime or DebugView to check events and parameters. If using Tag Manager, use its preview workflow to validate the configuration before publishing.

Troubleshooting common tracking problems

  • The save event appears when a save fails. The call is probably attached to the click rather than the confirmed-success path. Move it to the response or state transition that proves the save succeeded.
  • There is a download event, but no reliable completion measure. The automatic event may be tracking a qualifying file-link interaction. Add a custom completion event where the export job or file-generation operation reports success.
  • An event is missing from GA4. Confirm that the tag is configured and that the code path runs; check the event name for case differences, invalid characters, or a reserved name or prefix. Inspect Realtime or DebugView and, for Tag Manager, preview the configuration.
  • A custom parameter is sent but absent from reports. Check the received event first, then configure the corresponding custom dimension or metric where required.
  • Success counts are higher than expected. Check for duplicate browser and server emission, retries treated as new outcomes, or a completion callback being handled more than once. Define which attempts count and ensure the authoritative success path emits consistently.
  • Failures appear as successful exports. Make the success condition explicit. Do not infer completion from a click, job-start response, or file-link interaction if the operation can still fail afterward.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server, not a save/export analytics tracker. It can capture a page while you document or inspect the interface around a workflow; it does not replace the application events above. A single cURL request is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Before capture, it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Learn about ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.

Best Value
Sale
Acer Wireless Mouse for Laptop, 2.4GHz Computer Mouse 3 Adjustable 1600 DPI
  • 【Plug and Play for Home/Office/School】The wireless computer mouse features 2.4GHz connectivity, delivering a stable, interference-free connection up to 32ft. Designed for 𝐦𝐞𝐝𝐢𝐮𝐦 𝐭𝐨 𝐥𝐚𝐫𝐠𝐞 𝐬𝐢𝐳𝐞𝐝 𝐡𝐚𝐧𝐝𝐬, it ensures comfortable use all day. Simply plug in the USB-A receiver for instant pairing—no drivers needed. 📌📌 If the mouse isn’t suitable, place the USB receiver in the battery compartment and return both.
  • 【3 Levels Adjustable DPI】This travel USB mouse offers 3 adjustable DPI settings (800, 1200, 1600), allowing you to customize sensitivity for precise design work. Effortlessly switch to match your task and elevate your productivity. 📌 Please remove the film at the bottom of the mouse before use.
  • 【Effortless Browsing】Equipped with forward and backward buttons, this computer mice streamlines your workflow, making it easy to navigate through web pages and files with a simple click. 📌Side button does not work on Mac.
  • 【Visible Indicator Light】 The pc mouse features a visual indicator for DPI levels and low battery alerts. The red light flashes once for 800 DPI, twice for 1200 DPI, and three times for 1600 DPI. When the battery level is below 10%, the light flashes red until the mouse is completely out of power.
  • 【Click to Wake】With smart sleep mode, it saves power by standby after 10 inactive minutes, just 2-3 clicks to wake. This efficient design delivers 3x longer battery life than motion-wake mice. Engineered for durability, its buttons and scroll wheel are tested for 10 million clicks, ensuring long-term reliability and consistent performance.

Frequently Asked Questions

Should a save that was already saved emit another success event?

That depends on the metric: count every accepted user action if measuring usage, or emit only when the stored state changes if measuring new saves. Choose one definition and apply it consistently.

Does an export completion event prove the user downloaded or opened the file?

No. It records the completion condition your application can verify, such as successful file generation. Delivery, receipt, and opening are distinct outcomes and require their own observable signals.

Can I track these events in both the browser and on the server?

You can collect different lifecycle details in both places, but prevent or reconcile duplicate records when both paths report the same event. Pick one authoritative source for each measured outcome.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Product carbon footprint: 3.97 kg CO2e; Contoured shape: Gives you more comfort and control
$14.90
SaleBestseller No. 3
Bestseller No. 4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Computer mouse for easily navigating a computer interface; click, scroll, and more; 3 buttons offer effortless fingertip control
$9.70

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.