New Shopify Certification now available: Liquid Storefronts for Theme Developers

How to get the UTM parameters associated with the order through rest admin API

謝紹壯
New Member
4 0 0

Hello, community developers.

I have been searching for rest admin API document for a long time, but I haven't found the appropriate interface to get the UTM parameters associated with the order.

How to get the UTM parameters associated with the order through rest admin API?

4.png

Replies 5 (5)
_JB
Shopify Staff
Shopify Staff
836 100 221

Hey @謝紹壯,

The UTM parameters you see in the admin are part of the Order.customerJourney connection, which is currently only exposed through the GraphQL API. Using REST the referring_site field will usually contain the UTM params as well, but the most reliable way to get this info is through the GraphQL object.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Jonathan-HA
Shopify Partner
303 22 94

@_JB Any plans to make this available in the REST Order API (or through another REST endpoint) in the future?

In most cases, parsing the query parameters from the `landing_site` field works fine for our customers but would certainly be nice to be able to retrieve those additional Session Details data.

Co-Founder / Developer at Highview Apps
Our Shopify Apps: EZ Exporter | EZ Inventory | EZ Importer | EZ Notify | EZ Fulfill
Kalen_Jordan
Shopify Partner
158 4 22

Hitting a snag where I see the utm params in the shopify admin but not seeing them over the graphql api. Also the connection is called customerJourneySummary not customerJourney, not sure if maybe there have been changes to the API since this last post.

Screenshot 2023-06-29 at 11.48.57 AM.png

Screenshot 2023-06-29 at 11.49.37 AM.png

  

Kalen Jordan
Platform Advocate
MESA - Shopify Automation You've Love
trueimage
Tourist
5 0 1

Hi JB,

 

Are UTM parameters exposed through REST API now? We are using REST API to fetch order details but no UTM parameters included. So I'm trying to figure out if we are doing something wrong or Shopify does not allow REST API to get UTM parameters.

 

Thank you for your reply.

 

John

alvesbdanilo
Shopify Partner
3 0 2

Aparentemente ainda não está disponível na REST API, infelizmente.

Também procuro solução para isso.