Skip to main content

[Wishlist] Google Analytics - GA4

Hello, Would it be possible to send the user_ID data to GA4 as it is currently possible with the current Google analytics version (UA) ? Thanks, William

7 comments

  • Duncan from Memberstack
    Duncan from Memberstack Edited

    Hey William 👋

    I would imagine so... 

    To be 1000% transparent I used ChatGPT to write this code 🤣 Can you give it a try for me?

    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 the page. 

    <script>
    window.$memberstackDom.getCurrentMember().then(({ data: member }) => {
      if (member) {
        let id = member.id;

        gtag('config', 'G-DX9XPTGR74', {
          'user_id': id
      });
      }
    });
    </script>

    I've set it up on my end, and I could only run reports on the data after 24 hours. 

    Here's a quick video to show you how to run reports on users with an ID

    1
  • Duncan from Memberstack
    Duncan from Memberstack

    William de Broucker I just cleaned up this thread so it's easy for future readers.

    Can you try the updated code above for me? And watch that video too. This updated code seems to be working for me 🎉

    0
  • William de Broucker
    William de Broucker OP

    Great let me test it :) 

    0
  • William de Broucker
    William de Broucker OP

    I tried with my own Google tag but it doesn't work :'( 

    0
  • Duncan from Memberstack
    Duncan from Memberstack

    It took mine 24 hours to start registering data. 👍 Hopefully that's the case for yours as well

    0
  • Nima S
    Nima S

    Hi guys, does anybody know how to properly integrated Google Analytics tracking (GA4) in a webflow stack powered by Memberstack? Goal is to see website activity of members/users.

    0
  • A J
    A J

    Hey Nima S, just found some good resource for you to get started with integrating GA4 with Webflow.

    Hope this helps.

    0

Please sign in to leave a comment.

Sitemap