Get order's referring site details

Highlighted
Shopify Partner
660 0 120

For a given order, is there a way to get the referrer information?

I can see in the order api docs that there is a field 'referring site', but I would also like to access the data this is available when going to the reports section (see screenshot below). Source, Host, Path, Url, Name...

Similary, can we access the marketing campaign details? (also available from the reports section).

It seems that shopify already has that information, so why not expose it? Or alternatively, is there a way to derive all those fields from the referring site url already given? Host and Path would be easy enough but other fields are not that straight forward...

Thanks

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
531 0 97

Hi Clement,

You can inspect the landing_site property of an Order resource to obtain this information.

Cheers,

Jamie

0 Likes
Highlighted
Shopify Partner
660 0 120

I'm aware of landing_site but this is not what I'm after. landing_site is the landing page url on the shop.

I'm after the referrer's details.

I just realized I didn't attached the screenshop in the original post.

Here it is, showing the fields I'm after...

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
40 0 11

Hi Clement,

 

When these exist for a given order, they are part of the landing site. They reference their corresponding utm_* paramters on the URL. So, for instance if the landing site is http://www.example.com?utm_source=email, then source=email would be seen in that report.

Of course, since not all orders have this kind of tacking information this won't exist for all orders.

 

Dominique

0 Likes
Highlighted
Shopify Partner
660 0 120

Hmmm are you sure you're not getting confused with the marketing campaign fields? (See attached image).

The referrer pertains to the source site, not the destination.

I know what all those fields mean. My question is, how can I access those programmatically with the API.

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
40 0 11

Ah, yes, I was under the impression you were asking about the marketing fields. I'm not familiar with the traffic fields, but perhaps this is what you're looking for? Our analytics API allows you to query some of our reports data, and I believe detailed referrer information is there.

https://help.shopify.com/api/reference/shopify-ql/visits

Dominique

0 Likes
Highlighted
Shopify Partner
660 0 120

Oh yes I'm aware of the Analytics api. The problem is that, as far as I know, it can't be used from an app server. It's only usable in the browser right? I wonder if I could use phantomjs or something like that to pull the data...

0 Likes
Highlighted
Tourist
3 0 1

Any luck here Clement? I'm after the same thing

0 Likes