Home / Solutions / Websites and web apps
Shopify store setup, shipping integration and GA4 purchase tracking
What I hear
Our Shopify store is live but orders are shipped by hand, and our analytics does not match the orders we actually get.
For a Shopify store I mainly do three things: set the store up properly, connect orders to a shipping aggregator so nobody retypes addresses, and wire GA4 ecommerce events so your reports reflect real purchases. The store theme and products are the easy part. The value is in the order flow and the data.
Store setup and checkout
I set up products, variants, collections, taxes and shipping zones according to how you actually sell, then test a real order from add to cart to confirmation email on a phone. Common faults I fix: variants with missing images, shipping rates that do not cover some postcodes, discount codes that stack when they should not, and confirmation emails that omit the order details customers ask about.
Connecting a shipping aggregator
The usual pattern: a new Shopify order triggers a small service, the service sends the order to the aggregator, and the tracking number comes back onto the Shopify order so the customer is notified. I checked what Shiprocket publishes as an example. Its API documentation describes authentication with a token, a courier serviceability lookup, order creation (returning an order and shipment ID), AWB assignment, pickup scheduling and tracking by AWB. Its help article does not mention webhooks, though I saw secondary mentions of them, so I would confirm in the live API reference before depending on one. For any other aggregator I do the same check first.
The edge cases are where the work is: cash on delivery orders, partial fulfilment, address fields that exceed the aggregator’s limits, pincode serviceability failures, cancelled orders after pickup is booked, and tokens that expire and must be refreshed. I build retries and a visible failed-orders list, so a failed sync is never silent.
GA4 ecommerce events
Google’s ecommerce guide defines the events: view_item, add_to_cart, begin_checkout and purchase, each carrying an items array. purchase requires a transaction_id, and value should equal the sum of price times quantity across items, with currency sent alongside. I use the Shopify order ID as transaction_id so a reload cannot count a sale twice.
On Shopify, tracking on checkout and the thank-you page runs through customer events and custom pixels, which execute in a sandbox. Shopify’s own tutorial shows a pixel subscribing to checkout_completed and mapping it to GA4’s purchase. It also notes that some automatic GA4 tracking cannot run in that sandbox, so some events must be sent manually. I verify everything in GA4 DebugView and compare a week of GA4 purchases against Shopify orders.
When an app or no-code tool is the better choice
If you ship a few orders a day with one courier, the aggregator’s own Shopify app may be enough. If you sell through one ad channel only, that channel’s native integration may cover tracking. I build custom when the apps do not handle your cases or the monthly app fees add up.
What I need from you
- Staff access to the store, and the GA4 property.
- An API user for the shipping aggregator, created by you, and sample orders including COD and a return.
- Your rules for shipping rates, packaging weights and which orders ship from where.
I test on a development store or with test orders, then enable it on the live store and watch the first real orders with you. Fixed price up front, optional monthly maintenance after.
Sources
- Shiprocket API helpsheet: https://support.shiprocket.in/support/solutions/articles/43000337456-shiprocket-api-document-helpsheet
- Google Analytics, Measure ecommerce: https://developers.google.com/analytics/devguides/collection/ga4/ecommerce
- Shopify Help Center, custom pixels and Google Tag Manager: https://help.shopify.com/cs/manual/promoting-marketing/pixels/custom-pixels/gtm-tutorial
What it replaces
copying orders into a courier panel by hand, and guessing which ads or pages produce sales
How pricing works
One fixed price, agreed before I start. Optional monthly maintenance after handover.