Using first-party data in GA4 for better attribution

Updated on 2024-05-31

Google's user-provided data collection enables your Google Analytics property to receive and process hashed first-party customer data.

note:

This feature is part of an open beta - it is subject to change, and may have no immediate effect on attribution.

This brings benefits similar to Enhanced Conversions for Google Ads:

  • Better user identification using consenting Google signed-in users' data
  • Cross-device attribution - e.g. user visited on Android phone and then purchased using Chrome (logged in)
  • Less reliance on cookies - bypassing 7 day GA cookie limit set by Safari / iOS
  • Demographic / interest reporting based on first-party data

How to track first-party data in GA4

There are 2 steps to track first-party data in Google Analytics 4.

  1. Go to your Littledata account > Google Analytics 4 connection > Tracking customisation tab and check that Send user data to GA4 is turned on

  2. Go to your Google Analytics 4 property > Data collection > turn on User-provided data collection

After completing all the steps, Littledata will send hashed first-party data to your Analytics property.

The data is hashed using the SHA256 algorithm.

How it works?

When you turn on the setting inside your Littledata account, conversion events sent to your Analytics property will be enriched with hashed first-party data.

If the user-provided data collection setting inside your Analytics property is not enabled, the conversion will be processed but the first-party data and user_id will not.

tip:

Turn off both the setting in Littledata and the setting in Google Analytics if you don't want to share customer data with Google.

This is an example of the data we send to Google Analytics:

   "user_id":"7158222333381",
   "user_data":{
      "sha256_email_address":"53b61bf697983d0f07a1e4d6962d81a1b86ccf594d32e9bdfb6ad5e110d48b1c",
      "sha256_phone_number":"f029f7d3dd85b2b7e9b657792d168ab92c48c4363634c59187d5a2dd3279188f",
      "address":{
         "sha256_first_name":"1b99f3740501eaef26b5a0a3958b8fe9e81b822981a414d510b1e5b139348cdf",
         "sha256_last_name":"e75be31f77b4aae647f4e0b4233bb5cf3b67384434b76ed36f6ff723f79ef1ce",
         "sha256_street":"4249a5b864b0f3382e9d29c6fd98065fdea6a0ec263fa691842e7e52787aa3e6",
         "city":"3eef36f440a655f87ec46c3e7e4a61427d3c3549b53c33e34f65fa78ad9ee31d",
         "region":"124e0b7201b0388d7c07f43194b9645d162b77005b66fef7283c689a69ff7c56",
         "postal_code":"92c7d71b95dc6540fc58e891dbe649fe72ae5e93b5f42fd7fbdeefe6cef3e51d",
         "country":"884129b7691d98f541650f9974a034323677ebe4e1c3bd71ebf5d43cdf118acc"
      }
   }