Google Analytics Data API

Enable the Google Analytics Data API (GA4) in the Google Cloud Console.

Search for Google Analytics Data API

Set up a service account in the Google Cloud Console and assign it permission to access the GA4 property.

In the GA4 dashboard, go to Reports → Acquisition → Traffic acquisition or User acquisition.

Scroll down to the table, and you will see the information for Referral traffic. If you don't see it right away on the first screen, you can increase the rows per page (top right) or search for it in the search field (top left), by typing in "referral."

Where is my referral traffic coming from?

Go up to the top left (under Search) to "Session default channel group," click the down arrow, and choose "Session source/Medium."

In the table, you will now see the source and medium of all the default channel groups, including the website (source) and referral (medium). For example, you may see the source/medium as:

  • Google/Organic
  • Newsletter/Email
  • YouTube/Referral

However, the Session source/medium column will not be grouped by referrals. To filter for just the referral source, go to Search and type in Referral. Now you will see only the traffic from referrals.

Was this page helpful?