یکپارچه سازی داده های خارجی
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
دادههای مهم (موجودی، تبدیلها، و غیره) اغلب در خارج از دامنه Google Ads قرار دارند. به همین ترتیب، رابط کاربری Google Ads ممکن است همیشه ابزار عالی برای تجسم داده ها نباشد. اسکریپتهای Google Ads راهی آسان برای ادغام با منابع داده خارجی ارائه میکنند.
صفحات گسترده گوگل
Google Spreadsheets (که در Google Drive یافت می شود) یک راه حل صفحه گسترده مبتنی بر وب با امکانات کامل است. اسکریپتهای Google Ads به شما امکان میدهد از طریق سرویس صفحهگسترده از صفحات گسترده بخوانید و بنویسید. همچنین می توانید به صورت برنامه ریزی شده یک صفحه گسترده ایجاد کنید، آن را با داده ها پر کنید، فونت ها و رنگ های آن را قالب بندی کنید و با دیگران به اشتراک بگذارید. برخی از راه هایی که می توانید از آنها در اسکریپت های خود استفاده کنید عبارتند از:
- گزارش تصویرسازی
- صفحات گسترده انواع مختلفی از نمودارها را ارائه می دهند. میتوانید یک صفحهگسترده با نمودار تنظیم کنید تا دادههای خود را تجسم کنید و سپس منبع داده را از یک اسکریپت وارد کنید تا نمودار بهطور خودکار بهروزرسانی شود.
- منبع داده
- می توانید یک صفحه گسترده ایجاد کنید که در آن به صورت دستی داده ها را وارد کنید (یا داده های ورودی را از منبع دیگری وارد کنید). سپس یک اسکریپت می تواند داده ها را برای به روز رسانی حساب شما بخواند و پردازش کند. برای مثال، میتوانید کلمات کلیدی جدیدی را در صفحهگسترده وارد کنید که سپس توسط یک اسکریپت در حال اجرا روزانه به حساب شما اضافه میشوند.
- ذخیره اطلاعات متوسط
- یک صفحه گسترده می تواند اطلاعات مربوط به وضعیت اجرای خود را در حین اجرا ذخیره کند، به طوری که بتواند در اجرای بعدی از جایی که متوقف شده است ادامه دهد. به عنوان مثال، اگر نیاز به پردازش همه گروههای تبلیغاتی در حساب خود دارید، اما زمان اجرای آن بیش از 30 دقیقه طول میکشد، میتوانید آنهایی را که پردازش میکنید در حین حرکت ضبط کنید. وقتی اسکریپت دوباره اجرا میشود، میتواند صفحهگسترده را بررسی کند تا بفهمد از کجا شروع شود تا هیچ کاری تکراری نشود.
گوگل درایو
میتوانید با DriveApp
از Google Drive بیشتر استفاده کنید که به اسکریپتها اجازه میدهد فایلهای دلخواه را در Google Drive ایجاد، پیدا و تغییر دهند. همانطور که قبلا نشان داده شده است می توان از آن به عنوان منبع داده یا ذخیره داده میانی استفاده کرد.
نمودارها
تجسم داده های پیشرفته نیز از طریق سرویس نمودارها در دسترس است. این سرویس ساخت نمودار کامل به شما کنترل گسترده ای بر نیازهای بصری سازی داده های شما می دهد.
JDBC
می توانید به پایگاه داده های خارجی سازگار با JDBC مانند پایگاه داده های Google Cloud SQL، MySQL، Microsoft SQL Server و پایگاه داده Oracle متصل شوید. برای دستورالعملهای راهاندازی به این راهنما مراجعه کنید.
ایمیل
اسکریپتهای Google Ads به شما امکان میدهند از طریق سرویس ایمیل ایمیل ارسال کنید. از ایمیل می توان برای اطلاع دادن به هر گونه اطلاعات مرتبطی که از اسکریپت نیاز دارید استفاده کرد. به عنوان مثال، ارسال یک خلاصه با یک پیوند به یک گزارش کامل. میتوانید پیام ایمیل را با HTML سفارشی سفارشی کنید و حتی تصاویر را اضافه کنید، به اسکریپت اجازه میدهد تا گزارشهای حرفهای را مستقیماً برای مشتریان شما ارسال کند. از ضمیمه ها می توان برای ارسال گزارش های بزرگ استفاده کرد.
واکشی URL
اسکریپتهای Google Ads به شما امکان میدهند محتوای یک URL دلخواه را با استفاده از سرویس واکشی آدرس اینترنتی واکشی کنید. این ویژگی طیف وسیعی از فرصت ها را باز می کند:
- یک فید محافظت شده با رمز عبور در وب سایت خود راه اندازی کنید که اطلاعات موجودی را گزارش می کند. سپس، از طریق اسکریپت Google Ads به آن دسترسی داشته باشید تا تغییرات حساب را اعمال کنید.
- اطلاعات مربوط به رویدادهای خارجی را واکشی کنید و بر اساس آن اطلاعات تصمیمات مدیریت حساب بگیرید. به عنوان مثال، می توانید اطلاعات آب و هوا را از یک API مبتنی بر HTTP دریافت کنید و هر زمان که در منطقه مورد نظرتان باران می بارد، قیمت ها را تنظیم کنید یا تبلیغات را فعال کنید.
- طیف گسترده ای از API ها در سراسر وب در دسترس هستند. هر چیزی که دارای رابط HTTP باشد قابل دسترسی است.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-26 بهوقت ساعت هماهنگ جهانی."],[[["\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."]]