Page 1 of 2 12 LastLast
Results 1 to 10 of 37

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,914
    Plugin Contributions
    89

    Default GA-4 Analytics [Support Thread]

    Re-creating the support thread, since the original one "went missing".

    The GA-4 Analytics plugin (available at https://www.zen-cart.com/downloads.php?do=file&id=2368) can be used on Zen Cart sites using 1.5.6b through 1.5.8 without issue. For 1.5.6b installations (or non-standard/older templates), be sure to read the readme since there are a couple of notifications that must be added to template files for the GA-4 Analytics' observer class to do its thing.

    Other than that, no core file overwrites, just a couple of configuration settings in your admin.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,020
    Plugin Contributions
    124

    Default Re: GA-4 Analytics [Support Thread]

    Small problem on account history info page; issue created in Github wi/log.
    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.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,020
    Plugin Contributions
    124

    Default Re: GA-4 Analytics [Support Thread]

    Users of older GA plugins may wish to delete the entry under Admin > Configuration for Universal Analytics. For Simple GA it can be done by removing

    admin/includes/extra_datafiles/google_analytics_database_names.php
    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.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,914
    Plugin Contributions
    89

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by swguy View Post
    Users of older GA plugins may wish to delete the entry under Admin > Configuration for Universal Analytics. For Simple GA it can be done by removing

    admin/includes/extra_datafiles/google_analytics_database_names.php
    Thanks, @swguy. I'll add this to the plugin's documentation.

  5. #5
    Join Date
    Jul 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: GA-4 Analytics [Support Thread]

    Hi,

    I have just yesterday installed ZC 1.5.8a and GA4.
    I have found many DEBUG files in log directory.

    All errors are this form:
    [29-Mar-2023 16:22:41 UTC] Request URI: /index.php?main_page=product_reviews_write&products_id=11, IP address: 65.108.2.171, Language id CZK
    #0 /pub/amforawa/vialux.cz/web/www/includes/classes/observers/class.ga4_analytics.php(79): zen_debug_error_handler()
    #1 /pub/amforawa/vialux.cz/web/www/includes/autoload_func.php(47): ga4_analytics->__construct()
    #2 /pub/amforawa/vialux.cz/web/www/includes/application_top.php(237): require('...')
    #3 /pub/amforawa/vialux.cz/web/www/index.php(25): require('...')
    --> PHP Warning: Undefined array key "currency" in /pub/amforawa/vialux.cz/web/www/includes/classes/observers/class.ga4_analytics.php on line 79.

    on the row 79 in the ga4_analytics.php is this code:

    $this->currency_decimal_places = $currencies->currencies[$_SESSION['currency']]['decimal_places'];

    I find this code right, but understand what is wrong.
    $_SESSION['currency'] is "CZK" and the decimal_places is ind the DB set to 2.
    when I change the row 79 to this, it will works

    $this->currency_decimal_places = 2;

    so the problem is in the class Currencies, but I don't understav why.

    can you help me?
    than k you Dalibor

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,020
    Plugin Contributions
    124

    Default Re: GA-4 Analytics [Support Thread]

    I have also seen this on one site (but not others). My workaround was to force-set that variable.
    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.

  7. #7
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,741
    Plugin Contributions
    11

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by Borek View Post
    Hi,

    I have just yesterday installed ZC 1.5.8a and GA4.
    I have found many DEBUG files in log directory.

    All errors are this form:
    [29-Mar-2023 16:22:41 UTC] Request URI: /index.php?main_page=product_reviews_write&products_id=11, IP address: 65.108.2.171, Language id CZK
    #0 /pub/amforawa/vialux.cz/web/www/includes/classes/observers/class.ga4_analytics.php(79): zen_debug_error_handler()
    #1 /pub/amforawa/vialux.cz/web/www/includes/autoload_func.php(47): ga4_analytics->__construct()
    #2 /pub/amforawa/vialux.cz/web/www/includes/application_top.php(237): require('...')
    #3 /pub/amforawa/vialux.cz/web/www/index.php(25): require('...')
    --> PHP Warning: Undefined array key "currency" in /pub/amforawa/vialux.cz/web/www/includes/classes/observers/class.ga4_analytics.php on line 79.

    on the row 79 in the ga4_analytics.php is this code:

    $this->currency_decimal_places = $currencies->currencies[$_SESSION['currency']]['decimal_places'];

    I find this code right, but understand what is wrong.
    $_SESSION['currency'] is "CZK" and the decimal_places is ind the DB set to 2.
    when I change the row 79 to this, it will works

    $this->currency_decimal_places = 2;

    so the problem is in the class Currencies, but I don't understav why.

    can you help me?
    than k you Dalibor
    i disagree. i think the problem is with your $_SESSION['currency'] var. the error is saying that array value is not set.

    if one looks at when the currencies get set, it is at load point 120.

    the ga-4 analytics code gets set at load point 90.

    the ga-4 analytics needs to be loaded AFTER the currencies get loaded in order that the currency value of the SESSION array is available.

    best.
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,914
    Plugin Contributions
    89

    Default Re: GA-4 Analytics [Support Thread]

    Agreed, @carlwhat, GitHub issue opened: https://github.com/lat9/ga4-analytics/issues/13

    The issue can be corrected via edit to /includes/auto_loaders/config.ga4_analytics.php, changing this section
    Code:
    $autoLoadConfig[90][] = [
        'autoType' => 'class',
        'loadFile' => 'observers/class.ga4_analytics.php'
    ];
    $autoLoadConfig[90][] = [
        'autoType' => 'classInstantiate',
        'className' => 'ga4_analytics',
        'objectName' => 'ga4_analytics'
    ];
    to read
    Code:
    $autoLoadConfig[120][] = [
        'autoType' => 'class',
        'loadFile' => 'observers/class.ga4_analytics.php'
    ];
    $autoLoadConfig[120][] = [
        'autoType' => 'classInstantiate',
        'className' => 'ga4_analytics',
        'objectName' => 'ga4_analytics'
    ];

  9. #9

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by lat9 View Post
    Re-creating the support thread, since the original one "went missing".

    The GA-4 Analytics plugin (available at https://www.zen-cart.com/downloads.php?do=file&id=2368) can be used on Zen Cart sites using 1.5.6b through 1.5.8 without issue. For 1.5.6b installations (or non-standard/older templates), be sure to read the readme since there are a couple of notifications that must be added to template files for the GA-4 Analytics' observer class to do its thing.

    Other than that, no core file overwrites, just a couple of configuration settings in your admin.
    I reviewed the readme.html but it doesn't mention older versions. How does one install this on 1.5.5f?
    Case Badges by Techiant

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,914
    Plugin Contributions
    89

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by Techiant View Post
    I reviewed the readme.html but it doesn't mention older versions. How does one install this on 1.5.5f?
    One doesn't! The plugin supports zc156 and later.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  2. Easy Google Analytics - Support
    By kamion in forum All Other Contributions/Addons
    Replies: 41
    Last Post: 17 Nov 2022, 03:18 PM
  3. Simple Google Analytics - Support
    By cuda in forum All Other Contributions/Addons
    Replies: 2160
    Last Post: 22 Dec 2020, 05:38 AM
  4. v156 PWA, Offline support Push notifications addon [Support Thread]
    By perfumbg in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 May 2019, 02:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR