Önceki Search Ads 360 Reporting API kullanımdan kaldırıldı. Artık yeni Search Ads 360 Reporting API'yi kullanarak raporlarınızı oluşturabilirsiniz.
Search Ads 360 Conversion API'deki get ve getByCustomerId yöntemlerinin desteğinin 2025'in 3. çeyreğinde sonlandırılacağını unutmayın. Dönüşüm verilerine erişmeye devam etmek için yeni Search Ads 360 Reporting API'yi kullanarak dönüşüm kaynağını kullanarak bir rapor oluşturmanız gerekir. Daha fazla ayrıntıyı burada bulabilirsiniz.
Diğer Search Ads 360 Conversion API işlevleri desteklenmeye devam edecektir.
İlk Uygulamanız: Ön Koşullar
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
İlk istemci uygulamanızı kodlamaya başlamadan önce, henüz yapmadıysanız yapmanız gereken birkaç şey vardır.
Google Hesabı oluşturma ve Search Ads 360 izinlerini alma
Search Ads 360 API'yi kullanmak için bir Google Hesabı'na ve Search Ads 360'tan bu hesaba verilen uygun izinlere ihtiyacınız vardır:
Google Hesabınız yoksa
hesap oluşturun.
Google Hesabınız için
Search Ads 360 kullanıcısı oluşturmasını bir Search Ads 360 ajans yöneticisinden isteyin.
Raporları indirmek için birlikte çalışacağınız reklamverenler için görüntüleme iznine sahip olmanız gerekir.
Dönüşüm eklemek veya düzenlemek için birlikte çalışacağınız reklamverenler için düzenleme iznine sahip olmanız gerekir. Paylaşılan Floodlight yapılandırmasında, dönüşümleri yüklemek istediğiniz her alt reklamveren için düzenleme izninizin olması gerekir.
Üst reklamverene veya dönüşümleri yüklemeyeceğiniz alt reklamverenlere erişiminizin olması gerekmez. Dönüşümleri ziyaretlerle ilişkilendirmek için tıklama kimlikleri kullanıyorsanız tıklama kimliğini oluşturan reklamverene yönelik düzenleme erişiminiz olduğundan emin olun. Düzenleme erişiminizin olmadığı bir reklamverene ait tıklama kimliği belirtirseniz istek başarılı olmaz.
Ajans yöneticisi, hesabınızı belirli reklamverenlere erişimi olan bir reklamveren kullanıcısı olarak ayarlayabilir veya hesabınızı ajanstaki tüm reklamverenlere erişimi olan ajans kullanıcısı gibi daha yüksek bir erişim düzeyiyle ayarlayabilir.
API Dönüşüm Hizmeti'ni etkinleştirme
Dönüşümlerle ilgili veriler yüklemek istiyorsanız Ajans Yöneticisi ayrıcalıklarına sahip bir Search Ads 360 kullanıcısının Search Ads 360 kullanıcı arayüzünde oturum açması ve API dönüşüm hizmetini etkinleştirmesi gerekir. Talimatlar için Search Ads 360 yardım merkezine bakın.
İstemciniz için bir Google API Konsolu projesi ve OAuth kimlik bilgileri oluşturun
- Google API Konsolu
kurulum aracını başlatın.
Kurulum aracı; proje oluşturma (veya mevcut bir projeyi kullanma), Search Ads 360 API'yi etkinleştirme ve OAuth 2.0 kimlik bilgileri oluşturma konusunda size yol gösterir.
- Uygulamanızı kaydedin sayfasında mevcut bir projeyi seçin veya Proje oluştur'u seçin. Ardından Devam et'i tıklayın.
- Google API Konsolu Search Ads 360 API'yi etkinleştirdikten sonra, Kimlik bilgilerine git düğmesini tıklayın.
- Kimlik bilgileri oluştur sayfasında aşağıdaki bilgileri girin:
-
Hangi API'yi kullanıyorsunuz?: Search Ads 360 API'si
-
Hangi verilere erişeceksiniz?: Kullanıcı verileri
- İleri düğmesini tıklayın.
Kurulum aracı artık OAuth 2.0 istemci kimliği oluşturmanıza yardımcı oluyor.
- Kurulum aracındaki diğer adımları uygulayın.
sa360Api.py dosyasını yükleme
Search Ads 360, yetkilendirme ayarlama sürecini kolaylaştırmak için bir yardımcı program komut dosyası sağlar. Tam bir uygulama tasarlayıp yazmadan önce veri gönderip almayı denemek isterseniz bu komut dosyasını JSON biçiminde veri göndermek ve almak için de kullanabilirsiniz. Bu doküman sitesindeki JSON örneklerinin çoğunu kopyalayıp doğrudan komut dosyasına girebilirsiniz.
Komut dosyasını yüklemek için:
- Python 2.7'yi yükleyin.
Komut dosyası, Python 3.x ile çalışmaz.
- cURL'yi yükleyin.
- sa360Api.zip dosyasını indirin.
sa360Api.zip
klasöründen sa360Api.py
öğesini ayıklayın.
sa360Api.py
dosyasını yürütülebilir hale getirin.
REST ile ilgili temel bilgileri öğrenin
API'yi çağırmanın iki yolu vardır:
Müşteri kitaplıklarını kullanmamaya karar verirseniz REST'in temellerini bilmeniz gerekir.
REST, veri isteme ve değiştirmeye kullanışlı ve tutarlı yaklaşım sağlayan bir yazılım mimarisi stilidir.
REST terimi, "Representational State Transfer"in (Temsili Durum Aktarımı) kısaltmasıdır. Google API'leri bağlamında, Google tarafından saklanan verilerin temsillerini almak ve değiştirmek için HTTP fiillerini kullanma anlamına gelir.
RESTful bir sistemde, kaynaklar bir veri deposunda saklanır. Bir istemci, sunucunun belirli bir işlemi (ör. kaynak oluşturma, alma, güncelleme veya silme) gerçekleştirmesi için istek gönderir. Sunucu, işlemi gerçekleştirir ve yanıt gönderir. Bu yanıt genelde belirtilen kaynağın bir temsili biçimindedir.
Google'ın RESTful API'lerinde istemci, HTTP fiili kullanarak (ör. POST
, GET
, PUT
veya DELETE
) bir işlem belirtir. Aşağıdaki biçimde yer alan küresel olarak benzersiz bir URI ile kaynak belirtir:
https://www.googleapis.com/apiName/apiVersion/resourcePath?parameters
Tüm API kaynaklarının HTTP tarafından erişilebilen benzersiz URI'ları olduğu için REST, veri önbelleğe almayı etkinleştirir ve web'deki dağıtılan altyapıyla birlikte çalışmak üzere optimize edilmiştir.
HTTP 1.1 standartları dokümanlarında yer alan yöntem tanımlarını faydalı bulabilirsiniz. Bu dokümanlar GET
, POST
, PUT
ve DELETE
ile ilgili spesifikasyonları içerir.
Search Ads 360 API'de REST
Search Ads 360 API işlemleri doğrudan REST HTTP fiilleriyle eşlenir.
Search Ads 360 API URI'leri için özel biçim:
https://www.googleapis.com/doubleclicksearch/v2/resourcePath?parameters
API'deki her desteklenen işlem için kullanılan URI'lerin tamamı API Referansı'nda özetlenmiştir.
JSON ile ilgili temel bilgileri öğrenin
REST kullanıyorsanız istek gövdeleri için JSON biçimini kullanmanız gerekir. Yanıtların JSON veya CSV biçiminde olmasını belirtebilirsiniz.
JSON (JavaScript Nesne Gösterimi), rastgele veri yapılarının basit bir metin temsilini sağlayan, yaygın ve dile bağlı olmayan bir veri biçimidir. Daha fazla bilgi için json.org adresini ziyaret edin.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-11-07 UTC.
[null,null,["Son güncelleme tarihi: 2024-11-07 UTC."],[[["\u003cp\u003eBefore using the Search Ads 360 API, ensure you have a Google Account with the necessary Search Ads 360 permissions, which may include view or edit access to specific advertisers.\u003c/p\u003e\n"],["\u003cp\u003eTo upload conversion data, the API Conversion Service must be activated by a Search Ads 360 user with Agency Manager privileges.\u003c/p\u003e\n"],["\u003cp\u003eSet up a Google API Console project and obtain OAuth credentials for your client application to authenticate and authorize API access.\u003c/p\u003e\n"],["\u003cp\u003eInstall the provided \u003ccode\u003esa360Api.py\u003c/code\u003e utility script and familiarize yourself with REST and JSON basics if you plan to interact with the API directly without client libraries.\u003c/p\u003e\n"]]],["To start coding, create a Google Account and request Search Ads 360 permissions from an Agency Manager, who will grant view or edit access to advertisers. Activate the API conversion service via the Search Ads 360 UI. Next, create a Google API Console project and OAuth 2.0 credentials. Install Python 2.7, cURL, and the `sa360Api.py` utility script. Finally, understand REST basics and JSON formatting, crucial for interacting with the API using HTTP requests.\n"],null,["# Your First App: Prerequisites\n\nBefore you can start coding your first client application, there are a few things you\nneed to do, if you haven't done them already.\n\nCreate a Google Account and get Search Ads 360 permissions\n----------------------------------------------------------\n\nTo use the Search Ads 360 API, you need a Google Account and appropriate permissions\ngranted to that account from Search Ads 360:\n\n1. If you don't already have a Google Account, [create one](https://support.google.com/accounts/answer/27441).\n\n2. Ask a Search Ads 360 **Agency Manager** to [create a Search Ads 360 user](https://support.google.com/searchads/answer/6051717) for your Google Account.\n\n To download reports, you'll need **view permission** for the advertisers\n you'll be working with.\n\n To add or edit conversions, you'll need **edit permission** for the advertisers\n you'll be working with. In a\n [shared Floodlight configuration](https://support.google.com/searchads/answer/2458167),\n you need edit permission for each child advertiser you want to upload conversions into.\n You don't need access to the parent advertiser, nor do you need access to child advertisers\n that you're not uploading conversions into. If you use click IDs to\n [attribute\n conversions to visits](/search-ads/v2/how-tos/conversions/insert#attribute-a-conversion-to-a-specific-visit), make sure you have edit access to the advertiser that generated\n the click ID. If you specify a click ID from an advertiser you don't have edit access to,\n the request will not succeed.\n\n The Agency Manager can set up your account as an **Advertiser user** with\n access to specific advertisers,\n or set up your account with a higher level of access such as **Agency user**\n with access to all advertisers in the agency.\n\nActivate the API Conversion Service\n-----------------------------------\n\n\nIf you want to upload data about conversions, a Search Ads 360 user with **Agency\nManager** privileges needs to sign in to the Search Ads 360 UI and\n**activate the API conversion service** . See the\n[Search Ads 360\nhelp center](https://support.google.com/searchads/answer/2604604#activate) for instructions.\n\nCreate a Google API Console project and OAuth credentials for your client\n-------------------------------------------------------------------------\n\n1. Start the Google API Console [setup tool](https://console.cloud.google.com/start/api?id=doubleclicksearch&credential=client_key). \n The setup tool guides you through creating a project (or using an existing project), enabling the Search Ads 360 API, and creating OAuth 2.0 credentials.\n2. On the **Register your application** page, select an existing project or select **Create a project** . Then click **Continue**.\n3. After the Google API Console enables the Search Ads 360 API, click the **Go to credentials** button.\n4. On the **Create credentials** page, enter the following information:\n - **Which API are you using?**: Search Ads 360 API\n - **What data will you be accessing?**: User data\n5. Click the **Next** button.\n\n The setup tool now offers to help you create an **OAuth 2.0 client ID**.\n6. Follow the rest of the steps in the setup tool.\n\nInstall sa360Api.py\n-------------------\n\nSearch Ads 360 provides a utility script to facilitate the process of setting up\nauthorization. You can also use this script to send and receive data in the JSON format,\nif you want to try sending and receiving data before you design and write a full\napplication. You can copy many of the JSON examples in this documentation site and input\nthem directly to the script.\n\nTo install the script:\n\n1. [Install Python](http://www.python.org/getit/) 2.7. \n The script does not work with Python 3.x.\n2. [Install cURL](http://curl.haxx.se/download.html).\n3. [Download sa360Api.zip](https://www.google.com/help/hc/downloads/sa360/sa360Api.zip).\n4. Extract `sa360Api.py` from `sa360Api.zip`.\n5. Make `sa360Api.py` executable.\n\nLearn REST basics\n-----------------\n\nThere are two ways to invoke the API:\n\n- Using [client libraries](/search-ads/v2/libraries).\n- Sending HTTP requests and parsing the responses.\n\nIf you decide not to use client libraries, you'll need to understand the basics of\nREST.\n\nREST is a style of software architecture that provides a convenient and consistent approach to requesting and modifying data.\n\nThe term REST is short for \"[Representational State Transfer](https://en.wikipedia.org/wiki/Representational_state_transfer).\" In the context of Google APIs, it refers to using HTTP verbs to retrieve and modify representations of data stored by Google.\n\nIn a RESTful system, resources are stored in a data store; a client sends a request that the server perform a particular action (such as creating, retrieving, updating, or deleting a resource), and the server performs the action and sends a response, often in the form of a representation of the specified resource.\n\nIn Google's RESTful APIs, the client specifies an action using an HTTP verb such as `POST`, `GET`, `PUT`, or `DELETE`. It specifies a resource by a globally-unique URI of the following form: \n\n```\nhttps://www.googleapis.com/apiName/apiVersion/resourcePath?parameters\n```\n\nBecause all API resources have unique HTTP-accessible URIs, REST enables data caching and is optimized to work with the web's distributed infrastructure.\n\nYou may find the [method definitions](https://tools.ietf.org/html/rfc7231#section-4.3) in the HTTP 1.1 standards documentation useful; they include specifications for `GET`, `POST`, `PUT`, and `DELETE`.\n\n### REST in the Search Ads 360 API\n\nThe Search Ads 360 API operations map directly to REST HTTP verbs.\n\nThe specific format for Search Ads 360 API URIs is: \n\n```\nhttps://www.googleapis.com/doubleclicksearch/v2/resourcePath?parameters\n```\n\n\nThe full set of URIs used for each supported operation in the API is summarized in the [API Reference](/search-ads/v2/reference).\n\nLearn JSON basics\n-----------------\n\nIf you use REST, you'll need to use the JSON format for the request bodies. You can\nspecify that the responses be either in the JSON or CSV format.\n\n\n[JSON](http://en.wikipedia.org/wiki/JSON) (JavaScript Object Notation) is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see [json.org](http://www.json.org/).\n\n\u003cbr /\u003e"]]