Double Reporting
-
I had noticed that a few of the websites I manage was having issues double reporting and it seemed to be from people that were revisiting their thank you page across multiple days. I have nailed the issue down to the file “GlobalSiteTag.php” located in the src > Google folder. The issue resides on line 358 and has to do with the strict checking of the returned meta key value. The function “get_meta” will return a string and not an integer in this case because the database for meta values is set as text. To fix this issue, Line 358 – 360 in the file “GlobalSiteTag.php” should change from:
if ( ! $order || 1 === $order->get_meta( self::ORDER_CONVERSION_META_KEY, true ) ) { return; }To:
if ( ! $order || '1' === $order->get_meta( self::ORDER_CONVERSION_META_KEY, true ) ) { return; }To stay consistent, the line 363 should also be changed to a string instead of a integer.
Thank you!
The topic ‘Double Reporting’ is closed to new replies.