Why We Use Order ID as Transaction ID in Google Analytics 4
SlideRule uses Shopify Order IDs (5214812864687) as Google Analytics 4 Transaction IDs instead of Shopify Order Numbers (#21616).
The main reasons why are:
- It's easier to find orders with the order ID.
- You can still search for orders with the order id.
- The order ID is the unique identifier in Shopify's database.
The Shopify Order ID can be found in the URL of an order page in your Shopify store.

To locate a specific order using the order ID, simply copy the transaction ID from GA4, and replace the order ID in any order page URL with the copied transaction ID. This will take you directly to the desired order.
Additionally, the search feature in Shopify works with both the order ID and the order number. Searching for an order ID will still bring up the associated order.

In rare cases, duplicate order numbers can occur in Shopify when importing orders from other sources. However, duplicate order IDs are not possible, as the order ID serves as the unique identifier in Shopify's database.
Using the order ID, you can export data from GA4 to a Google Sheet and create a simple function to generate links to the orders like so:
This is not possible with order numbers.
Adding Order Name as a Custom Dimension
While we send order IDs as the transaction IDs to GA4, we also send the Shopify order name as a custom parameter on purchases. You can add it to your GA4 reporting custom parameters like so:
- Go to your GA4 property
- Click the Admin gear in the bottom left
- Select Custom definitions
- Create customer dimensions
- Enter the below information
Dimension Name = "Order Name"
Scope = "Event"
Description = "The name of the order from Shopify."
Event parameter = "order_name"

