V
V
Vladimir2017-10-17 12:01:28
PHP
Vladimir, 2017-10-17 12:01:28

How to implement fixation of payment or return of an order using the Measurement Protocol?

Good afternoon.
Help with implementation in php.
It is necessary to send a request to Google Analytics for payment or return of the order upon triggering a certain event (clicking on a button, for example). Transactions have already been created, all products, prices and other necessary information are already present. You need to send 2 events: payment passed or a refund occurred. If the return is more or less clear ( Purchase tracking ), then payment is a problem. I have never worked with Google analytics before and I don’t know if there is such an opportunity at all. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2017-10-17
@dimonchik2013

https://github.com/theiconic/php-ga-measurement-pr...
https://stackoverflow.com/questions/22732392/googl...
mudd.com/blog/google-analytics-measurement-protoco. ..
but it's better to deal directly with Google,
the main idea is to form a request with fields and POST it to the GA url, the answer is usually 200 if the data passed ok, or not 200 if the data did not pass the
correctness of the data GA does not check, everything is on your side

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question