Referral source or campaign for sale

Chris Hinds asked on June 10, 2014 05:41

Hi, is there any way for a specific ecommerce order I can determine the referral source (e.g. facebook) for that visit or the campaign code?. I wan't to build a new dashboard report that summaries sales by either of these then drills down to orders. I've looked around the database and there doesn't seem to be a link between a visit, conversion and order.

Recent Answers

Josef Dvorak answered on August 13, 2014 18:10

Hi Paul,

I have looked into this, and it should be possible for you to get the OrderID - Campaign code relationship from the Activity log, using this query:

SELECT OrderID, ActivityCampaign
  FROM [k8].[dbo].[COM_Order]
  JOIN [k8].[dbo].[OM_Activity] ON OrderID = ActivityItemID
  WHERE OrderSiteID = ActivitySiteID AND ActivityType like 'purchase'

This query will only work with activity monitoring turned on.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.