I've a question that really needs your help since I'm not finding too much information in the internet. In a development we use Google Measurement Protocol API to confirm payments or refund orders in Google Analytics. But when we do that the order source in Analytics changes... so all of our orders now have the source "direct" but that isn't true since some come from "Google" or "Facebook".
Do you have any solution to this problem?
Thanks in advance.
Here goes and example of what I'm sending to Measurement Protocol API:
var propertiesObject = {
v: '1',
t: 'event',
tid: googleAnalyticsTrackingId,
cid: '123',
ec: 'Ecommerce',
ea: 'Purchase',
ni: 1,
ti: orderId,
pa: 'purchase',
tr: orderRevenue,
ts: orderShippingCost,
tt: orderTaxCost,
cos: 8
};