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...
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...
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.
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.
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.