Large discrepancy in engagement time between Google and Shopify App and Google Tag Manager custom pixel implementation

Action:

  • Recently, we have migrated from Google and YouTube app to custom pixels which implements the tracking for GA4 via GTM

Issue:

  • Most of the tracking is correct with the exception for engagement time
  • Before, average engagement time is around 50s but now it is all 0

Question:

  • Is this the expected behavior when we add GTM pixels to custom pixels in a sandbox environment?
  • If so, is there any workaround to track user engagement time in GA4 via custom pixel implementation?

User Engagement time should still be calculated when the “custom web pixel” is added to the sand box. It needs the “session_start” event to fire by having the base code on the page. You may want to ensure that the base GA4 code is on the site outside of an event subscription so it is there as soon as possible.

Hi @Boyi_Tan

Just wanted to check if the approach advised above works for you?

Thanks @zamartz @Liam-Shopify

I have been trying to find a solution to this but is not very successful.

  • For the base GA4 code to be on site that is outside of an event subscription, may I know how this can be done please?
  • Another thing for tracking engagement time pertains to tracking user “engaged time”, which Google calculates as the time spent on a page with the page in focus → with Google Tag Manager implementation in custom pixels, can this still be tracked.