Nicely done @carlwhat!
Nicely done @carlwhat!
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Yes, thanks.
There I don't search the problem.
I have set the index as the last one that I have in my config.core.php
have a nice day
Borek
GA4 Analytics v1.2.0 is now available: https://www.zen-cart.com/downloads.php?do=file&id=2368
This release contains corrections for the following GitHub issues:
#11: Correct determination of products' information pages.
#12: Don't include a view_item event for invalid products.
#13: Need to load after currencies are instantiated, corrects PHP warning.
#14: Enable analytics to use either GA4 (gtag.js) or GTM (gtm.js) reporting.
#15: Don't log a PHP Warning if the required notification is missing.
#16: Include user_id for GTM reporting and enable site-specific customizations.
#17: Correct misspelling of item_name parameter for shopping-cart based items.
GA-4 Analytics v1.2.1 is now available for download.
This release contains changes associated with the following GitHub issues:
#18: Correct MySQL error (products_all) when Bootstrap template is in use.
Sorry for the churn, but v1.2.2 is now available for download.
This version corrects unwanted PHP warnings on the featured_products page.
I have installed the GA-4 Analytics update to Zen Cart 1.5.6c however I get an error in the log and Web site doesn't load
PHP Parse error: syntax error, unexpected '?' in /includes/classes/observers/class.ga4_analytics.php on line 309
case FILENAME_SPECIALS:
global $specials, $listing;
$products = $listing ?? $specials ?? []; <<line 309
if (empty($products)) {
break;
}
$_SESSION['ga4_analytics'][] = [
'event' => 'view_item_list',
'parameters' => [
'item_list_name' => GA4_ANALYTICS_SPECIALS,
'items' => $this->getListingItems($products),
]
];
break;
I have put the G- code in the GA4 Analytic admin field.
Any ideas?
You need to update the site to PHP 7.0 at a minimum. The null-coalesce operator (??) wasn't available until that PHP version.
Thought it might be something like that, but don't like updating PHP unless instructed.
Thank you
Updated Php version on server to 7 however I though I would see the change appear on the web site admin under the version menu?
But it still has PHP Version 5.6.40
Does it take a while to filter through?
@GordoTheFlash Check with your hoster. The time varies between "instantaneous" and "you must wait for a migration to another server."
Also, double check after some time has passed because you may be looking at a cached page.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.