آپلود انبوه
با مجموعهها، منظم بمانید
ذخیره و دستهبندی محتوا براساس اولویتهای شما.
آپلود انبوه از Google Drive
function bulkUploadFromGoogleDrive() {
// See https://developers.google.com/google-ads/scripts/docs/features/bulk-upload
// for the list of supported bulk upload templates.
// You can upload a CSV file, or an EXCEL sheet.
const file = DriveApp.getFilesByName('BulkCampaignUpload.csv').next();
const upload = AdsApp.bulkUploads().newFileUpload(file);
upload.forCampaignManagement();
// Use upload.apply() to make changes without previewing.
upload.preview();
}
آپلود انبوه از سرور راه دور
function bulkUploadFromRemoteServer(csvFileUrl) {
// See https://developers.google.com/google-ads/scripts/docs/features/bulk-upload
// for the list of supported bulk upload templates.
const blob = UrlFetchApp.fetch(csvFileUrl)
.getBlob()
.getAs(MimeType.CSV);
const upload = AdsApp.bulkUploads().newFileUpload(blob);
upload.forCampaignManagement();
// Use upload.apply() to make changes without previewing.
upload.preview();
}
آپلود انبوه از Google Sheets
function bulkUploadFromGoogleSpreadsheet(spreadsheetUrl) {
// The format of this spreadsheet should match a valid bulk upload template.
// See https://developers.google.com/google-ads/scripts/docs/features/bulk-upload
// for the list of supported bulk upload templates.
const spreadSheet = SpreadsheetApp.openByUrl(spreadsheetUrl);
const sheet = spreadSheet.getActiveSheet();
const upload = AdsApp.bulkUploads().newFileUpload(sheet);
upload.forCampaignManagement();
// Use upload.apply() to make changes without previewing.
upload.preview();
}
ایجاد/به روز رسانی کمپین ها
function createOrUpdateCampaigns() {
// See https://developers.google.com/google-ads/scripts/docs/features/bulk-upload
// for the list of supported bulk upload templates and their column names.
const columns = [
'Campaign', 'Budget', 'Bid Strategy type', 'Campaign type'
];
const upload = AdsApp.bulkUploads().newCsvUpload(
columns, {moneyInMicros: false});
// Google Ads identify existing campaigns using its name. To create a new
// campaign, use a campaign name that doesn't exist in your account.
upload.append({
'Campaign': 'Test Campaign 1',
'Budget': 234,
'Bid Strategy type': 'cpc',
'Campaign type': 'Search Only'
});
// Use upload.apply() to make changes without previewing.
upload.preview();
}
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-11 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2024-11-11 بهوقت ساعت هماهنگ جهانی."],[[["This script provides functionalities to bulk upload data into Google Ads from various sources like Google Drive, remote servers, and Google Sheets."],["It utilizes Google Ads Scripts' bulk upload feature to manage and update campaigns, using CSV or spreadsheet files formatted according to specified templates."],["The examples demonstrate how to preview changes before applying them, ensuring accuracy in bulk operations."],["The script allows creation or updating of existing campaigns by providing the necessary campaign details like name, budget, bid strategy, and type."],["Before execution, users should consult the provided link for understanding supported bulk upload templates and their required column names."]]],[]]