Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 52
  1. #41
    Join Date
    Jun 2011
    Posts
    83
    Plugin Contributions
    0

    Default Re: GA-4 Analytics [Support Thread]

    I'm getting this on a new install of ZC 2.1

    --> PHP Warning: Undefined array key "products_name" in xxxx zc_plugins/GA4/v2.0.1/catalog/includes/classes/observers/ga4AnalyticsObserver.php on line 741.

    I'm going to turn it off.. I see where it's supposed to get it on line 741.. not sure why it is not getting it.

  2. #42
    Join Date
    Jun 2011
    Posts
    83
    Plugin Contributions
    0

    Default Re: GA-4 Analytics [Support Thread]

    Same Problem with GitHub Version
    Last edited by brian70809; 16 Feb 2025 at 01:40 AM. Reason: I was wrong

  3. #43
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,338
    Plugin Contributions
    94

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by brian70809 View Post
    I'm getting this on a new install of ZC 2.1

    --> PHP Warning: Undefined array key "products_name" in xxxx zc_plugins/GA4/v2.0.1/catalog/includes/classes/observers/ga4AnalyticsObserver.php on line 741.

    I'm going to turn it off.. I see where it's supposed to get it on line 741.. not sure why it is not getting it.
    A copy of the full log with the backtrace information would help a lot, since it's the calling path that's introduced the issue.

  4. #44
    Join Date
    Feb 2023
    Posts
    2
    Plugin Contributions
    0

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by lat9 View Post
    A copy of the full log with the backtrace information would help a lot, since it's the calling path that's introduced the issue.
    #0 /zc_plugins/GA4/v2.0.1/catalog/includes/classes/observers/ga4AnalyticsObserver.php(741): zen_debug_error_handler()
    #1 /zc_plugins/GA4/v2.0.1/catalog/includes/classes/observers/ga4AnalyticsObserver.php(238): ga4AnalyticsObserver->getItemInfo()
    #2 /includes/classes/traits/NotifierManager.php(106): ga4AnalyticsObserver->update()
    #3 /includes/templates/wokiee/common/tpl_main_page.php(241): base->notify()
    #4 /index.php(94): require('/home/afiwwe6sf...')
    --> PHP Warning: Undefined array key "products_name" in /zc_plugins/GA4/v2.0.1/catalog/includes/classes/observers/ga4AnalyticsObserver.php on line 741.

  5. #45
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,289
    Plugin Contributions
    125

    Default Re: GA-4 Analytics [Support Thread]

    This bug has already been reported here:

    https://github.com/lat9/ga4-analytics/issues/29
    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.

  6. #46
    Join Date
    Apr 2011
    Posts
    507
    Plugin Contributions
    0

    Default Re: GA-4 Analytics [Support Thread]

    ZC 2.0.1 with GA-4 analytics version 1.2.4

    Not sure if it normal behavior or a bug but when looking the page source of main page, it appears the script is being loaded 2 times. Site is at www.royal-fleur(dot)com for reference

    Code:
    <html dir="ltr" lang="en" prefix="og: https://ogp.me/ns# fb: https://ogp.me/ns/fb# product: https://ogp.me/ns/product#">
      <head>
      <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-JQL28SP4BW"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-JQL28SP4BW');
    </script>
     <meta charset="utf-8">
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-JQL28SP4BW"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-JQL28SP4BW');
    </script>
        <link rel="preload" href="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous" as="script">
        <link rel="preload" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous" as="style">
    Is this normal behavior? If not how can i fix it?

    Would upgrading to the latest version help? I am on ZC 2.0.1 so it may not be compatible.

    Thank you for your time and help

  7. #47
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,445
    Plugin Contributions
    11

    Default Re: GA-4 Analytics [Support Thread]

    You'll need to find which of the Google Tag Manager IDs belongs with the current site and remove the non-current.

    While it probably doesn't affect site performance, Google does not recommend having more than one gtag.

  8. #48
    Join Date
    Feb 2014
    Location
    Germany
    Posts
    289
    Plugin Contributions
    0

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by dbltoe View Post
    You'll need to find which of the Google Tag Manager IDs belongs with the current site and remove the non-current.

    While it probably doesn't affect site performance, Google does not recommend having more than one gtag.
    What Google exactly says is:

    keep the number of tags [...] as lean as possible

    Most browsers will not open more than four to eight HTTP requests to a single domain at a time. If you have a high number of tags on the same domain firing under the same conditions, tags will only fire within this browser limitation.


    https://support.google.com/tagmanage...72488?hl=en-GB
    My business is GDPR compliant Webhosting and other Web Services.
    Beside that I still have a Zen Cart Shop running for Classic Vespa Spare Parts
    Locations in Germany, Spain and Finland. Other worldwide locations on demand

  9. #49
    Join Date
    Apr 2011
    Posts
    507
    Plugin Contributions
    0

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by dbltoe View Post
    You'll need to find which of the Google Tag Manager IDs belongs with the current site and remove the non-current.

    While it probably doesn't affect site performance, Google does not recommend having more than one gtag.
    Quote Originally Posted by Shop Suey View Post
    What Google exactly says is:

    keep the number of tags [...] as lean as possible

    Most browsers will not open more than four to eight HTTP requests to a single domain at a time. If you have a high number of tags on the same domain firing under the same conditions, tags will only fire within this browser limitation.


    https://support.google.com/tagmanage...72488?hl=en-GB

    Thank you both for the prompt assist.

    I am only using the G4-Analytics plug in.

    As you can see in the page source, the gtag id is the same in both location.

    Code:
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-JQL28SP4BW"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-JQL28SP4BW');
    </script>
     <meta charset="utf-8">
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-JQL28SP4BW"></script>
    I made a test ( maybe pointless) but oddly if i change the gtag ID in the G4 Anlytic admin setting, the ID changes in both places.

    I may just uninstall G4-anyltics to see if the script is still loaded. Not sure why the script would be loaded twice on the same page
    Last edited by nicksab; 3 Apr 2025 at 08:42 PM.

  10. #50
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,842
    Plugin Contributions
    11

    Default Re: GA-4 Analytics [Support Thread]

    Quote Originally Posted by nicksab View Post
    Thank you both for the prompt assist.
    ...
    i love your response... although...

    TIS.

    Quote Originally Posted by nicksab View Post
    ...
    Not sure why the script would be loaded twice on the same page
    nick,
    my 1st guess would be that potentially you have the same notifier in 2 places. why you would have that, i do not know.

    i can only assume that @lat9 has tested this module, and that in a normal install, the behavior you are witnessing does not happen.

    given that assumption, i would search your code base for:

    NOTIFY_HTML_HEAD_TAG_START

    that is the notifier that places your tag in the header. if that notifier occurs in 2 places that would explain the behavior.

    your test (hardly pointless) suggests that the code where the tag gets inserted is getting hit twice.

    but you definitely have some sort of issue, that i'm guessing is with your template.

    in any event, that is where i would start.

    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.

 

 
Page 5 of 6 FirstFirst ... 3456 LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 20
    Last Post: 23 Apr 2025, 08:49 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