From e85aa41a25c4259f8ccd39e374a7e5be1b91d088 Mon Sep 17 00:00:00 2001 From: hs_junxiang Date: Fri, 22 Sep 2023 09:09:00 +0800 Subject: [PATCH] Update README --- README.md | 32 +++++++++++++++++--------------- README.zh-TW.md | 32 +++++++++++++++++--------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 0a852cc..d5f3779 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,13 @@ - [How to Stream GA4 Data to Bigquery in Real-time?](#how-to-stream-ga4-data-to-bigquery-in-real-time) - [Features](#features) - [How to Use?](#how-to-use) - - [Download the Package](#download-the-package) - - [Connect to Your Bigquery](#connect-to-your-bigquery) - - [Connect to GA4 Tables](#connect-to-ga4-tables) - - [Evaluate Query Cost with dry run](#evaluate-query-cost-with-dry-run) - - [Analyze User Properties](#analyze-user-properties) - - [Analyze Device Properties](#analyze-device-properties) - - [Analyze Events](#analyze-events) + - [Download the Package](#download-the-package) + - [Connect to Your Bigquery](#connect-to-your-bigquery) + - [Connect to GA4 Tables](#connect-to-ga4-tables) + - [Evaluate Query Cost with dry run](#evaluate-query-cost-with-dry-run) + - [Analyze User Properties](#analyze-user-properties) + - [Analyze Device Properties](#analyze-device-properties) + - [Analyze Events](#analyze-events) --- @@ -52,11 +52,13 @@ If successful, you will see tables in Bigquery similar to the following (`analyt For more features, please refer to the [package documentation](https://lin-jun-xiang.github.io/pyga4/). -#### Download the Package +### Download the Package -`pip install pyga4` +``` +pip install pyga4 +``` -#### Connect to Your Bigquery +### Connect to Your Bigquery ```python from google.cloud import bigquery @@ -67,7 +69,7 @@ client = bigquery.Client() # ) ``` -#### Connect to GA4 Tables +### Connect to GA4 Tables ```python from pyga4.model import Ga4Table @@ -82,7 +84,7 @@ print(table_id_list) ga4_table.table_id = 'events_intraday_20200812' ``` -#### Evaluate Query Cost with dry run +### Evaluate Query Cost with dry run ```python # Query with dry run: ga4_table.query_config.dry_run = True @@ -92,7 +94,7 @@ ga4_table.table_id = 'events_intraday_20200812' results = ga4_table.query(query) # return None, but you can see the query usage! ``` -#### Analyze User Properties +### Analyze User Properties **Query User ID and Country List** @@ -113,7 +115,7 @@ countries_dist = user_analytic.countries_distribution userid_dist = user_analytic.user_id_distribution ``` -#### Analyze Device Properties +### Analyze Device Properties ```python # DeviceAnalytic @@ -121,7 +123,7 @@ device_analytic = DeviceAnalytic(ga4_table) mobile_brand_dist = device_analytic.mobile_brand_distribution ``` -#### Analyze Events +### Analyze Events ```python # EventAnalytic diff --git a/README.zh-TW.md b/README.zh-TW.md index d0d691b..3065e8f 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -11,13 +11,13 @@ - [如何將 GA4 數據實時串流到 Bigquery?](#如何將-ga4-數據實時串流到-bigquery) - [功能](#功能) - [如何使用?](#如何使用) - - [下載套件](#下載套件) - - [連接您的 Bigquery](#連接您的-bigquery) - - [連接 GA4 資料表](#連接-ga4-資料表) - - [使用 dry run 評估查詢費用](#使用-dry-run-評估查詢費用) - - [分析使用者屬性](#分析使用者屬性) - - [分析裝置屬性](#分析裝置屬性) - - [分析事件](#分析事件) + - [下載套件](#下載套件) + - [連接您的 Bigquery](#連接您的-bigquery) + - [連接 GA4 資料表](#連接-ga4-資料表) + - [使用 dry run 評估查詢費用](#使用-dry-run-評估查詢費用) + - [分析使用者屬性](#分析使用者屬性) + - [分析裝置屬性](#分析裝置屬性) + - [分析事件](#分析事件) --- @@ -51,11 +51,13 @@ 更多功能,請參考[套件說明檔](https://lin-jun-xiang.github.io/pyga4/) -#### 下載套件 +### 下載套件 -`pip install pyga4` +``` +pip install pyga4 +``` -#### 連接您的 Bigquery +### 連接您的 Bigquery ```python from google.cloud import bigquery @@ -66,7 +68,7 @@ client = bigquery.Client() # ) ``` -#### 連接 GA4 資料表 +### 連接 GA4 資料表 ```python from pyga4.model import Ga4Table @@ -81,7 +83,7 @@ print(table_id_list) ga4_table.table_id = 'events_intraday_20200812' ``` -#### 使用 dry run 評估查詢費用 +### 使用 dry run 評估查詢費用 ```python # Query with dry run: @@ -92,7 +94,7 @@ ga4_table.table_id = 'events_intraday_20200812' results = ga4_table.query(query) # return None, but you can see the query usage! ``` -#### 分析使用者屬性 +### 分析使用者屬性 **查詢使用者id、國家列表** @@ -113,7 +115,7 @@ countries_dist = user_analytic.countries_distribution userid_dist = user_analytic.user_id_distribution ``` -#### 分析裝置屬性 +### 分析裝置屬性 ```python # DeviceAnalytic @@ -121,7 +123,7 @@ device_analytic = DeviceAnalytic(ga4_table) mobile_brand_dist = device_analytic.mobile_brand_distribution ``` -#### 分析事件 +### 分析事件 ```python # EventAnalytic