1

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 
};

1 Answers1

0

This is most likely because your GA Client ID (cid parameter) is not matching up to the original order, causing attribution problems. It's tricky because the only way to fix this would be to pass this parameter to your back-end and keep it on hand for incidences like this.

Have you tried using the model comparison tool as well? M

JdH
  • 936
  • 6
  • 5
  • The problem is related to this. I've found that GA counts the source from the start page of a session. A session in GA usually takes about 30 minutes. After that the session ends and you cannot change the first source. What we can do is to use the clientID and add a event view to start a new session with the pretended source and then make a transaction. And that transaction will have the desired source. – Bruno Pereira Dec 10 '21 at 15:35