---
title: "Google Ads Connector"
description: "คู่มือการผสานรวม Google Ads ฉบับสมบูรณ์สำหรับการซิงค์ข้อมูลแคมเปญ รายการ audience และการติดตาม conversion กับ Brevo ผ่าน Tajo"
url: https://tajo.io/th/docs/connectors/marketing/google-ads/
markdown: https://tajo.io/th/docs/connectors/marketing/google-ads.md
lang: th-TH
robots: noindex
---

ขอสิทธิ์ใช้งานล่วงหน้า

กรอกชื่อและที่อยู่อีเมลที่ทำงานของคุณ เราจะส่งลิงก์เพื่อยืนยันคำขอเข้าใช้งาน Tajo ทางอีเมล

# Google Ads Connector

สถานะตัวเชื่อม: วางแผนไว้ ยังไม่ได้สร้าง ปัจจุบัน Tajo ยังไม่ได้ใช้งานตัวเชื่อมนี้

| ฟิลด์ต้นทาง | ฟิลด์ปลายทาง | ค่าตัวอย่าง |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

เชื่อมต่อ Google Ads กับ Brevo ผ่าน Tajo เพื่อซิงค์ advertising audiences นำเข้าข้อมูล conversion และสร้างโปรไฟล์ลูกค้าที่รวมกันซึ่งเชื่อมการซื้อโฆษณาแบบ paid กับ lifecycle marketing

## ภาพรวม

| คุณสมบัติ | ค่า |
| --- | --- |
| **แพลตฟอร์ม** | Google Ads |
| **หมวดหมู่** | การตลาด |
| **ความซับซ้อนในการตั้งค่า** | สูง |
| **การผสานรวมอย่างเป็นทางการ** | ไม่ |
| **ข้อมูลที่ซิงค์** | แคมเปญ Audiences Conversions ลูกค้า |
| **Skills ที่มี** | 7 |

## ฟีเจอร์

- **การซิงค์ Customer Match** - อัปโหลดรายชื่อผู้ติดต่อ Brevo ไปยัง Google Ads เป็น Customer Match audiences
- **การติดตาม Conversion** - นำเข้า offline conversions จากเหตุการณ์ Brevo ไปยัง Google Ads
- **การซิงค์ Audience** - การซิงค์แบบ bidirectional ระหว่างรายการ Brevo และ Google Ads audiences
- **รายงานแคมเปญ** - ดึงข้อมูลประสิทธิภาพแคมเปญไปยัง Tajo dashboards
- **การติดตาม GCLID** - บันทึก Google Click IDs สำหรับการระบุแหล่งที่มาของ offline conversion
- **ข้อมูล Smart bidding** - ส่งข้อมูลมูลค่า conversion กลับไปยัง Google สำหรับการปรับ bid
- **การซิงค์ Lead form** - นำเข้าข้อมูลจาก Google Ads lead form submissions ไปยัง Brevo contacts

## ข้อกำหนดเบื้องต้น

ก่อนเริ่มต้น ตรวจสอบให้แน่ใจว่าคุณมี:

