Google Analtyics does not record transactions using measurement protocol

I am trying to send an http request for e-commerce tracking.

I got the response http_code = 200 , but I do not see any event or transaction.

The code:

$fields_string = '';
    $fields = array(
        'v' => 1,
        'tid' => "UA-xxxxxx-1",
        'cid' => $userid,
        't' => 'transaction',
        'ti' => $transaction_id,
        'tr' => $Transaction_revenue,
        'ts' => $Transaction_shipping,
        'tt' => $tax,
        'cu' =>'EUR'
    );

Hit:

V = 1 & m = event & TID = UA-XXXXXX-1 & chid = 555 & UID = 123 & Ti = 21 & TR = 20 & mt = 5 & c = 2 & pa = purchase & ec = order & = Purchase

What could be the problem?

Many thanks.

+4
source share
2 answers

Apparently, I'm not sending a cloud to the transaction because my IP was blocked.

0
source

, . debug collect, . .

https://www.google-analytics.com/debug/collect?v=1&t=event&tid=UA-3731463-1&cid=555&uid=123&ti=21&tr=20&tt=5&ts=2&pa=purchase&ec=Checkout&ea=Purchase

{
  "hitParsingResult": [ {
    "valid": true,
    "parserMessage": [ ],
    "hit": "/debug/collect?v=1\u0026t=event\u0026tid=UA-3731463-1\u0026cid=555\u0026uid=123\u0026ti=21\u0026tr=20\u0026tt=5\u0026ts=2\u0026pa=purchase\u0026ec=Checkout\u0026ea=Purchase"
  } ],
  "parserMessage": [ {
    "messageType": "INFO",
    "description": "Found 1 hit in the request."
  } ]
}

, Tid?

https://www.google-analytics.com/debug/collect?v=1&tid=UA-3731463-1&cid=123&t=transaction&ti=124&tr=1&ts=1&tt=1&cu=EUR

{
  "hitParsingResult": [ {
    "valid": true,
    "parserMessage": [ ],
    "hit": "/debug/collect?v=1\u0026tid=UA-3731463-1\u0026cid=123\u0026t=transaction\u0026ti=124\u0026tr=1\u0026ts=1\u0026tt=1\u0026cu=EUR"
  } ],
  "parserMessage": [ {
    "messageType": "INFO",
    "description": "Found 1 hit in the request."
  } ]
}

- , .

0

Source: https://habr.com/ru/post/1650791/


All Articles