Back to Segment in Excel
SheetXAI logo
Segment logo
Segment · Excel Guide

Bulk-Track Offline Events Into Segment From a Google Sheet

The Scenario

You are a product manager. Your company ran an 800-person trade show last week. Attendees purchased products at the booth, and the event team logged every transaction into an Excel workbook.

Each row in the Offline Purchases tab is one transaction: user ID in column A, event name in column B ("Product Purchased"), item name in column C, SKU in column D, and price in column E.

The monthly attribution report closes Friday at noon. If these events are not in Segment before then, booth purchases are missing from the dashboard. Your head of growth will ask why conversions are down 800 units. You will have to explain that the data is sitting in a workbook on someone's laptop.

The slow version:

  • Write a script to call Segment's track endpoint for each row
  • Handle auth, rate limits, retries
  • Debug why some price values are breaking the JSON serializer
  • Friday noon arrives. The report runs without the booth data.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI reads the workbook and calls Segment's track endpoint per row, so you do not have to write the script.

Open the SheetXAI sidebar and type:

Send a Segment track event for every row in the Offline Purchases tab using user ID from column A, event name from column B, item_name from column C, SKU from column D, and price from column E. Write SENT or ERROR into column F per row.

SheetXAI reads all 800 rows, builds a track payload for each one with the correct properties, calls Segment's API, and writes the result back to column F.

What You Get

800 Segment track events with status in column F:

  • SENT for every row Segment accepted
  • ERROR for any row that failed, with the reason
  • Properties intact — item_name, SKU, and price all land as event properties on the track call

The event name does not have to be the same for every row. If column B has "Product Purchased" for some rows and "Demo Completed" for others, SheetXAI sends the correct event name per row.

What If the Data Is Not Quite Ready

Booth collection workbooks are messy. SheetXAI handles data issues and the track calls in the same prompt.

When some rows are missing prices

Some attendees walked off before the price was recorded.

Send a Segment track event for every row in the Offline Purchases tab. For rows where column E is blank, send the event without a price property rather than sending $0. Use user ID from column A, event name from column B, item_name from column C, and SKU from column D. Write SENT, SENT-NO-PRICE, or ERROR into column F.

When SKUs are inconsistently formatted

Some SKUs have dashes (SKU-1234), some do not (SKU1234).

Normalize all SKU values in column D to include a dash after the "SKU" prefix (e.g., SKU-1234) before sending. Then send a Segment track event for every row using user ID from column A, event name from column B, item_name from column C, normalized SKU from column D, and price from column E. Write SENT or ERROR into column F.

When you want to exclude demo events from the purchase report

The tab has both "Product Purchased" and "Demo Completed" events mixed together.

Filter to rows where column B is "Product Purchased" only. Send a Segment track event for each matching row using user ID from column A, event name from column B, item_name from column C, SKU from column D, and price from column E. Write SENT or ERROR into column F.

When you need deduplication, SKU normalization, and tracking in one pass

The workbook has duplicate rows from two badge scanners, inconsistent SKU formats, and mixed event types.

Deduplicate the Offline Purchases tab by the combination of user ID in column A and SKU in column D, keeping the row with the higher price in column E. Normalize SKU values in column D to include a dash after SKU. Filter to rows where column B is "Product Purchased." Then send a Segment track event for each remaining row using user ID from column A, event name from column B, item_name from column C, normalized SKU from column D, and price from column E. Write SENT or ERROR into column F.

The pattern: the cleanup and the API call happen in the same instruction.

Try It

Get the 7-day free trial of SheetXAI and open any workbook of offline events or purchase records, then ask it to send them to Segment as track calls. The Segment integration is included in every SheetXAI plan. For related workflows, see how to backfill historical events with original timestamps or the Segment in Excel overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more