[Skip to main content](#vessel-content)

#   Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view

##

- **[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")**
- [![pvukovic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/76678-pvukovic "View pvukovic's Profile") Topic Author
- [ Offline](/forum/user/76678-pvukovic)

Less More

- Posts: 19
- Thank you received: 3
-
-

3 years 1 month ago -  3 years 1 month ago [\#355459](#355459) by [pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")  *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355459 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")* was created by *[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")*

-- HikaShop version -- : 4.7.5
-- Joomla version -- : 4.3.4
-- PHP version -- : 8.0.27

Hi,

we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)

I have noticed that, when the user is logged in and has something in their cart, the "view_cart" event is fired on every page load. This skews our analytics data by overreporting cart views.

The expected behavior is to see the view_cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.

Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.

Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?

Thank you

Last edit: 3 years 1 month ago by [pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

3 years 1 month ago -  3 years 1 month ago [\#355476](#355476) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355476 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi,

You're not missing anything, and it's not a bug.
We decided to make it like that as it's not really easy to know whether the cart module is displayed on the current page or not, and we didn't know of any downside of over reporting cart views. In what way is that a problem for you ?
If there is a real need, we could look into it to see if there is a way to do it.

Last edit: 3 years 1 month ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")**
- [![pvukovic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/76678-pvukovic "View pvukovic's Profile") Topic Author
- [ Offline](/forum/user/76678-pvukovic)

Less More

- Posts: 19
- Thank you received: 3
-
-

3 years 1 month ago [\#355511](#355511) by [pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")  Replied by *[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355511 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

We are creating a funnel report in Google analytics that shows the conversion rate across checkout steps:

For example:

1. Visit Website (100% users)
2. Add Item (20% users)
3. View Cart (10% users)
4. Begin Checkout (5% users)
5. Purchase (1% users)

The problem is that it appears as if all users who added an item (step 2) also completed step 3, which is incorrect.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

3 years 1 month ago [\#355529](#355529) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355529 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi,

Thanks for your feedback. I've made a new version of the plugin with an extra option for this and support for Joomla 5.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")**
- [![pvukovic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/76678-pvukovic "View pvukovic's Profile") Topic Author
- [ Offline](/forum/user/76678-pvukovic)

Less More

- Posts: 19
- Thank you received: 3
-
-

3 years 1 month ago [\#355574](#355574) by [pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")  Replied by *[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355574 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Thank you,

just tried to install it but I'm getting an error:

Undefined constant "HIKASHOP_J50"
in /home/ws_website/public_html/plugins/system/hikashop_ga4/hikashop_ga4.php:49

Screenshot:
[ prnt.sc/Q0ZDmtuvYiTg](https://prnt.sc/Q0ZDmtuvYiTg)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

3 years 1 month ago [\#355583](#355583) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355583 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi,

Thank you for your feedback. I've made a patch for it. Please update the plugin and try again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")**
- [![pvukovic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/76678-pvukovic "View pvukovic's Profile") Topic Author
- [ Offline](/forum/user/76678-pvukovic)

Less More

- Posts: 19
- Thank you received: 3
-
-

3 years 1 month ago [\#355600](#355600) by [pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")  Replied by *[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355600 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi,

thanks for reacting so quickly.

The installation went fine this time, but the checkout page is showing a warning message when the system is in debug mode:

Warning: Attempt to read property "id" on null in /home/ws_website/public_html/plugins/system/hikashop_ga4/hikashop_ga4.php on line 793

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

3 years 1 month ago [\#355604](#355604) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355604 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi,

Thank you for your feedback. I've made a patch for it. Please update the plugin and try again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")**
- [![pvukovic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/76678-pvukovic "View pvukovic's Profile") Topic Author
- [ Offline](/forum/user/76678-pvukovic)

Less More

- Posts: 19
- Thank you received: 3
-
-

3 years 1 month ago [\#355642](#355642) by [pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")  Replied by *[pvukovic](/forum/user/76678-pvukovic "View pvukovic's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#355642 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Thanks, the warning is gone.

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile")
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

1 year 11 months ago [\#364804](#364804) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#364804 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi , i enanbled Hikashop - Google Analytics 4
and got Call to a member function getCart() on null error while trying to open
checkout page/

How to fix ?

Call Stack
\# Function Location
1 () JROOT/plugins/system/hikashop_ga4/hikashop_ga4.php:992
2 plgSystemHikashop_ga4-&gt;onAfterCheckoutViewDisplay() JROOT/administrator/components/com_hikashop/pluginCompatJ4.php:50
3 hikashopJoomlaPlugin-&gt;__call() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454
4 Joomla\Event\Dispatcher-&gt;dispatch() JROOT/libraries/src/Application/EventAware.php:111
5 Joomla\CMS\Application\WebApplication-&gt;triggerEvent() JROOT/components/com_hikashop/views/checkout/view.html.php:318
6 CheckoutViewCheckout-&gt;displayBlock() JROOT/components/com_hikashop/views/checkout/tmpl/show.php:51
7 include() JROOT/libraries/src/MVC/View/HtmlView.php:416
8 Joomla\CMS\MVC\View\HtmlView-&gt;loadTemplate() JROOT/administrator/components/com_hikashop/helpers/helper.php:2936
9 hikashopView-&gt;loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:204
10 Joomla\CMS\MVC\View\HtmlView-&gt;display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2890
11 hikashopView-&gt;display() JROOT/components/com_hikashop/views/checkout/view.html.php:53
12 CheckoutViewCheckout-&gt;display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
13 Joomla\CMS\MVC\Controller\BaseController-&gt;display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2597
14 hikashopController-&gt;display() JROOT/components/com_hikashop/controllers/checkout.php:66
15 checkoutController-&gt;display() JROOT/components/com_hikashop/controllers/checkout.php:233
16 checkoutController-&gt;show() JROOT/components/com_hikashop/controllers/checkout.php:82
17 checkoutController-&gt;step() JROOT/libraries/src/MVC/Controller/BaseController.php:730
18 Joomla\CMS\MVC\Controller\BaseController-&gt;execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2575
19 hikashopController-&gt;execute() JROOT/components/com_hikashop/hikashop.php:88
20 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
21 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
22 Joomla\CMS\Dispatcher\LegacyComponentDispatcher-&gt;dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
23 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:218
24 Joomla\CMS\Application\SiteApplication-&gt;dispatch() JROOT/libraries/src/Application/SiteApplication.php:261
25 Joomla\CMS\Application\SiteApplication-&gt;doExecute() JROOT/libraries/src/Application/CMSApplication.php:306
26 Joomla\CMS\Application\CMSApplication-&gt;execute() JROOT/includes/app.php:58
27 require_once() JROOT/index.php:32

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

1 year 11 months ago [\#364822](#364822) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#364822 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi,

Thank you for your feedback on this issue.
We've published an new version of the plugin in order to fix this:
[ www.hikashop.com/marketplace/product/108...egration-google.html](https://www.hikashop.com/marketplace/product/108-integration-google.html)
Update the plugin and you should not have the error anymore.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile")
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

1 year 11 months ago [\#364826](#364826) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#364826 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

thank you very much for fast help.
error is gone

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile")
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

1 year 11 months ago [\#364829](#364829) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#364829 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

sorry Nicolas, after update
tag assistant cant find our tag

Google tag: Container ______ not found

also analitics no any

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

1 year 11 months ago [\#364839](#364839) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bug: HikaShop GA 4 Plugin fires "view\_cart" on every page view](/forum/3-bug-report/907056-bug-hikashop-ga-4-plugin-fires-view-cart-on-every-page-view#364839 "-- HikaShop version -- : 4.7.5 -- Joomla version -- : 4.3.4 -- PHP version -- : 8.0.27  Hi,  we're setting up a new Joomla 4 website with the latest version of Hikashop + Hikashop Google Analytics 4 plugin (v. 1.1.1)  I have noticed that, when the user is logged in and has something in their cart, the &quot;view&#95;cart&quot; event is fired on every page load. This skews our analytics data by overreporting cart views.  The expected behavior is to see the view&#95;cart event only when the user actually views their cart, i.e. goes to the cart display page, or goes to a page where a cart module is rendered.  Upon inspecting the plugin code it seems that is indeed only checking whether the cart is empty in order to fire this event or not, and not checking for the current page/module rendering.  Is there something I'm missing or is this a bug? If bug, is there a workaround you can suggest?  Thank you")*

Hi,

Could you provide the URL of the page so that we can look at the situation please ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC85MDcwNTYtYnVnLWhpa2FzaG9wLWdhLTQtcGx1Z2luLWZpcmVzLXZpZXctY2FydC1vbi1ldmVyeS1wYWdlLXZpZXc/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.084 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
