# Google Enhanced Conversion Via Google Ads Export Integration

このインテグレーションにより、Treasure Dataのジョブ結果をGoogle Ads Serverに直接書き込み、コンバージョン測定の精度を向上させることができます。Google Adsにおいて、コンバージョンとは、ユーザーが広告をクリックした後、またはディスプレイネットワーク広告を表示した後に、製品の購入、モバイルアプリのインストール、メーリングリストへの登録など、特定のアクションを実行することを指します。

[コンバージョントラッキング](https://support.google.com/google-ads/answer/1722022)は、広告の表示またはクリック後のユーザーのアクションに関する重要なインサイトを提供します。このインテグレーションでは、以下のコンバージョンデータがサポートされています:

- オフラインクリックコンバージョン
- Enhanced conversion for Lead
- Enhanced conversion for Web
- オフラインコールコンバージョン
- Store salesコンバージョン（対象となる広告主のみ）


## 前提条件

- [TD Toolbelt](https://toolbelt.treasuredata.com/)を含むTreasure Dataの基礎知識
- ドキュメント: [Google Ads API](https://developers.google.com/google-ads/api/docs/get-started/introduction)
- セットアップガイド:
  - [クリックコンバージョンのアップロード](https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#setup)
  - [Enhanced conversions for Leadのアップロード](https://developers.google.com/google-ads/api/docs/conversions/enhanced-conversions/leads-setup)
  - [Enhanced conversions for Webのアップロード](https://developers.google.com/google-ads/api/docs/conversions/enhanced-conversions/web-setup)
  - [コールコンバージョンのアップロード](https://developers.google.com/google-ads/api/docs/conversions/upload-calls)
  - [Store Sales実装について](https://support.google.com/google-ads/answer/9941109?hl=en&visit_id=638536958762470965-1063192925&ref_topic=9941535&rd=1)
- GoogleによるEnhanced Conversions機能を使用するための管理者権限を持つGoogle Adsアカウント
- Google AdsアカウントにアクセスするためのTreasure Data Google OAuthアプリの認証


## 要件と制限事項

- 選択したConversion Action Typeに対応する正確な小文字の名前とデータ型を持つカラムを指定する必要があります。
- Store salesコンバージョンの場合、`Insufficient transactions`エラーでジョブが失敗しないようにするため、少なくとも数百件のトランザクションをアップロードしてください。
- アップロードジョブは、Googleによって完全に処理されるまで最大24時間かかる場合があります。
- Store salesコンバージョンでCustom Variableを使用するには:
  - Google Ads UIでStore salesコンバージョンに対して*1つの*Custom Variableを有効にします。
  - Store salesに対してcustom variableが有効になっている場合、このインテグレーションのConfiguration画面で変数名を入力する必要があります。


## 新しい接続の作成

クエリを実行する前に、Treasure コンソールでデータ接続を作成および設定する必要があります。データ接続の一部として、次の手順を使用してインテグレーションにアクセスするための認証を提供します。

![](/assets/google-enhanced-conversion-via-google-ads-export-integration-2024-07-15.bcab6b76301c8ff92f5ce6bfbc2b6ccfa2e4642ef56696bc9453107acef3d4b2.e9e2a149.png)

1. Treasure コンソールを開きます。
2. **Integrations Hub > Catalog**に移動します。
3. **Google Enhanced Conversion via Google Ads**を検索して選択します。
4. **Create Authentication**を選択し、ターゲットのGoogle AdsアカウントにアクセスできるGoogleアカウントのOAuthを提供します。
5. **Continue**を選択し、Authenticationの名前を入力してから、**Done**を選択します。


## エクスポート用のクエリ結果の設定

Treasure コンソールは、データをエクスポートする複数の方法をサポートしています。Data Workbenchからデータをエクスポートするには、次の手順を完了します。

1. **Data Workbench** > **Queries**に移動します。
2. **New Query**を選択し、クエリを定義します。
3. **Export Results**を選択し、データのエクスポートを設定します。
4. 既存のGoogle Enhanced Conversion認証を選択するか、[新しい認証を作成](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#googadsconnection)します。
5. エクスポートパラメータを設定し、**Done**を選択します。


![](/assets/google-enhanced-conversion-via-google-ads-export-integration-2024-07-15-1.eec8ef6f87bb4bf0c0fd4ec924042a311d8066ad2e56ae8ce67c5d7fbe4b7168.e9e2a149.png)

### 設定パラメータ

| パラメータ | タイプ | 説明 | 必須 |
|  --- | --- | --- | --- |
| Customer ID | number | ハイフンなしのGoogle Adsアカウント番号を表示します。 | はい |
| Conversion Action Type | dropdown | サポートされているコンバージョンタイプの1つを選択します。 | はい |
| Custom Variable | string | 使用する場合、Store SalesのCustom Variable名を宣言する必要があります。 |  |
| Skip on invalid records | checkbox | 選択すると、データエクスポート処理中に発生した有効なレコードがスキップされます。 |  |


1. **Done**を選択します。


## クエリの定義

Googleより: 2024年3月6日以降、Google Adsは、有効な同意がないEUユーザーのCustomer Match、コンバージョン、store salesデータのアップロードを受け付けなくなります。EUユーザーに対して"UNSPECIFIED"または"UNKNOWN"の同意を持つオーディエンスは処理されません。同意値を指定してください（また、同意アップロードのためにアカウントをホワイトリストに登録する必要がある場合は、Googleの担当者にお問い合わせください）。このインテグレーションは、指定された場合にad_user_data同意を送信します（[https://developers.google.com/google-ads/api/reference/rpc/v15/Consent](https://developers.google.com/google-ads/api/reference/rpc/v15/Consent)を参照してください）。

### 共通データ要件

エクスポートされたデータが受け入れられるためには、特定のフォーマットガイドラインに従う必要があります。フォーマットが正しくないと、アップロードエラーや一致するレコード数の減少につながる可能性があります。

- **ハッシュ要件**: ユーザーを識別可能な情報は、正規化（小文字、前後の空白なし）後、SHA-256を使用してハッシュ化する必要があります。データがプレーンテキストの場合、インテグレーションは以下のフィールドに自動的に適用されます:
  - email
  - phone_number, phone_number_1, phone_number_2, phone_number_3, phone_number_4
  - first_name
  - last_name
  - street_address
- データフォーマット要件:
  - 電話番号: E.164フォーマットを使用します。例: +1234567890
  - 国コード: ISO-3166-1 alpha-2の2文字の国コード
  - 日時（conversion_date_time, adjustment_date_time, ...）: フォーマットは`**YYYY-MM-DD HH:MM:SS[+/-HH:MM]**`で、[+/-HH:MM]はUTCからのオプションのタイムゾーンオフセットです。オフセットがない場合、APIはデフォルトでアカウントのタイムゾーンを使用します。例: "2018-03-05 09:15:00"または"2018-02-01 14:34:30+03:00"
  - 通貨コード: ISO 4217
- **カラム名:**  すべての名前は小文字で、重複できません。


### クリックコンバージョン

| **フィールド名（出力スキーマ）** | **説明** | **データ型** | **必須？** |
|  --- | --- | --- | --- |
| gbraid | iOS14以降のiOSデバイスから発信されるアプリコンバージョンに関連するクリックのクリック識別子。 | String | はい - これらのフィールドのいずれかに値が必要です。 |
|  | iOS14以降のiOSデバイスから発信されるウェブコンバージョンに関連するクリックのクリック識別子。 | String |  |
| gclid | このコンバージョンに関連付けられたGoogle クリック ID（gclid）。 | String |  |
| external_attribution_data | 外部アトリビュートコンバージョンに関する追加データ。このフィールドは外部アトリビュートコンバージョンアクションを持つコンバージョンに必須ですが、それ以外の場合は設定しないでください。 | シリアライズされたJSON オブジェクトの文字列   `{  "external_attribution_credit": 1.2,  "external_attribution_model": "sample model"}` | いいえ |
| custom_variables | このコンバージョンに関連付けられたカスタム変数。 | シリアライズされた配列JSON オブジェクトの文字列   `[{  "conversion_custom_variable": 1, "value": "1"}]` | いいえ |
| cart_data | このコンバージョンに関連付けられたカートデータ | シリアライズされたJSON オブジェクトの文字列   `{  "merchant_id": 111,  "feed_country_code": "US",  "feed_language_code": "en",  "local_transaction_cost": 1.2,  "items": [{    "product_id": "123",    "quantity": 2,    "unit_price": 1.2  }]}` | いいえ |
| conversion_environment | このコンバージョンが記録された環境がアプリまたはウェブであるか。 | String  使用可能な値: **UNSPECIFIED**、**UNKNOWN**、**APP**、**WEB** | いいえ |
| conversion_action_id | このコンバージョンに関連付けられたコンバージョンアクションのリソース名。 |  |  |
| conversion_date_time | コンバージョンが発生した日時。クリック時刻より後である必要があります。タイムゾーンを指定する必要があります。形式は「yyyy-mm-dd hh:mm:ss+ | -hh:mm」です。例:「2019-01-01 12:32:45-08:00」 | String |
| conversion_value | 広告主にとってのコンバージョンの値。 | Double | はい |
| currency_code | コンバージョン値に関連付けられた通貨。これはISO 4217の3文字通貨コードです。例: USD、EUR。 | String | はい |
| order_id | コンバージョンに関連付けられた注文ID。注文IDは、コンバージョンアクションごとに1つのコンバージョンにのみ使用できます。 | String | いいえ |
| consent | 欧州経済領域のユーザーに対する明示的な広告同意宣言。 | String  使用可能な値: **UNSPECIFIED**、**GRANTED**、**DENIED** | いいえ |


### リードの拡張コンバージョン

ユーザー識別子フィールド: email、phone_number、phone_number_1、phone_number_2、phone_number_3、phone_number_4。

最小入力は少なくとも1つのユーザー識別子（emailまたはphone）です。最大は5つのユーザー識別子です。

| **フィールド名（出力スキーマ）** | **説明** | **データ型** | **必須？** |
|  --- | --- | --- | --- |
| custom_variables | このコンバージョンに関連付けられたカスタム変数。 | シリアライズされた配列JSON オブジェクトの文字列   `[  {    "conversion_custom_variable": 1,    "value": "1"  }]` | いいえ |
| cart_data | このコンバージョンに関連付けられたカートデータ。 | シリアライズされた配列JSON オブジェクトの文字列   `{  "merchant_id": 111,     "feed_country_code": "US",     "feed_language_code": "en",     "local_transaction_cost": 1.2,     "items": [{           "product_id": "123",           "quantity": 2,           "unit_price": 1.2  }]}` | いいえ |
| email | 最大5つのユーザー識別子（emailとphone_number）をサポート | String（[ハッシュ要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)） | はい - 2つのフィールド名のうち少なくとも1つに値が必要です |
| phone_number | プレフィックスとして複数の電話番号をサポート可能:  phone_number、  phone_number_1、phone_number_2、phone_number_3、phone_number_4 | String（[ハッシュ要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)） |  |
| conversion_environment | このコンバージョンが記録された環境がアプリかWebか。 | String  受け入れ可能な値: **UNSPECIFIED**, **UNKNOWN**, **APP**, **WEB** | No |
| gclid | このコンバージョンに関連付けられているGoogle Click ID (gclid)。 | String | No |
| conversion_action_id | このコンバージョンに関連付けられているコンバージョンアクションのリソース名。 |  |  |
| conversion_date_time | コンバージョンが発生した日時。クリック時刻より後である必要があります。タイムゾーンを指定する必要があります。形式は「yyyy-mm-dd hh:mm:ss+ | -hh:mm」です。例:「2019-01-01 12:32:45-08:00」 | String |
| conversion_value | 広告主にとってのコンバージョンの値。 | Double | Yes |
| currency_code | コンバージョン値に関連付けられている通貨。ISO 4217 3文字の通貨コードです。例: USD, EUR | String | Yes |
| order_id | コンバージョンに関連付けられている注文ID。注文IDは、コンバージョンアクションごとに1つのコンバージョンにのみ使用できます。 | String | No |
| consent | 欧州経済領域のユーザーに対する明示的な広告同意宣言。 | String  受け入れ可能な値: **UNSPECIFIED**, **GRANTED**, **DENIED** | No |


### Enhanced Conversion for Web

ユーザー識別子フィールド: email, phone (phone_number, phone_number_1, phone_number_2, phone_number_3, phone_number_4), address (first_name, last_name, country_code, postal_code, street_address)。

最小入力は、少なくとも1つのユーザー識別子(email、phone、address)で、最大5つのユーザー識別子です。

| **フィールド名 (Output Schema)** | **説明** | **データ型** | **必須?** |
|  --- | --- | --- | --- |
| gclid_date_time_pair |  | String of serialized JSON object   `{  "gclid": "gclid",  "conversion_date_time": "2023-10-10 10:10:10+07:00"}` | No |
| email | 最大5つのユーザー識別子(email、phone_number、address)をサポート | String ([ハッシュ要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)) | Yes |
| phone_number | プレフィックスとして複数の電話番号をサポート可能: phone_number_1, phone_number_2, phone_number_3, phone_number_4 | String ([ハッシュ要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)) | Yes |
| first_name | 住所情報 | String ([ハッシュ要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)) | Yes |
| last_name | String ([ハッシュ要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)) | Yes - first_nameが含まれている場合のみ必須 |  |
| country_code | String | Yes - first_nameが含まれている場合のみ必須 |  |
| postal_code | String | Yes - first_nameが含まれている場合のみ必須 |  |
| street_address | String ([ハッシュ要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)) | No |  |
| order_id | コンバージョンに関連付けられている注文ID。注文IDは、コンバージョンアクションごとに1つのコンバージョンにのみ使用できます。 | String | Yes |
| conversion_action_id | このコンバージョンに関連付けられているコンバージョンアクションのリソース名。 |  |  |
| adjustment_date_time | 調整が発生した日時。conversion_date_timeより後である必要があります。タイムゾーンを指定する必要があります。形式は「yyyy-mm-dd hh:mm:ss+ | -hh:mm」です。例:「2019-01-01 12:32:45-08:00」 | String |
| user_agent | 元のコンバージョンを強化するためのユーザーエージェント。これは、ユーザーがWebページでコンバージョンしたときのHTTPリクエストヘッダーで見つけることができます。  **例**   "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X)"  エンハンスメントは、ユーザー識別子を持つユーザーエージェントのみを指定できます。これは、元のコンバージョンを送信したリクエストのユーザーエージェントと一致する必要があります。そうすることで、コンバージョンとそのエンハンスメントの両方が同一デバイスとして帰属するか、両方がクロスデバイスとして帰属するかのいずれかになります。 | String | No |


### Call Conversions

| **フィールド名（出力スキーマ）** | **説明** | **データ型** | **必須？** |
|  --- | --- | --- | --- |
| custom_variables | このコンバージョンに関連付けられたカスタム変数。 | シリアル化された配列のJSON オブジェクトの文字列   `[  {    "conversion_custom_variable": 1,    "value": "1"  }]` | いいえ |
| caller_id | この通話が発信された発信者ID。発信者IDは、先頭に「+」記号を付けたE.164形式である必要があります（例：「+16502531234」）。 | String | はい |
| call_start_date_time | 通話が発生した日時。タイムゾーンを指定する必要があります。形式は「yyyy-mm-dd hh:mm:ss+|-hh:mm」です（例：「2019-01-01 12:32:45-08:00」）。 | String | はい |
| conversion_action_id | このコンバージョンに関連付けられたコンバージョンアクションのリソース名。 |  |  |
| conversion_date_time | コンバージョンが発生した日時は、クリック時刻より後である必要があります。タイムゾーンを指定する必要があります。形式は「yyyy-mm-dd hh:mm:ss+|-hh:mm」です（例：「2019-01-01 12:32:45-08:00」）。 | String | はい |
| conversion_value | 広告主のコンバージョンの価値。 | Double | いいえ |
| currency_code | コンバージョン値に関連付けられた通貨は、USDやEURなどのISO 4217 3文字通貨コードです。 | String | いいえ |
| consent | 欧州経済領域（EEA）ユーザーに対する明示的な広告同意の宣言。 | String  受け入れられる値：**UNSPECIFIED**、**GRANTED**、**DENIED** | いいえ |


## 

### Store Sales Conversions

| **フィールド名（出力スキーマ）** | **説明** | **データ型** | **必須？** |
|  --- | --- | --- | --- |
| email |  | String（[ハッシュ化要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)） | はい - emailまたはphone numberのいずれかに値が必要です。それ以外の場合は、住所情報に値が必要です。 |
| phone_number | プレフィックスとして複数の電話番号をサポート可能：phone_number、phone_number_1、phone_number_2、phone_number_3、phone_number_4 | String（[ハッシュ化要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)） |  |
| first_name | 住所情報  emailまたはphone numberのいずれにも値がない場合、これらのフィールドはすべて必須です。 | String（[ハッシュ化要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)） |  |
| last_name | String（[ハッシュ化要件](/ja/int/google-enhanced-conversion-via-google-ads-export-integration#h3_1829032370)） |  |  |
| city | String |  |  |
| state | String |  |  |
| country_code | String |  |  |
| postal_code | String |  |  |
| tran_datetime | トランザクションが発生したタイムスタンプ。形式は「YYYY-MM-DD HH:MM:SS[+/-HH:MM]」です | String | はい |
| tran_amount | マイクロ単位のトランザクション金額。マイクロ単位のトランザクション金額は1000より大きい必要があります | Double | はい |
| tran_currency | トランザクション通貨コード。ISO 4217 3文字コードが使用されます | String | はい |
| conversion_action_id | Store Sales コンバージョンアクションのID | String | はい |
| order_id | トランザクション注文ID | String | いいえ |
| custom_value | 設定画面でカスタム変数名が入力されている場合、このフィールドは必須です  値は、Google Ads UIのStore Sales用カスタム変数で事前に定義されている必要があります | String | いいえ |
| consent_user_data | 欧州経済地域ユーザーに対する明示的な広告同意宣言 | String  許可される値: **UNSPECIFIED**, **GRANTED**, **DENIED** | No |
| consent_personalize | パーソナライズド広告に対する明示的な広告同意 | No |  |


### クエリ例

**カスタムオブジェクトクエリ**


```
SELECT     gclid,    external_attribution_data,    custom_variables,    cart_data,    conversion_action_id,    conversion_date_time,    conversion_value,    currency_code,    order_id,    consent,    email,    phone_number,    phone_number_1,    first_name,    last_name,    city,    state,    country_code,    postal_code,    street_address,    gclid_date_time_pair,    adjustment_date_time,    user_agent,    caller_id,    call_start_date_timeFROM    table
```

# 

## Audience StudioでSegmentをアクティベートする

## 

Audience Studioでアクティベーションを作成することで、セグメントデータをターゲットプラットフォームに送信することもできます。

1. **Audience Studio**に移動します。
2. 親セグメントを選択します。
3. ターゲットセグメントを開き、右クリックして、**Create Activation**を選択します。
4. **Details**パネルで、アクティベーション名を入力し、前のセクションの設定パラメータに従ってアクティベーションを設定します。
5. **Output Mapping**パネルでアクティベーション出力をカスタマイズします。


![](/assets/ouput.b2c7f1d909c4f98ed10f5300df858a4b19f71a3b0834df952f5fb24018a5ea78.8ebdf569.png)

- Attribute Columns
  - **Export All Columns**を選択すると、変更を加えずにすべての列をエクスポートします。
  - **+ Add Columns**を選択して、エクスポート用の特定の列を追加します。Output Column Nameは、同じSourceカラム名で事前入力されます。Output Column Nameを更新できます。**+ Add Columns**を選択し続けて、アクティベーション出力に新しい列を追加します。
- String Builder
  - **+ Add string**でエクスポート用の文字列を作成します。以下の値から選択します:
    - String: 任意の値を選択。テキストを使用してカスタム値を作成します。
    - Timestamp: エクスポートの日時。
    - Segment Id: セグメントID番号。
    - Segment Name: セグメント名。
    - Audience Id: 親セグメント番号。


1. **Schedule**を設定します。


![](/assets/snippet-output-connector-on-audience-studio-2024-08-28.a99525173709da1eb537f839019fa7876ffae95045154c8f2941b030022f792c.8ebdf569.png)

- スケジュールを定義する値を選択し、オプションでメール通知を含めます。


1. **Create**を選択します。


## (オプション) CLIを使用したExport Integration

[TD Toolbelt](https://toolbelt.treasuredata.com/)を使用して、CLIからクエリ結果のエクスポートをトリガーできます。`td query`コマンドの`--result`オプションを使用して、エクスポートジョブのパラメータを指定する必要があります。詳細については、[こちらの記事](/tools/cli-and-sdks/querying-and-importing-data-to-treasure-data-from-the-command-line)を参照してください。

オプションの形式はJSONで、一般的な構造は次のとおりです。


```
Case UPLOAD_OFFLINE_CLICK_CONVERSION{    "type": "google_enhanced_conversion_via_google_ads",    "td_authentication_id": "td_authentication_id",    "customer_id": 9491028710,    "conversion_type": "upload_offline_click_conversion",    "skipInvalid_records": true}Case UPLOAD_ENHANCED_FOR_LEAD{    "type": "google_enhanced_conversion_via_google_ads",    "td_authentication_id": "td_authentication_id",    "customer_id": 9491028710,    "conversion_type": "upload_enhanced_for_lead",    "skipInvalid_records": true}Case UPLOAD_ENHANCED_FOR_WEB{    "type": "google_enhanced_conversion_via_google_ads",    "td_authentication_id": "td_authentication_id",    "customer_id": 9491028710,    "conversion_type": "upload_enhanced_for_web",    "skipInvalid_records": true}Case UPLOAD_CALL_CONVERSION{    "type": "google_enhanced_conversion_via_google_ads",    "td_authentication_id": "td_authentication_id",    "customer_id": 9491028710,    "conversion_type": "upload_enhanced_conversion_via_google_ads",    "skipInvalid_records": true}Case UPLOAD_STORE_SALES{    "type": "google_enhanced_conversion_via_google_ads",    "td_authentication_id": "td_authentication_id",    "customer_id": 9491028710,    "conversion_type": "upload_store_sales",    "custom_variable": "custom_variable_name",    "skipInvalid_records": true}
```

### CLIパラメータ

| Name | Description | Value | Default Value | Required |
|  --- | --- | --- | --- | --- |
| type |  |  |  |  |
| td_authentication_id | Treasure コンソールの既存のGoogle Enhanced via Google Ads認証のID。 | Number | Null | No |
| customer_id | 顧客のアカウントID。 | String |  | Yes |
| conversion_type | コンバージョンアクションのタイプ。統合は現在、このリストの5つのタイプをサポートしています:  - upload_offline_click_conversion - upload_enhanced_for_lead - upload_enhanced_for_web - upload_call_conversion - upload_store_sales | String |  | Yes |
| skipInvalid_records | 無効なレコードを無視するかどうかを決定します。 | Boolean | True | No |
| custom_variable | Google Adsの既存のカスタム変数の名前。コンバージョンタイプがupload_store_salesの場合にのみ適用されます。 | String | Null | No |


### 使用例

| No | Step | Example |
|  --- | --- | --- |
| 1 | Prepare the config | `{    "type": "google_enhanced_conversion_via_google_ads",    "td_authentication_id": "td_authentication_id",    "customer_id": 1111111111,    "conversion_type": "upload_store_sales",    "skipInvalid_records": true,    "oauth_warning_flag": null,    "custom_variable": "custom_variable"}` |
|  | Stringified JSON | `{"type":"google_enhanced_conversion_via_google_ads","td_authentication_id":"td_authentication_id","customer_id":1111111111,"conversion_type":"upload_store_sales","skipInvalid_records":true,"oauth_warning_flag":null,"custom_variable":"custom_variable"}` |
|  | Prepare the query data | `select  'test1@test.com'            as email,  '+1345876231'               as phone_number,  '+1345876231'               as phone_number_1,  '+1345876231'               as phone_number_2,  '+1345876231'               as phone_number_3,  '+1345876231'               as phone_number_4,  'Test1'                     as first_name,  'Ng1'                       as last_name,  'HCM1'                      as city,  'HCM1'                      as state,  'VN'                        as country_code,  '700000'                    as postal_code,  '2024-07-04 14:34:30+03:00' as tran_datetime,  amount_double               as tran_amount,  'USD'                       as tran_currency,  ''                          as custom_value,  '486149275'                 as conversion_action_idfrom   db.google_enhanced;   Convert them to single line as below:select 'test1@test.com' as email, '+1345876231' as phone_number, '+1345876231' as phone_number_1, '+1345876231' as phone_number_2, '+1345876231' as phone_number_3, '+1345876231' as phone_number_4, 'Test1' as first_name, 'Ng1' as last_name, 'HCM1' as city, 'HCM1' as state, 'VN' as country_code, '700000' as postal_code, '2024-07-04 14:34:30+03:00' as tran_datetime, amount_double as tran_amount, 'USD' as tran_currency, '' as custom_value, '486149275' as conversion_action_id from luan_db.google_enhanced;` |
|  | Combine them and run them in terminal | `td -c ./account.conf query \--database your_db --wait "select 'test1@test.com' as email, '+1345876231' as phone_number, '+1345876231' as phone_number_1, '+1345876231' as phone_number_2, '+1345876231' as phone_number_3, '+1345876231' as phone_number_4, 'Test1' as first_name, 'Ng1' as last_name, 'HCM1' as city, 'HCM1' as state, 'VN' as country_code, '700000' as postal_code, '2024-07-04 14:34:30+03:00' as tran_datetime, amount_double as tran_amount, 'USD' as tran_currency, '' as custom_value, '486149275' as conversion_action_id from db.google_enhanced;" \--type presto \--result '{"type":"google_enhanced_conversion_via_google_ads","td_authentication_id":"td_authentication_id","customer_id":1111111111,"conversion_type":"upload_store_sales","skipInvalid_records":true,"oauth_warning_flag":null,"custom_variable":"custom_variable"}'` |


## 関連記事

#### その他の設定

- Result Exportは、ターゲットの宛先に定期的にデータをアップロードするために[スケジュール](/products/customer-data-platform/job-management/scheduling-jobs-using-td-console)できます。
- すべてのインポートおよびエクスポート統合は、[Treasure ワークフロー](/products/customer-data-platform/data-workbench/workflows)に追加できます。**td**データオペレーターを使用して、指定されたコネクタにクエリ結果をエクスポートできます。詳細については、[Treasure Dataオペレーターのリファレンス](/products/customer-data-platform/data-workbench/workflows/operators)を参照してください。


#### 外部リファレンス

- [About conversion tracking](https://support.google.com/google-ads/answer/1722022)
- [Google Ads API](https://developers.google.com/google-ads/api/docs/get-started/introduction)
- [Upload click conversions](https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#setup).
- [Upload enhanced conversions for Lead](https://developers.google.com/google-ads/api/docs/conversions/enhanced-conversions/leads-setup).
- [Upload enhanced conversions for Web](https://developers.google.com/google-ads/api/docs/conversions/enhanced-conversions/web-setup).
- [Upload call conversions.](https://developers.google.com/google-ads/api/docs/conversions/upload-calls)
- [About Store Sales Implementation](https://support.google.com/google-ads/answer/9941109?hl=en&visit_id=638536958762470965-1063192925&ref_topic=9941535&rd=1)