Shopify Integration
The Shopify integration pulls order, sales, and customer data from your Shopify store into AgencyAnalytics so you can report on e-commerce performance alongside your other marketing metrics.
Once connected, you can build widgets using Shopify's orders and sales data, apply filters to control how the data is calculated, and track metrics such as gross sales, net sales, refunds, and order counts.
Before You Start
Before connecting Shopify to AgencyAnalytics, make sure you have the following in place:
Access to the Orders, Customers, and Products options in your Shopify store
You are logged into your AgencyAnalytics account before making the connection
You are logged into the Shopify App Store as the store you want to connect
If these conditions aren't met, you may see a validation error or another connection issue when you try to connect.
Connect Shopify
Follow these steps to connect your Shopify store to AgencyAnalytics.
Step 1: Make sure you're logged in to your AgencyAnalytics account and to the Shopify App Store for the store you want to connect.
Step 2: Visit the Shopify App Store listing for AgencyAnalytics.
Step 3: In the upper right of the app store page, click Add app. This redirects you to the installation page.
On larger screens, the Add app button may appear to the left, below the AgencyAnalytics header, instead.
Step 4: On the installation page, review the privacy details and click Install app in the upper right. The page loads momentarily, then redirects you to AgencyAnalytics.
Step 5: From the dropdown in AgencyAnalytics, select the Client where you want to connect to Shopify.
Step 6: Click Connect to finish integrating.
Reconnecting Shopify clears your previous results and restarts the data sync, causing another 6+ day delay while data loads.
If you're seeing data discrepancies, the best course of action is to wait for the full sync to finish, since most discrepancies resolve once all Shopify data has loaded.
It can take up to 6 days for Shopify to deliver all your data; this timeline depends on Shopify's API response and the amount of data in your account.
Shopify Filters
Shopify widgets in AgencyAnalytics support several filters that control how sales and order data are calculated. Understanding each filter helps you get an accurate analysis.
Channels Filter: Narrows data by order or sales source. Select specific channels or leave it on the default "All"
Include Adjustments: Determines whether to include adjustment-related data. At the order level, it includes high-level adjustment details. At the sale level, it breaks down adjustments further
Include External Events: Includes orders and sales linked to events outside the date range, relevant because of associated events within the range
Include Refunds: Decides whether to include refund-related data. At the order level, it summarizes refund information. At the sale level, it details various refund types
Include Voided Orders: Similar to refunds, this filter involves voided order-related data
Record Keeping: Changes the date-filtering methodology and context. Choose from preset options or a custom "By Date Filter"
Record Keeping Date Filter: Applies when using the "By Date Filter" option. It specifies which column to use alongside the Record Keeping filter
Use Adjusted Totals: Affects calculation results. "Yes" shows current adjusted values. "No" preserves original values, excluding adjustments
Record Keeping Date Context
The Record Keeping filter's context depends on the option you choose:
By Order Date: Filters based on the original order date, and includes edits, adjustments, and refunds for orders in the range
By Refund Date: Similar to order date, but includes refunds occurring during the period
By Adjustment Date: Incorporates adjustments to orders within the date range
By Event Date: Filters by event date, encompassing orders, refunds, adjustments, and other events
By Date Filter: Isolates specific events using a designated date column without extra conditions
Shopify Metrics and Definitions
The following metrics are supported by the Shopify integration and can be used when building widgets.
Order Summary and Counts
These metrics are affected by filter settings and have variations.
Date: Date associated with analytics (based on filter)
Channel: Channel associated with the order
Referrer: Referral source associated with the order
Total Orders: Number of total Shopify orders (including voided, authorized, paid, and refunded)
Refunded Orders: Number of Shopify orders less the number of refunded orders (excluding external refunds)
Voided Orders: Number of Shopify orders voided
Net Orders: Number of Shopify orders less the number of refunded and voided orders (excluding external refunds)
Adjusted Orders: Number of Shopify orders manually adjusted in price
Edited Orders: Number of Shopify orders edited
Average Order Value: Average value of unadjusted Shopify orders
Refunds: Number of total Shopify refunds processed (includes partial and full refunds)
Refunds (External): Number of Shopify refunds processed from orders outside the selected date range (includes partial and full refunds)
Refunds (Internal): Number of Shopify refunds processed from orders inside the selected date range (includes partial and full refunds)
Core Metrics
These metrics are affected by filter settings and have variations.
Gross Sales: Sum of Shopify gross sales before discounts, excluding refunds
Order Discounts: Sum of Shopify order-level discounts applied
Total Discounts: The total discounts on Shopify orders
Subtotal Sales: Sum of Shopify subtotal sales before taxes (Gross sales + Discounts)
Net Sales: Sum of Shopify net sales before taxes (Gross sales + Discounts + Refunds)
Total Taxes: Sum of Shopify taxes charged
Gross Sales (Including Tax): Sum of Shopify gross sales before discounts, excluding refunds, with taxes included
Subtotal Sales (Including Tax): Sum of Shopify subtotal sales including taxes (Gross sales + Discounts + Taxes)
Net Sales (Including Tax): Sum of Shopify net sales including taxes (Gross sales + Discounts + Refunds + Taxes)
Shipping Charges: Sum of Shopify shipping charges before discounts and refunds
Shipping Discounts: Sum of Shopify shipping discounts applied
Total Shipping: Sum of Shopify shipping charges excluding refunds (Shipping Charges + Shipping Discounts)
Total Duties: Sum of Shopify duties applied, excluding returns
Total Sales: Sum of Shopify total sales (Gross sales + Discounts + Shipping + Taxes + Duties)
Additional Fees: The sum of additional fees on Shopify orders
Original Sales: Sum of Shopify original sales at time of order
Original Duties: Sum of Shopify original duties applied at time of order
Original Shipping: Sum of Shopify original shipping charges at time of order
Total Refunds: The total refunded sales amount on Shopify orders from both external and internal refunds
Refunded Sales (External): The total external refund amount from Shopify orders outside the selected date range
Refunded Sales (Internal): The total internal refund amount from Shopify orders inside the selected date range
Voided Sales: The adjustments made due to Shopify orders being voided
Manual Sales Adjustments: Sum of Shopify charges manually adjusted
Total Sales Adjustments: The total adjustments, refunds, and voided sales made on Shopify orders
Tax Adjustments: Sum of Shopify taxes refunded and/or adjusted
Shipping Adjustments: Sum of Shopify shipping charges refunded and/or adjusted
Duty Adjustments: Sum of Shopify duty charges refunded and/or adjusted (excludes external refunds)
Discount Adjustments: Sum of Shopify discounts refunded and/or adjusted (excludes external refunds)
Subtotal Adjustments: Sum of adjustments to subtotals (includes external refunds)
Net Adjustments: Sum of adjustments to net sales (includes external refunds)
Attributes (Order Table)
Date Created: Date the order was created in Shopify
Date Processed: Date the order was processed by Shopify, which can differ from the creation date
Date Updated: Date the order was last modified
Date Refunded: Date the refund was processed by Shopify, which can differ from the creation date
Date Canceled: Date the order was canceled in Shopify
Customer: Customer name associated with the order
Referrer: Referral source associated with the order
Channel: Channel associated with the order
Order ID: Unique ID associated with the order and/or associated refunds and adjustments
Payment Status: Display status of the order payment (may not reflect all states of a transaction)
Taxes Included?: Whether taxes were included in the original purchase price
Transaction Type: Type of the order line transaction
First-Time Customer?: Whether the customer is a first-time buyer
Order Edited: Whether the order has been edited since it was created
External Refund?: Whether the refund came from an order beyond the selected date range
Manually Adjusted?: Whether the order was manually adjusted
FAQ
Do we pull Shopify data in real time?
No. Shopify data updates periodically, about twice daily, rather than in real time.
What is the difference between the Shopify Orders and Sales asset types?
Shopify has different reports and ways to review analytics, and they are plan-specific, so they're not always available to all Shopify users. Order reports offer a high-level view, while Sales reports offer a more intricate view. These two report types can sometimes yield different results when compared across dates. The difference comes from how each report interprets the event date.
Does the AgencyAnalytics timezone setting need to match the store's timezone?
Yes. Mismatched time zones can cause data discrepancies. Once you change the timezone setting in the Shopify integration to match your store's native timezone, the change should take effect immediately on existing datasets.
Where can I see the latest sync date and time for my Shopify data?
Look for the clock icon with an arrow around it, displayed to the left of the date range selector within the Shopify integration. This icon shows the approximate number of hours since the last sync. Hover over it to view a tooltip with the exact date and time Shopify data was last synced for your Client.
Why don't my Shopify sales and refunds match what I see in my Shopify account?
Refunds can cause discrepancies in the Total Sales metric because of how Shopify displays refunds on its native platform versus how it feeds that data to AgencyAnalytics via the API. For example, on the native Shopify platform, refunds are applied to the order date. If an order was placed on January 15th but refunded on March 15th, the refund appears on the Shopify dashboard as of January 15th. When Shopify sends data through its API, refunds are applied on the date they're given. So the same order refunded on March 15th shows the refund as March 15th in AgencyAnalytics. Since Shopify isn't consistent in refund dates between its platform and API, AgencyAnalytics won't exactly match what you see on the native platform until Shopify updates its API.
Why am I seeing discrepancies between my Total Returns and Total Sales metrics?
Small discrepancies can exist between these metrics due to a known limitation in how refunds are applied in the Shopify API (which AgencyAnalytics uses) compared to Shopify's native platform data.
Why am I seeing discrepancies with my Order Count or Orders Total metrics?
Shopify lets users edit orders after they've been placed, like changing or adding/removing an item. If an order is edited after the day it was placed, it appears as a separate order in several Shopify native reports. This can lead to discrepancies, since the Shopify integration may show a different order count or orders total depending on when and how orders were edited. Shopify sometimes displays information differently to third parties via its API than it does on its native platform UI.
How do I match the way Shopify organizes data on its native platform?
Apply these two filters when setting up your Shopify widgets:
Record Keeping: Set to "By Order Date". This organizes data by the date the order was placed, matching Shopify's native behavior
Record Keeping Date Filter: Set to "Date Ordered". This filters data based on the date orders were placed, rather than when they were processed or created via the API
How are gift card purchases treated?
AgencyAnalytics treats gift card sales as part of total sales. In some parts of Shopify, gift card sales aren't tracked and are excluded. At this time, AgencyAnalytics does not exclude gift cards from the datasets it pulls.
Why am I seeing "Error code 400: Could not authorize callback" when connecting Shopify?
This error usually means you weren't logged into AgencyAnalytics when you tried to connect from the Shopify App Store. Before connecting, make sure you:
Are logged into your AgencyAnalytics account
Are logged into the Shopify App Store as the store you want to connect to
Once you're logged into both, try the connection again.
💬 Need additional help?
If you have any questions, please contact our friendly support team by following these instructions! We're available 24/5 to help 😄




