UTM Parameters for each order from Shopify GraphQL is not matching with front-end report

UTM Parameters for each order from Shopify GraphQL is not matching with front-end report

MapleMonk
Shopify Partner
2 0 3

Hi, we are trying to get the UTM_Campaign_Source for each order through GraphQL as it is not available through Rest API. However, while trying the below GraphQL with the below code, there are many orders (~20% orders in one day sample) where the UTM Source is 'null' in the response of GraphQL but has a non-null Source in the front-end custom report. Can you please help us understand if we are missing something or if there is any other field that matches the front-end report UTM Source that Shopify provides.

Update - We were identifying if there is any pattern to the nulls and we think the orders which have only 1 session before conversion are not having UTM parameter in GraphQL response.

{
  orders(first: 100, query: "created_at:2023-02-28") {
    nodes {
      customerJourney {
        lastVisit {
          utmParameters {
            campaign
            content
            source
            medium
            term
          }
        }
      }
      name
      createdAt
      customerJourneySummary {
        lastVisit {
          utmParameters {
            campaign
            content
            medium
            term
            source
          }
          source
        }
        moments {
          edges {
            node {
              ... on CustomerVisit {
                id
                utmParameters {
                  campaign
                  content
                  medium
                  term
                  source
                }
              }
            }
          }
        }
      }
      id
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

  

Comprehensive Analytics and Reporting Automation Platform
Replies 0 (0)