Hướng dẫn get data from google analytics

After you install MonsterInsights, you’ll need to connect your WordPress site to your Google Analytics account. MonsterInsights makes the process easy, with no coding required. In this guide, we’ll walk you through the process step by step.

Authenticate a Google Analytics property with MonsterInsights

Start by navigating to Insights » Settings found on the left-hand side of your WordPress dashboard.

Next, click on the blue button, Connect MonsterInsights.

Hướng dẫn get data from google analytics

You will now be taken to a screen that will let you pick which Google Account you want to sign in with. Make sure to sign in to the account that you used to make your Google Analytics property.

Hướng dẫn get data from google analytics

Next, click the Allow button to give MonsterInsights access to your Google Analytics data.

Hướng dẫn get data from google analytics

You’ll be given the option to choose the website profile you want to Authenticate with MonsterInsights.

Hướng dẫn get data from google analytics

In the dropdown, find your website and then click Complete Connection.

That’s it! You’re all set.

It can take up to 24 hours for the MonsterInsights dashboard to display your data.

Once it does, you can go to Insights » Reports to see how your site is doing.

Hướng dẫn get data from google analytics

That’s it! Now you know how to connect to Google Analytics with MonsterInsights. To take your sites of Google Analytics to the next level with MonsterInsights please see our guide: Getting Started with MonsterInsights: Guide and Checklist for Advanced Insights.

The Google Analytics Data API v1 gives you programmatic access to Google Analytics 4 (GA4) report data. Google Analytics 4 helps you understand how people use your web, iOS, or Android app. Learn more about Google Analytics 4 properties.

With the Google Analytics Data API v1, you can create reports to answer questions like:

  • How many daily active users has my Android app had in the last week?
  • How many page views has each of the top 10 page URLs for my site received in the last 28 days?
  • How many active users per country has my iOS app had in the last 30 minutes?

The Google Analytics Data API v1 can also be used to:

  • Build custom dashboards to display Google Analytics data.
  • Automate complex reporting tasks to save time.
  • Integrate your Google Analytics data with other business applications.

Quick start guide

Calling the API to create your first report is just a few lines of code away. See the quick start using client libraries to get started. There are client libraries in Java, Python, Node.js, and other languages to simplify your implementation.

Available methods

  • runReport This method returns a customized report of your Google Analytics event data and is the preferred method for simple report queries.
  • batchRunReports This is a batch version of the runReport method which allows generating multiple reports using a single API call.
  • runPivotReport This method returns a customized pivot report of you Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. Each pivot describes the visible dimension columns and rows in the report response.
  • batchRunPivotReports This is a batch version of the runPivotReport method which allows generating multiple reports using a single API call.
  • getMetadata This method returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. The response of this method also includes the Custom dimensions and metrics available for the specified GA4 property.
  • checkCompatibility This method lists dimensions and metrics that can be added to a report request and maintain compatibility.
  • runRealtimeReport This method returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties).
  • properties.audienceExports A group of methods that allow to generate Audience Exports, which include a snapshot of the users in an audience.
  • properties.recurringAudienceLists (Early preview) A group of methods that allow to manage recurring Audience Exports. A recurring audience export produces new audience lists each day.
  • runFunnelReport (Early preview) This method returns a customized funnel report of your Google Analytics event data. Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step.

Supported dimensions and metrics

The API schema documentation lists the dimensions and metrics currently supported by the Analytics Data API.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-12-05 UTC.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]