Google Analytics in SSIS: Transitioning from v3 to v4

Introduction

This article will guide you through connecting to Google Analytics using our connector within SSIS and highlight the differences between Version 3 and Version 4.

Prerequisites

Use Case

Retrieve data from Google Analytics without delving into complex API intricacies. Our easy-to-use interface allows you to extract large amounts of data by adjusting parameters such as dimensions, metrics, filters, sort by, date range, etc.

Steps

Create/Select a Project in Google API Console:

  1. Navigate to Google API Console.
  2. Click on the Project Dropdown at the top bar and either select an existing project or create a new one by clicking CREATE PROJECT.
  3. Once the project is set, click ENABLE APIS AND SERVICES.
  4. Search for the API you wish to enable, click on the API name, and Enable. Some common Google API Examples:
  • To enable Google YouTube API search for "YouTube ". It has few APIs, so pick the one you need under this. For example, To manage/view channels, use Data API; for Reporting, use Analytics API)

  • To enable Google YouTube API, search for “YouTube.” Choose the one you need under this. For example, to manage/view channels, use Data API; for Reporting, use Analytics API.

  • To enable Google Drive API, search for “Drive” and click Enable.

  • To enable Google Sheets API, search for “Sheet.” (Some Sheets API operations need Drive API to assist that as well).

  • To enable Google BigQuery API, search for “BigQuery.”

  • To enable Google Analytics (GA3), search for “Analytics” and allow Google Analytics API.

  • To enable Google Analytics (GA4), search for Google Analytics Reporting API and click Enable.

  • Important: Search for Google Analytics Admin API and click enable (needed to query available properties).
    image

  1. Return to the main screen and click on the OAuth Consent Screen tab. Provide the necessary details and save.
  2. Move to the Credentials tab.
  3. Click CREATE CREDENTIALS in the top bar, choose OAuth Client ID, select Desktop App as the Application Type, and click Create to obtain your Client ID and Secret ID.

Connect with Google Analytics connector in SSIS:

  1. Drag and drop a Data Flow task in your SSIS package.

  2. Add a Google Analytics Source component inside the Data Flow.

  3. Create a new connection within the Google Analytics Source, enter your credentials, and choose your desired version(V3 or V4).

  4. Generate the token and click OK to save the configuration.

  5. Preview the data

Considerations for both versions

The Google Analytics Reporting API (v4) is the latest version of the API and has replaced the Google Analytics Core Reporting API (v3). The v4 API provides a more robust and flexible way to access and retrieve data from Google Analytics.

Here are some key points about the transition from v3 to v4:

  1. Replacement of v3 by v4: Google has officially deprecated and replaced the Core Reporting API (v3) with the Reporting API (v4). While v3 might still work for some time, it’s recommended to transition to v4 for better support and access to new features.
  2. Compatibility: Although some dimensions and metrics may be available in both versions, certain features and improvements are only available in version 4. New developments and updates are expected to be introduced in v4.
  3. Data Access: The Reporting API (v4) provides a more efficient and robust way to access your Google Analytics data. It allows for more complex queries and supports additional features compared to the older v3.
  4. Migration Process: If you have existing scripts or applications using the Core Reporting API (v3), it’s advisable to update them to use the Reporting API (v4) to ensure continued access to Google Analytics data and take advantage of the latest capabilities.
  5. API Documentation: Google provides comprehensive documentation for the Core Reporting API (v3) and the Reporting API (v4). Developers should refer to the relevant documentation for their API version.

Conclusion

Following these steps, you can seamlessly connect to Google Analytics within SSIS, utilizing the ZappySys tool for efficient data retrieval and integration and the differences between both versions. If you encounter any issues or need further assistance, you can contact our support team via chat on our website or through email at support@zappysys.com.

References

You can check our article for Google Analytics source here.

1 Like