D
D
danyfir2018-08-11 15:13:29
PHP
danyfir, 2018-08-11 15:13:29

How to set target in i.metric in handler?

There is a php file that my payment system calls to update the payment status on the site.
I want to somehow track when the payment status from "Waiting" goes to "Paid" Site on wordpress
+ woocommerce + RFI bank
The page won't load and the script won't work.

if ($order->status == 'completed'){
   echo "<script type='text/javascript'>
  window.onload = function() {
    yaCounter44879842.reachGoal('paysucces');
  }
</script>";
      exit;
    }

It was possible to capture the goal when the client returns to the store on the "Payment went through" page, but not all customers click "Return to the store page" and the statistics will not be accurate...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex-1917, 2018-08-11
@alex-1917

In PHP, have such requests been banned:
POST https://api-metrika.yandex.ru/management/v1/counte...
Turn on CURl and go!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question