Skip to main content
Contributor ⭐️⭐️⭐️
Feb 2, 2024 8:14 PM UTC
Solved

User-ID feature from GA4

Does anyone uses the User-ID feature from GA4 to better track Gainsight users? Can someone guide me on how to configure it?

olimarrio
olimarrioAnswer
Gainsight Employee ⭐️
Feb 14, 2024 9:57 AM UTC

Hi @VarshaAhir 👋,

You could either:

  1. Use the inSidedData object to obtain the user ID of the logged in user and then this could be used as a unique ID.
  2. As the inSidedData object does not contain the email address (only has the user ID) then you could perhaps maybe capture the email address when the user logs in and then set it as a cookie value (so that it can be loaded on every community page afterwards).

Both would require custom JavaScript to be able to achieve this. 

Number 1 would be the most logical and least error prone option but it would require more effort to set up as you’d need to map the User IDs on Gainsight CC to the user in GA4, as documented here:

 

9 replies

Alistair FIeld
Expert ⭐️
Feb 5, 2024 8:48 AM UTC

Morning @VarshaAhir 

This is not something I personally have explored. I will ask around the CS Team if they have any customers doing the like. 

 

Translate
The needs of the many, outweigh the needs of the few. 🖖
Contributor ⭐️⭐️⭐️
Feb 13, 2024 4:39 PM UTC

That would be great @Alistair FIeld. Thank you for looking into it. Let me know if you need any additional info. I look forward to your response.  

Translate
olimarrio
Gainsight Employee ⭐️
olimarrioAnswer
Gainsight Employee ⭐️
Feb 14, 2024 9:57 AM UTC

Hi @VarshaAhir 👋,

You could either:

  1. Use the inSidedData object to obtain the user ID of the logged in user and then this could be used as a unique ID.
  2. As the inSidedData object does not contain the email address (only has the user ID) then you could perhaps maybe capture the email address when the user logs in and then set it as a cookie value (so that it can be loaded on every community page afterwards).

Both would require custom JavaScript to be able to achieve this. 

Number 1 would be the most logical and least error prone option but it would require more effort to set up as you’d need to map the User IDs on Gainsight CC to the user in GA4, as documented here:

 

Translate
Contributor ⭐️⭐️⭐️
Feb 20, 2024 5:57 PM UTC

Thank you for your response @olimarrio, very useful. Can you share the Insided Data Object link as the one you hyperlinked is not available.  

Translate
TomW
Helper ⭐️⭐️
Feb 20, 2024 6:03 PM UTC

@VarshaAhir 

 

Translate
Contributor ⭐️⭐️⭐️
Feb 20, 2024 6:07 PM UTC

@VarshaAhir

 

Thank you @TomW

Translate
olimarrio
Gainsight Employee ⭐️
Gainsight Employee ⭐️
Feb 21, 2024 7:58 AM UTC

Happy this is useful @VarshaAhir and thanks for the assist @TomW ⛹

Translate
Contributor ⭐️⭐️⭐️
Feb 29, 2024 10:05 PM UTC

Follow up question: can GA4 be tracked using Tag Manager? Trying to find the easiest solution since creating custom Javascript is out of my skillset and available resources. Thank you. 

Translate
olimarrio
Gainsight Employee ⭐️
Gainsight Employee ⭐️
Mar 1, 2024 11:33 AM UTC

@VarshaAhir I’m no GA4 expert but I believe you can. I’m wondering if this documentation helps provide what you are looking for?

Translate