دمج البيانات الخارجية
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
غالبًا ما تكون البيانات المهمة (المخزون الإعلاني والإحالات الناجحة وما إلى ذلك) خارج نطاق Google Ads. وبالمثل، قد لا تكون واجهة مستخدم "إعلانات Google" دائمًا الأداة المثالية لتصوّر البيانات. توفّر النصوص البرمجية في "إعلانات Google" طريقة سهلة للتكامل مع مصادر البيانات الخارجية.
جداول بيانات Google
"جداول بيانات Google" (الموجودة في Google Drive) هي حلّ كامل الميزات لجداول البيانات على الويب. تتيح لك نصوص "إعلانات Google" البرمجية القراءة من جداول البيانات والكتابة فيها من خلال خدمة جداول البيانات. يمكنك أيضًا إنشاء جدول بيانات آليًا، وتعبئته بالبيانات، وتنسيق الخطوط والألوان، ومشاركته مع الآخرين. في ما يلي بعض الطرق التي يمكنك من خلالها استخدامها في
البرامج النصية:
- تمثيل التقارير بشكل مرئي
- توفّر جداول البيانات أنواعًا مختلفة من المخططات. يمكنك إعداد جدول بيانات يتضمّن مخططًا لتصوّر بياناتك، ثم استيراد مصدر البيانات من نص برمجي لتعديل المخطط تلقائيًا.
- مصدر البيانات
- يمكنك إنشاء جدول بيانات تُدخل فيه البيانات يدويًا (أو تُدخل البيانات من مصدر آخر). يمكن للبرنامج النصي بعد ذلك قراءة البيانات ومعالجتها لتعديل حسابك. على سبيل المثال، يمكنك إدخال كلمات رئيسية جديدة في جدول بيانات، ثم تتم إضافتها إلى حسابك من خلال نص برمجي يتم تنفيذه يوميًا.
- مخزن البيانات الوسيطة
- يمكن لجدول البيانات تخزين معلومات حول حالة تنفيذه أثناء تشغيله،
ما يتيح له المتابعة من حيث توقّف في عملية التنفيذ التالية. على سبيل المثال، إذا كنت بحاجة إلى معالجة جميع المجموعات الإعلانية في حسابك، ولكن يستغرق ذلك وقتًا أطول من الحد الأقصى لمدة التنفيذ البالغ 30 دقيقة، يمكنك تسجيل المجموعات التي تتم معالجتها أثناء التنفيذ. وعندما يتم تنفيذ البرنامج النصي مرة أخرى، يمكنه التحقّق من جدول البيانات لمعرفة مكان البدء حتى لا يكرّر أي عمل.
Google Drive
يمكنك الاستفادة بشكل أكبر من Google Drive باستخدام
DriveApp
الذي يتيح للنصوص البرمجية إنشاء
ملفات عشوائية والبحث عنها وتعديلها على Google Drive. ويمكن استخدامها كمصدر بيانات أو مخزن بيانات وسيط كما هو موضّح سابقًا.
الرسوم البيانية
تتوفّر أيضًا إمكانية تحسين عرض البيانات بشكل مرئي من خلال
خدمة الرسوم البيانية. تمنحك هذه الخدمة المتكاملة لإنشاء الرسوم البيانية إمكانية تحكّم واسعة النطاق في احتياجاتك المتعلقة بعرض البيانات بشكل مرئي.
JDBC
يمكنك الربط بقواعد بيانات خارجية متوافقة مع JDBC، مثل قواعد بيانات Google Cloud SQL وMySQL وMicrosoft SQL Server وOracle. يمكنك الاطّلاع على هذا الدليل للحصول على تعليمات الإعداد.
البريد الإلكتروني
تتيح لك نصوص "إعلانات Google" إرسال رسائل إلكترونية من خلال
خدمة البريد. يمكن استخدام البريد الإلكتروني لإعلامك بأي معلومات ذات صلة تحتاج إليها من النص البرمجي، مثل إرسال ملخّص يتضمّن رابطًا يؤدي إلى تقرير كامل. يمكنك تخصيص رسالة البريد الإلكتروني باستخدام HTML مخصّص، ويمكنك حتى إضافة صور، ما يتيح للبرنامج النصي إرسال تقارير ذات مظهر احترافي مباشرةً إلى عملائك. يمكن استخدام المرفقات لإرسال تقارير كبيرة.
جلب عناوين URL
تتيح لك نصوص Google Ads البرمجية جلب محتوى أي عنوان URL باستخدام خدمة جلب عناوين URL. تتيح لك هذه الميزة الاستفادة من مجموعة من الفرص:
- إعداد خلاصة محمية بكلمة مرور على موقعك الإلكتروني تتضمّن معلومات حول المستودع بعد ذلك، يمكنك الوصول إليها من خلال نص برمجي في "إعلانات Google" لتطبيق تغييرات على الحساب.
- استرداد معلومات عن الأحداث الخارجية واتّخاذ قرارات بشأن إدارة الحساب استنادًا إلى هذه المعلومات على سبيل المثال، يمكنك استرداد معلومات الطقس من واجهة برمجة تطبيقات مستندة إلى HTTP وتعديل عروض الأسعار أو تفعيل الإعلانات كلما كان الجو ممطرًا في المنطقة المستهدَفة.
- تتوفّر مجموعة كبيرة من واجهات برمجة التطبيقات على الويب، ويمكن الوصول إلى أي واجهة تتضمّن واجهة HTTP.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-27 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eGoogle Ads Scripts facilitates integration with external data sources for enhanced data analysis and automation.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Sheets, Drive, and Charts services can be used for data visualization, storage, and reporting within Google Ads Scripts.\u003c/p\u003e\n"],["\u003cp\u003eExternal databases and custom web applications can be connected to Google Ads Scripts via JDBC and URL Fetching services.\u003c/p\u003e\n"],["\u003cp\u003eEmail functionality enables automated notifications and reporting based on script outputs.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Ads Scripts empowers users to programmatically control and automate Google Ads campaigns with external data and services.\u003c/p\u003e\n"]]],[],null,["# External Data Integration\n\nImportant data (inventory, conversions, etc.) often reside outside the Google\nAds domain. Likewise, the Google Ads UI may not always be the perfect\ntool for data visualization. Google Ads scripts provide an easy way to\nintegrate with external data sources.\n\nGoogle Spreadsheets\n-------------------\n\nGoogle Spreadsheets (found in [Google Drive](//drive.google.com)) are a\nfull-featured web-based spreadsheet solution. Google Ads scripts lets you read\nfrom and write to spreadsheets through the\n[Spreadsheet Service](/apps-script/reference/spreadsheet). You can also\nprogrammatically create a spreadsheet, populate it with data, format its fonts\nand colors, and share it with others. Some of the ways you can use them in your\nscripts include:\n\nReport visualization\n: Spreadsheets offer various types of charts. You can set up a spreadsheet with\n a chart to visualize your data, and then import the data source from a script to\n automatically update the chart.\n\nData source\n: You can create a spreadsheet where you manually input data (or input data\n from some other source). A script can then read and process the data to update\n your account. For example, you can enter new keywords to a spreadsheet that are\n then added to your account by a daily running script.\n\nIntermediate data store\n: A spreadsheet can store information about its execution state as it runs, so\n that it can pick up where it left off on the next execution. For example, if\n you need to process all ad groups in your account but it takes longer than the\n [30 minute execution time limit](/google-ads/scripts/docs/limits), you can\n record the ones you process as you go. When the script executes again, it can\n check the spreadsheet to figure out where to start so it doesn't duplicate any\n work.\n\nGoogle Drive\n------------\n\nYou can further leverage Google Drive with\n[`DriveApp`](/apps-script/reference/drive/drive-app) which lets scripts create,\nfind, and modify arbitrary files on Google Drive. This can be used as a data\nsource or intermediate datastore as previously shown.\n\nCharts\n------\n\nEnhanced data visualization is also available through the\n[Charts Service](/apps-script/reference/charts). This full-fledged chart\nbuilding service gives you extensive control over your data visualization\nneeds.\n\nJDBC\n----\n\nYou can connect to external JDBC-compliant databases such as Google Cloud SQL,\nMySQL, Microsoft SQL Server, and Oracle databases. See [this\nguide](/apps-script/guides/jdbc) for set-up instructions.\n\nEmail\n-----\n\nGoogle Ads scripts let you send out emails through the\n[Mail Service](/apps-script/reference/mail). Email can be used for\nnotifying yourself of any pertinent information you need from the script; for\nexample, mailing out a summary with a link to a full report. You can customize\nthe email message with custom HTML and even add images, allowing the script to\nsend professional-looking reports directly to your clients. Attachments can be\nused to send large reports.\n\nURL fetching\n------------\n\nGoogle Ads scripts let you fetch the content of an arbitrary URL using the\n[Url Fetch Service](/apps-script/reference/url-fetch). This feature opens\nup a range of opportunities:\n\n- Set up a password-protected feed on your website that reports inventory information. Then, access it through a Google Ads script in order to apply account changes.\n- Fetch information about external events and make account management decisions based on that information. For example, you could fetch weather information from an HTTP-based API and adjust bids or enable ads whenever it's raining in your target area.\n- There are a wide variety of APIs available across the web; anything that has an HTTP interface is accessible."]]