php-ga-measurement-protocol icon indicating copy to clipboard operation
php-ga-measurement-protocol copied to clipboard

DebugResponse return null and no data send to GA

Open jripmeester opened this issue 4 years ago • 4 comments

Hi,

I've have a weird problem that some orders of our webshop aren't send to GA. I've managed to find out when the data isn't send but then when i try to get the debug response it's null. When an order is sent to GA the response is nicely though. So the sending is failing somewhere butt i can't debug where.

This is my sending line of code $analytics->setProductActionToPurchase(); $response = $analytics->setDebug(true)->setEventCategory('Checkout') ->setEventAction('Purchase')->sendEvent();

Can you point me in the direction to debug this? I can't add var_dumps in the code as the method are not physically in the code.

jripmeester avatar Apr 16 '21 08:04 jripmeester

@jripmeester I have the same issue - it looks like the library doesn't work with GA4 (vide: https://github.com/theiconic/php-ga-measurement-protocol/issues/94).

piotrknapik avatar Apr 21 '21 22:04 piotrknapik

@piotrknapik Except we are not using GA4

jripmeester avatar Apr 22 '21 07:04 jripmeester

@jripmeester I'm also having this issue (with Universal Analytics, not GA4). Did you ever figure out what was wrong?

sblawrie avatar Sep 14 '22 17:09 sblawrie

@sblawrie No i didn't. Ended doing the implementation on JS side.

jripmeester avatar Sep 14 '22 17:09 jripmeester