GA4 session duration is 0 (Web Pixels Sandbox)

The session duration in GA4 shows 0 when the Google Tag is integrated via a custom pixel.

We have set up the page_view event like Shopify recommends (setting send_page_view to false in gtag and sending a custom page_view event when page_viewed from the custom pixel is triggered).

Does anybody know how to fix this?

Hi wearebandb,

Thanks for your query.

sometimes placing the script do not work properly. Instead of placing the tracking script consider Google Tag Manager GTM to install Google analytics GA4.

With the help of GTM you can configure the other e-commerce events as well like view items, add to cart, checkout, add payment info, and purchase event.

Copy the measurement code from the data stream, and create a Google tag triggering all pages.

For accurate tracking result consider GTM server side tracking with first party domain.

Feel free to ask if you have any questions.

Thanks