스크립트가 미리보기 모드에서 실행되면 실제 캠페인 데이터는 변경되지 않습니다. 대신 스크립트 실행은 스크립트가 실행되었을 때 실행되었을 변경사항을 보여줍니다. 출력에 만족하면 스크립트의 실시간 실행을 시작하거나 예약할 수 있습니다.
미리보기 모드는 Google Ads 데이터가 잘못 변경되는 것을 걱정하지 않고 스크립트를 개발하고 디버그할 수 있는 강력한 기능입니다.
미리보기 모드는 AdsApp를 진입점으로 사용하는 호출에만 영향을 미칩니다. 다른 서비스 호출은 정상적으로 진행됩니다. 예를 들어 스크립트에서 MailApp를 사용하여 이메일을 보내는 경우 스크립트가 미리 봤는지 여부와 관계없이 전송됩니다. 두 시나리오 모두 스프레드시트가 업데이트됩니다. 스크립트는 실행 정보를 통해 미리보기 모드에서 실행 중인지 여부를 확인할 수 있습니다.
다음 스니펫은 미리보기 모드에서 예상대로 작동하지 않습니다.
// Suppose the ad group has no keywords.letadGroup=findAnEmptyAdGroup();// Create a keyword.adGroup.createKeyword("test");// Fetch all keywords in the ad group.letkeywords=adGroup.keywords().get();// In preview mode, will log "false": keyword was not actually created.// In real execution, will log "true".console.log("Are there keywords in the ad group? "+keywords.hasNext());
[[["이해하기 쉬움","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"]],["최종 업데이트: 2025-03-29(UTC)"],[[["Preview mode executes scripts without making actual changes to campaign data, allowing for risk-free testing and debugging."],["It provides a safe environment to develop and refine Google Ads scripts before applying them to live campaigns."],["Scripts in preview mode can still interact with external services like sending emails or updating spreadsheets."],["Certain actions, like creating or modifying objects, will not produce the same results in preview mode as in live execution."],["Scripts can determine whether they are running in preview or live mode using execution information."]]],[]]