1. บัญชี Google Ads ที่เปิดใช้งาน API access
2. Google Cloud project ที่เปิดใช้งาน Google Ads API
3. OAuth 2.0 credentials (Client ID และ Client Secret)
4. Google Ads Developer Token (สมัครที่ [Google Ads API Center](https://ads.google.com/aw/apicenter))
5. บัญชี Brevo ที่มีสิทธิ์เข้าถึง API
6. บัญชี Tajo ที่มี API credentials

## การยืนยันตัวตน

### OAuth 2.0

Google Ads API ใช้ OAuth 2.0 สำหรับการยืนยันตัวตน คุณต้องได้รับ refresh token ผ่านกระบวนการ OAuth consent

```bash
# Required OAuth scopes
https://www.googleapis.com/auth/adwords
```

### Developer Token

Developer Token จำเป็นสำหรับคำขอ Google Ads API ทั้งหมดและต้องได้รับการอนุมัติจาก Google

```bash
# Set up authentication headers
curl -X POST https://googleads.googleapis.com/v18/customers/1234567890/googleAds:search \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "developer-token: DEVELOPER_TOKEN" \
  -H "login-customer-id: MANAGER_ACCOUNT_ID"
```

## การกำหนดค่า

### การตั้งค่าพื้นฐาน

```yaml
connectors:
  google_ads:
    enabled: true
    developer_token: "your-developer-token"
    oauth:
      client_id: "your-client-id"
      client_secret: "your-client-secret"
      refresh_token: "your-refresh-token"
    customer_id: "123-456-7890"
    login_customer_id: "111-222-3333"  # Manager account (optional)

    # Data sync options
    sync:
      customer_match: true
      conversions: true
      campaigns: true
      lead_forms: true

    # Conversion tracking
    conversions:
      action_id: "123456789"
      default_currency: "USD"
```

### การกำหนดค่า Customer Match

อัปโหลดผู้ติดต่อ Brevo เป็น Google Ads audiences:

```yaml
customer_match:
  enabled: true
  lists:
    - brevo_list_id: 5
      audience_name: "All Customers"
      match_type: "CONTACT_INFO"
    - brevo_list_id: 7
      audience_name: "High Value Customers"
      match_type: "CONTACT_INFO"

  # Data fields to match
  match_fields:
    - email
    - phone
    - first_name
    - last_name
    - country_code
    - zip_code

  # Sync schedule
  schedule: "daily"
  sync_mode: "mirror"  # mirror, append, or remove
```

### การนำเข้า Offline Conversion

```yaml
conversion_import:
  enabled: true
  conversion_action: "purchase"
  gclid_attribute: "GCLID"  # Brevo attribute storing GCLID
  conversion_events:
    - brevo_event: "order_completed"
      conversion_name: "Purchase"
      value_field: "revenue"
    - brevo_event: "subscription_created"
      conversion_name: "Subscription"
      value_field: "plan_value"
```

## API Endpoints

| เมธอด | Endpoint | คำอธิบาย |
| --- | --- | --- |
| `POST` | `/v18/customers/{id}/googleAds:search` | ค้นหาแคมเปญและทรัพยากร (GAQL) |
| `POST` | `/v18/customers/{id}/googleAds:searchStream` | Stream ผลการค้นหา |
| `POST` | `/v18/customers/{id}/offlineUserDataJobs:create` | สร้าง Customer Match upload job |
| `POST` | `/v18/customers/{id}/conversionUploads:uploadClickConversions` | อัปโหลด offline conversions |
| `POST` | `/v18/customers/{id}/conversionUploads:uploadCallConversions` | อัปโหลด call conversions |
| `GET` | `/v18/customers/{id}/campaignBudgets` | ดึง campaign budgets |
| `POST` | `/v18/customers/{id}/customerLists:mutate` | จัดการ customer lists |

## ตัวอย่างโค้ด

### เริ่มต้น Google Ads Connector

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

// Connect Google Ads account
await tajo.connectors.connect('google-ads', {
  developerToken: process.env.GOOGLE_ADS_DEV_TOKEN,
  clientId: process.env.GOOGLE_OAUTH_CLIENT_ID,
  clientSecret: process.env.GOOGLE_OAUTH_CLIENT_SECRET,
  refreshToken: process.env.GOOGLE_OAUTH_REFRESH_TOKEN,
  customerId: '123-456-7890'
});
```

### อัปโหลด Customer Match Audience

```javascript
// Sync a Brevo list to Google Ads Customer Match
await tajo.connectors.syncAudience('google-ads', {
  brevoListId: 5,
  audienceName: 'High Value Customers',
  matchType: 'CONTACT_INFO',
  syncMode: 'mirror'
});
```

### นำเข้า Offline Conversions

```javascript
// Upload offline conversions from Brevo order events
await tajo.connectors.uploadConversions('google-ads', {
  conversionAction: 'customers/123456/conversionActions/789',
  conversions: [
    {
      gclid: 'CjwKCAiA...',
      conversionDateTime: '2024-01-15 10:30:00-05:00',
      conversionValue: 89.99,
      currencyCode: 'USD'
    }
  ]
});
```

### Query ประสิทธิภาพแคมเปญ (GAQL)

```javascript
// Query campaign metrics using Google Ads Query Language
const query = `
  SELECT
    campaign.name,
    campaign.status,
    metrics.impressions,
    metrics.clicks,
    metrics.cost_micros,
    metrics.conversions
  FROM campaign
  WHERE segments.date DURING LAST_30_DAYS
  ORDER BY metrics.impressions DESC
  LIMIT 20
`;

const results = await tajo.connectors.query('google-ads', { gaql: query });
```

## ขีดจำกัดอัตรา

| ทรัพยากร | ขีดจำกัด | รายละเอียด |
| --- | --- | --- |
| **คำขอ API** | 15,000/วัน | ต่อ developer token |
| **Mutate operations** | 10,000/วัน | ต่อบัญชีลูกค้า |
| **GAQL queries** | 1,500/วัน | ต่อบัญชีลูกค้า |
| **Customer Match uploads** | 10 jobs/วัน | ต่อ customer list |
| **Conversion uploads** | 2,000/คำขอ | ต่อ upload batch |
| **Page size** | 10,000 แถว | สูงสุดต่อ search response |

การอนุมัติ Developer Token

Google Ads API ต้องการ Developer Token ที่ได้รับการอนุมัติ สมัครผ่าน Google Ads API Center ในบัญชี Manager ของคุณ บัญชีทดสอบมี rate limits ที่ลดลง

## การแก้ไขปัญหา

| ปัญหา | สาเหตุ | วิธีแก้ |
| --- | --- | --- |
| `DEVELOPER_TOKEN_NOT_APPROVED` | Token รอการตรวจสอบ | รอการอนุมัติจาก Google หรือใช้บัญชีทดสอบ |
| `CUSTOMER_NOT_FOUND` | Customer ID ไม่ถูกต้อง | ลบขีดกลางออกจาก customer ID หรือตรวจสอบบัญชี manager |
| Customer Match match rate ต่ำ | ข้อมูลไม่เพียงพอ | รวม identifiers หลายตัว (อีเมล โทรศัพท์ ชื่อ รหัสไปรษณีย์) |
| Conversions ไม่ปรากฏ | Attribution window | Conversions อาจใช้เวลาสูงสุด 24 ชั่วโมงในการประมวลผล |
| `OAUTH_TOKEN_EXPIRED` | Refresh token ไม่ถูกต้อง | ยืนยันตัวตนใหม่และขอ refresh token ใหม่ |
| `PERMISSION_DENIED` | สิทธิ์เข้าถึงไม่เพียงพอ | ตรวจสอบระดับการเข้าถึง API และการเชื่อมบัญชี |

## แนวทางปฏิบัติที่ดีที่สุด

1. **ใช้บัญชี Manager** - จัดการบัญชี Ads หลายบัญชีผ่านบัญชี Manager (MCC) เดียว
2. **Hash ข้อมูล Customer Match** - Hash PII ด้วย SHA-256 เสมอก่อนอัปโหลดไปยัง Customer Match
3. **ติดตาม GCLIDs** - จัดเก็บ Google Click IDs ใน Brevo attributes สำหรับการติดตาม offline conversion
4. **Batch การอัปโหลด conversion** - จัดกลุ่ม conversions เป็น batches รายวันแทนการอัปโหลดแบบ real-time
5. **ใช้ GAQL สำหรับรายงาน** - ใช้ Google Ads Query Language สำหรับรายงานแคมเปญที่ยืดหยุ่น
6. **ตรวจสอบ match rates** - ติดตาม match rates ของ Customer Match audience และปรับปรุงคุณภาพข้อมูล
7. **ตั้งค่า Enhanced Conversions** - ใช้ Enhanced Conversions เพื่อการวัด conversion ที่แม่นยำยิ่งขึ้น

## ความปลอดภัย

- **OAuth 2.0** - การยืนยันตัวตนด้วย token แบบปลอดภัยพร้อม refresh tokens
- **SHA-256 hashing** - ข้อมูล Customer Match ถูก hash ก่อนอัปโหลด
- **Data minimization** - ส่งเฉพาะฟิลด์ที่จำเป็นไปยัง Google
- **Google Cloud compliance** - สอดคล้องกับ SOC 2, ISO 27001 และ GDPR
- **Scoped access** - สิทธิ์ API กำหนดขอบเขตตามบัญชีลูกค้าเฉพาะ
- **Audit logging** - คำขอ API ทั้งหมดบันทึกใน Google Ads change history

## แหล่งข้อมูลที่เกี่ยวข้อง

- [Meta Ads Connector](https://tajo.io/th/docs/connectors/marketing/meta-ads)
- [Klaviyo Connector](https://tajo.io/th/docs/connectors/marketing/klaviyo)
- [Brevo Connector](https://tajo.io/th/docs/connectors/marketing/brevo)
- [Customer Sync Skill](https://tajo.io/th/docs/skills/data-sync/customer-sync)
