Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐞]user_engagement is not working in GA4 #603

Open
ashokvardhan91 opened this issue Jun 19, 2024 · 0 comments
Open

[🐞]user_engagement is not working in GA4 #603

ashokvardhan91 opened this issue Jun 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ashokvardhan91
Copy link

Describe the bug

Currently we are using ga4 with party town , user_enagament and scroll events are not working . below is the code which we are using . please suggest if anythings is missing.

forward: ['dataLayer.push','gtag','gtm.push'] and using a reverse proxy too. and tried using

resolveSendBeaconRequestParameters: function (url, location) {
if (url.hostname.includes('google-analytics') || url.pathname.includes('collect')) {
return {keepalive: false};
}

<script type="text/partytown" nonce="script-GA-87a04770e6"> (function (window, document) { window.global = document; window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); window.gtag = function () { dataLayer.push(arguments); }; window.gtag('js', new Date()); window.gtag('config', 'G-xxxxxx'); var firstScript = document.getElementsByTagName('script')[0]; var gtmScript = document.createElement('script'); gtmScript.async = true; gtmScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-xxxxxxx'; firstScript.parentNode.insertBefore(gtmScript, firstScript); })(window, document); </script>

Reproduction

https://www.stylecraze.com/performance-test/ga-debug.html

Steps to reproduce

When uservisted one page and spent more than 2 seconds then again he visited the other page then user_engagement should fire . but it's not happening.

Browser Info

all

Additional Information

No response

@ashokvardhan91 ashokvardhan91 added the bug Something isn't working label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant