Skip to content

kumarvikram/ga-reporting-dotnet-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 

Repository files navigation

C# Console App to get reports from Google Analytics

C# console app to read data from Google Analytics using latest GA4 Analytics Reporting API

Prerequisites

For step by step guide on how to do API and credential setup in Google Developer Console Read Google Analytics reports using C# console app

How to run?

  • Replace key.json with your actual key file generated from Google Developer Console.
  • Update KeyFileName key in App.config with your json file name.
 <add key="KeyFileName" value="key.json"/>
  • GA4 Property Id(s) to fetch report from. Separate by comma if there are multiple ViewIds.
<add key="PropertyId" value="123456"/>
  • Folder location where generated report files would be saved
<add key="OutputDirectory" value="C:\Reports" />
  • A sample report configuration
<ReportConfiguration>
  <!--Specify either Start & End date in MM/DD/YYYY format or NumberOfDays. In case of start and end date, number of days configuration would be skipped-->
  <DateConfiguration StartDate="" EndDate="" NumberOfDays="1" />
  <Reports>
    <Report name="PageViews" metrics="screenPageViews" dimensions="dateHour,pagePath" />      
  </Reports>
</ReportConfiguration>

View the complete list of metrics and dimensions that you can use here Google Analytics Data API Dimensions & Metrics

About

C# console app(.Net Framework) to read reports from Google Analytics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages