V
V
vankivol2017-05-13 12:53:26
PHP
vankivol, 2017-05-13 12:53:26

How to send data to google ecommerce using Cron?

Task: It is necessary to send data from the database about the completed transaction to google analytics (e-commerce) using Cron instead of a page about a successful purchase.
Problem: The script works and sends data to GA if run manually through the browser, but when run through Cron, the sending of the script works, but the data is not sent.
The problem, most likely, is that GA needs some kind of browser emulation in order for the data to be sent.
Is it possible to solve this in Cron'e or in PHP itself? Or maybe there are other solutions?
Cron:

wget -O - http://my-site.com/cron.php > /dev/null 2>&1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-05-13
@ptrvch

Most likely, you need the Measurement Protocol - data can be sent with an http request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question