This article will show you how to send the user_ID data to GA4.
This assumes you've already added your Google ID in the Webflow integration settings, or to the site header. This code should go at the very bottom of your site's custom code. Before the closing </body> tag is usually best.
<script>
window.$memberstackDom.getCurrentMember().then(({ data: member }) => {
if (member) {
let id = member.id;
gtag('config', 'G-DX9XPTGR74', {
'user_id': id
});
}
});
</script>
It usually takes 24 hours to start registering data.
Here's a quick video to show you how to run reports on users with an ID
Comments
2 comments
Should we be changing "G-DX9XPTGR74" shown in the code snippet to our own UA/GA code?
Thanks!
Yup! Exactly.
Please sign in to leave a comment.