SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Scripts Update
Lightweight solution for account
management
Zhuo Chen
Agenda
● Brief recap
● New features
● Demo
● Resources
● Q&A
Recap
(from last workshop)
Capabilities
● No need for dev token
● Simple JavaScript Code
● Integrated IDE
● Preview mode
● Scheduled run
● External data source
Sample AdWords Script
Print all campaign names under current account
function main() {
// Get all campaigns.
var campaignIterator = AdWordsApp.campaigns().get();
// iterate the list and print names to logger window.
while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
Logger.log(campaign.getName());
}
}
Sample MCC Script
Print stats of all accounts under current MCC
function main() {
// Retrieve all the child accounts.
var accountIterator = MccApp.accounts().get();
// Iterate through the account list.
while (accountIterator.hasNext()) {
var account = accountIterator.next();
// Get stats for the child account.
var stats = account.getStatsFor("THIS_MONTH");
// And log it.
Logger.log("%s,%s,%s", account.getCustomerId(), stats.getClicks(),
stats.getImpressions(), stats.getCost());
}
}
Limits
● Execution time
● Entities
● Quota of underlying Google services
● More details: doc
New features
New Features
● Bulk upload
● Display criteria
● Shopping campaigns
● Google services integration
● Upgraded URLs
New Features (Cont.)
● Many more:
○ Account label
○ Ad customizer
○ Ad extension - review, callout
○ Entity builder
○ Bidding
○ ...
Bulk Upload
● Make bulk changes by uploading data in CSV format
○ can be from many data sources
● Benefits:
○ Utilize new features
○ Easy to transform report data or change entities
○ Higher limits, both for quantities and time
● Support campaign management and offline
conversions
● References: doc, example
Bulk upload from Google Drive
function bulkUploadFromGoogleDrive() {
// Check document for the list of supported bulk upload templates.
// You can upload a CSV file, or an EXCEL sheet.
var SPREADSHEET_URL = 'INSERT_SPREADSHEET_URL_HERE';
var spreadSheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
var sheet = spreadSheet.getActiveSheet();
var upload = AdWordsApp.bulkUploads().newFileUpload(sheet);
upload.forCampaignManagement();
// Use upload.apply() to make changes without previewing.
upload.preview();
}
Display criteria
● Manage the following display criteria:
○ keywords
○ placements
○ topics
○ audiences
● Both positive and negative (exclude)
● References: doc, example
Add a placement in a campaign
function addPlacementToCampaign() {
var campaign = AdWordsApp.campaigns()
.withCondition("Name = 'INSERT_CAMPAIGN_NAME_HERE'")
.get().next();
// Other display criteria can be built in a similar manner using the
// corresponding builder method in the AdWordsApp.Display,
// AdWordsApp.CampaignDisplay or AdWordsApp.AdGroupDisplay class.
var placementOperation = campaign.display()
.newPlacementBuilder()
.withUrl('http://www.site.com') // required
.withCpc(0.50) // optional
.build();
var placement = placementOperation.getResult();
Logger.log('Placement with id = %s and url = %s was created.',
placement.getId(), placement.getUrl());
}
Shopping
● Work with existing shopping campaigns
● Create and manage product group hierarchies
● Run shopping reports
● Cannot:
○ Create shopping campaigns
○ Set shopping properties at the campaign level (e.g.
campaign priority, inventory filters, etc.)
○ Link Merchant Center accounts
● References: doc
Retrieve shopping entities
var campaignName = "My first shopping campaign";
var adGroupName = "My first shopping adgroup";
var adGroupIterator = AdWordsApp.shoppingAdGroups()
.withCondition("CampaignName = '" + campaignName + "'")
.withCondition("AdGroupName = '" + adGroupName + "'")
.get();
while (adGroupIterator.hasNext()) {
var adGroup = adGroupIterator.next();
...
}
Select specific product group
function main() {
var productGroups = AdWordsApp.productGroups()
.withCondition("Clicks > 5")
.withCondition("Ctr > 0.01")
.forDateRange("LAST_MONTH")
.get();
while (productGroups.hasNext()) {
var productGroup = productGroups.next();
productGroup.setMaxCpc(productGroup.getMaxCpc() + 0.01);
}
}
Google Services Integration
● External Data:
○ Spreadsheet, Drive, Charts, Email, URL fetching
● Advanced APIs:
○ Google Analytics
○ Google BigQuery
○ YouTube and YouTube Analytics
○ Fusion Tables
○ Google Calendar
○ Google Tasks
○ Google Prediction
Advanced APIs
● Enablement:
○ Advanced APIs button -> Google Developers Console link
● Considerations:
○ Authorization
○ Permission
○ Quota
○ Billing
● References: doc, examples
Get stats for an Analytics profile
function getStatsForProfileId() {
var profileId = 'INSERT_PROFILE_ID_HERE';
// Dates should be in yyyy-mm-dd format.
var startDate = 'INSERT_START_DATE_HERE';
var endDate = 'INSERT_END_DATE_HERE';
var results = Analytics.Data.Ga.get('ga:' + profileId, startDate,
endDate, 'ga:sessions');
Logger.log('Profile Name: %s', results.profileInfo.profileName);
Logger.log('Total Sessions: %s', results.rows[0][0]);
}
Create event on a calendar
function createEvent() {
// You can find a Google Calendar's ID from its settings page.
var calendarId = 'INSERT_CALENDAR_ID_HERE' ;
// Apr 1, 2015 10:00:00 AM - Apr 1, 2015 11:00:00 AM
var start = new Date(2015, 3, 1, 10, 0, 0);
var end = new Date(2015, 3, 1, 11, 0, 0);
var calendarEvent = {
summary: 'Run account performance report' ,
description : 'Run account performance report for March.' ,
start: {dateTime: start.toISOString()},
end: {dateTime: end.toISOString()},
attendees: [{email: 'alice@example.com '}, {email: 'bob@example.com' }],
// Red background. Use Calendar.Colors.get() for the full list.
colorId: 11
};
calendarEvent = Calendar.Events.insert(calendarEvent, calendarId);
Logger.log('New event with ID = %s was created.' + calendarEvent .getId());
}
Upgraded URLs
● Separate landing URL and tracking URL
○ Less time to manage URL tracking updates
○ Reduce crawl and load time of website
○ New ValueTrack and custom tracking parameters
● Migration deadline: 1 July, 2015 (guide)
● References:
○ API: guide, migration guide
○ Scripts: blog post
Create a new text ad
var adOperation = adGroup.newTextAdBuilder()
.withHeadline("headline of ad")
.withDescription1("first line of ad description")
.withDescription2("second line of ad description")
.withDisplayUrl("www.example.com")
.withFinalUrl("http://www.example.com")
.build();
var ad = adOperation.getResult();
Resources
Documentation
Code snippets
Code snippets
Solutions
Forum
https://groups.google.com/forum/#!forum/adwords-scripts
Resources
● Documentation
● Code samples
● Solutions
● Forum
● 3rd Party Solution

Más contenido relacionado

Similar a MCC Scripts update

Refatorando com a API funcional do Java
Refatorando com a API funcional do JavaRefatorando com a API funcional do Java
Refatorando com a API funcional do JavaGiovane Liberato
 
Week 8
Week 8Week 8
Week 8A VD
 
1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the org1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the orgAbbyWhyte974
 
1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the org1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the orgMartineMccracken314
 
712-use-apps-script-to-create-dynamic-google-forms.pdf
712-use-apps-script-to-create-dynamic-google-forms.pdf712-use-apps-script-to-create-dynamic-google-forms.pdf
712-use-apps-script-to-create-dynamic-google-forms.pdfJojiVarghese30
 
How AdWords UI maps into adwords api
How AdWords UI maps into adwords apiHow AdWords UI maps into adwords api
How AdWords UI maps into adwords apisupergigas
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Dan Wahlin
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5Alkacon Software GmbH & Co. KG
 
Vedika C project.docx
Vedika C project.docxVedika C project.docx
Vedika C project.docxHarshKewat1
 
Google Chart Tools
Google Chart Tools Google Chart Tools
Google Chart Tools Kanika Garg
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right wayThibaud Desodt
 
Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)
Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)
Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)Kanika Garg
 
BatchJobService
BatchJobServiceBatchJobService
BatchJobServicesupergigas
 
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...Bruce McPherson
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter GuideSimon Su
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloudwesley chun
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web formsCK Yang
 
Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2Javier Eguiluz
 
AwReporting Update
AwReporting UpdateAwReporting Update
AwReporting Updatemarcwan
 

Similar a MCC Scripts update (20)

Refatorando com a API funcional do Java
Refatorando com a API funcional do JavaRefatorando com a API funcional do Java
Refatorando com a API funcional do Java
 
Cómo usar google analytics
Cómo usar google analyticsCómo usar google analytics
Cómo usar google analytics
 
Week 8
Week 8Week 8
Week 8
 
1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the org1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the org
 
1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the org1-What are the opportunities and threats that could impact the org
1-What are the opportunities and threats that could impact the org
 
712-use-apps-script-to-create-dynamic-google-forms.pdf
712-use-apps-script-to-create-dynamic-google-forms.pdf712-use-apps-script-to-create-dynamic-google-forms.pdf
712-use-apps-script-to-create-dynamic-google-forms.pdf
 
How AdWords UI maps into adwords api
How AdWords UI maps into adwords apiHow AdWords UI maps into adwords api
How AdWords UI maps into adwords api
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
 
Vedika C project.docx
Vedika C project.docxVedika C project.docx
Vedika C project.docx
 
Google Chart Tools
Google Chart Tools Google Chart Tools
Google Chart Tools
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right way
 
Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)
Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)
Google Chart Tools Kanika Garg (10BM60035) Lavanya R. (10BM60042)
 
BatchJobService
BatchJobServiceBatchJobService
BatchJobService
 
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
Do something useful in Apps Script 5. Get your analytics pageviews to a sprea...
 
Google Cloud Platform 2014Q1 - Starter Guide
Google Cloud Platform   2014Q1 - Starter GuideGoogle Cloud Platform   2014Q1 - Starter Guide
Google Cloud Platform 2014Q1 - Starter Guide
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloud
 
Web topic 22 validation on web forms
Web topic 22  validation on web formsWeb topic 22  validation on web forms
Web topic 22 validation on web forms
 
Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2
 
AwReporting Update
AwReporting UpdateAwReporting Update
AwReporting Update
 

Más de supergigas

Remarketing using customer match
Remarketing using customer matchRemarketing using customer match
Remarketing using customer matchsupergigas
 
What's new in reporting
What's new in reporting What's new in reporting
What's new in reporting supergigas
 
Location aware ad customizers
Location aware ad customizersLocation aware ad customizers
Location aware ad customizerssupergigas
 
GMB API (Google My Business)
GMB API (Google My Business)GMB API (Google My Business)
GMB API (Google My Business)supergigas
 
Uploading HTML5 ads
Uploading HTML5 adsUploading HTML5 ads
Uploading HTML5 adssupergigas
 
Why use ad words api
Why use ad words apiWhy use ad words api
Why use ad words apisupergigas
 
How to build a platform
How to build a platformHow to build a platform
How to build a platformsupergigas
 
The AdWords api and mobile
The AdWords api and mobileThe AdWords api and mobile
The AdWords api and mobilesupergigas
 
Shopping Campaigns
Shopping CampaignsShopping Campaigns
Shopping Campaignssupergigas
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performancesupergigas
 
Extension Setting Services
Extension Setting ServicesExtension Setting Services
Extension Setting Servicessupergigas
 
Effective Reporting
Effective ReportingEffective Reporting
Effective Reportingsupergigas
 
Display Network criteria bidding
Display Network criteria biddingDisplay Network criteria bidding
Display Network criteria biddingsupergigas
 
Dev Token tips
Dev Token tipsDev Token tips
Dev Token tipssupergigas
 
Ad Customizers
Ad CustomizersAd Customizers
Ad Customizerssupergigas
 

Más de supergigas (16)

Remarketing using customer match
Remarketing using customer matchRemarketing using customer match
Remarketing using customer match
 
What's new in reporting
What's new in reporting What's new in reporting
What's new in reporting
 
Location aware ad customizers
Location aware ad customizersLocation aware ad customizers
Location aware ad customizers
 
GMB API (Google My Business)
GMB API (Google My Business)GMB API (Google My Business)
GMB API (Google My Business)
 
Uploading HTML5 ads
Uploading HTML5 adsUploading HTML5 ads
Uploading HTML5 ads
 
Why use ad words api
Why use ad words apiWhy use ad words api
Why use ad words api
 
How to build a platform
How to build a platformHow to build a platform
How to build a platform
 
Upgraded URLs
Upgraded URLsUpgraded URLs
Upgraded URLs
 
The AdWords api and mobile
The AdWords api and mobileThe AdWords api and mobile
The AdWords api and mobile
 
Shopping Campaigns
Shopping CampaignsShopping Campaigns
Shopping Campaigns
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performance
 
Extension Setting Services
Extension Setting ServicesExtension Setting Services
Extension Setting Services
 
Effective Reporting
Effective ReportingEffective Reporting
Effective Reporting
 
Display Network criteria bidding
Display Network criteria biddingDisplay Network criteria bidding
Display Network criteria bidding
 
Dev Token tips
Dev Token tipsDev Token tips
Dev Token tips
 
Ad Customizers
Ad CustomizersAd Customizers
Ad Customizers
 

Último

Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceMartin Humpolec
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServicePicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServiceRenan Moreira de Oliveira
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdfJamie (Taka) Wang
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Spring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfSpring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfAnna Loughnan Colquhoun
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 

Último (20)

Things you didn't know you can use in your Salesforce
Things you didn't know you can use in your SalesforceThings you didn't know you can use in your Salesforce
Things you didn't know you can use in your Salesforce
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer ServicePicPay - GenAI Finance Assistant - ChatGPT for Customer Service
PicPay - GenAI Finance Assistant - ChatGPT for Customer Service
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
20200723_insight_release_plan_v6.pdf20200723_insight_release_plan_v6.pdf
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Spring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdfSpring24-Release Overview - Wellingtion User Group-1.pdf
Spring24-Release Overview - Wellingtion User Group-1.pdf
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 

MCC Scripts update

  • 1. Scripts Update Lightweight solution for account management Zhuo Chen
  • 2. Agenda ● Brief recap ● New features ● Demo ● Resources ● Q&A
  • 4. Capabilities ● No need for dev token ● Simple JavaScript Code ● Integrated IDE ● Preview mode ● Scheduled run ● External data source
  • 5. Sample AdWords Script Print all campaign names under current account function main() { // Get all campaigns. var campaignIterator = AdWordsApp.campaigns().get(); // iterate the list and print names to logger window. while (campaignIterator.hasNext()) { var campaign = campaignIterator.next(); Logger.log(campaign.getName()); } }
  • 6. Sample MCC Script Print stats of all accounts under current MCC function main() { // Retrieve all the child accounts. var accountIterator = MccApp.accounts().get(); // Iterate through the account list. while (accountIterator.hasNext()) { var account = accountIterator.next(); // Get stats for the child account. var stats = account.getStatsFor("THIS_MONTH"); // And log it. Logger.log("%s,%s,%s", account.getCustomerId(), stats.getClicks(), stats.getImpressions(), stats.getCost()); } }
  • 7. Limits ● Execution time ● Entities ● Quota of underlying Google services ● More details: doc
  • 9. New Features ● Bulk upload ● Display criteria ● Shopping campaigns ● Google services integration ● Upgraded URLs
  • 10. New Features (Cont.) ● Many more: ○ Account label ○ Ad customizer ○ Ad extension - review, callout ○ Entity builder ○ Bidding ○ ...
  • 11. Bulk Upload ● Make bulk changes by uploading data in CSV format ○ can be from many data sources ● Benefits: ○ Utilize new features ○ Easy to transform report data or change entities ○ Higher limits, both for quantities and time ● Support campaign management and offline conversions ● References: doc, example
  • 12. Bulk upload from Google Drive function bulkUploadFromGoogleDrive() { // Check document for the list of supported bulk upload templates. // You can upload a CSV file, or an EXCEL sheet. var SPREADSHEET_URL = 'INSERT_SPREADSHEET_URL_HERE'; var spreadSheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL); var sheet = spreadSheet.getActiveSheet(); var upload = AdWordsApp.bulkUploads().newFileUpload(sheet); upload.forCampaignManagement(); // Use upload.apply() to make changes without previewing. upload.preview(); }
  • 13. Display criteria ● Manage the following display criteria: ○ keywords ○ placements ○ topics ○ audiences ● Both positive and negative (exclude) ● References: doc, example
  • 14. Add a placement in a campaign function addPlacementToCampaign() { var campaign = AdWordsApp.campaigns() .withCondition("Name = 'INSERT_CAMPAIGN_NAME_HERE'") .get().next(); // Other display criteria can be built in a similar manner using the // corresponding builder method in the AdWordsApp.Display, // AdWordsApp.CampaignDisplay or AdWordsApp.AdGroupDisplay class. var placementOperation = campaign.display() .newPlacementBuilder() .withUrl('http://www.site.com') // required .withCpc(0.50) // optional .build(); var placement = placementOperation.getResult(); Logger.log('Placement with id = %s and url = %s was created.', placement.getId(), placement.getUrl()); }
  • 15. Shopping ● Work with existing shopping campaigns ● Create and manage product group hierarchies ● Run shopping reports ● Cannot: ○ Create shopping campaigns ○ Set shopping properties at the campaign level (e.g. campaign priority, inventory filters, etc.) ○ Link Merchant Center accounts ● References: doc
  • 16. Retrieve shopping entities var campaignName = "My first shopping campaign"; var adGroupName = "My first shopping adgroup"; var adGroupIterator = AdWordsApp.shoppingAdGroups() .withCondition("CampaignName = '" + campaignName + "'") .withCondition("AdGroupName = '" + adGroupName + "'") .get(); while (adGroupIterator.hasNext()) { var adGroup = adGroupIterator.next(); ... }
  • 17. Select specific product group function main() { var productGroups = AdWordsApp.productGroups() .withCondition("Clicks > 5") .withCondition("Ctr > 0.01") .forDateRange("LAST_MONTH") .get(); while (productGroups.hasNext()) { var productGroup = productGroups.next(); productGroup.setMaxCpc(productGroup.getMaxCpc() + 0.01); } }
  • 18. Google Services Integration ● External Data: ○ Spreadsheet, Drive, Charts, Email, URL fetching ● Advanced APIs: ○ Google Analytics ○ Google BigQuery ○ YouTube and YouTube Analytics ○ Fusion Tables ○ Google Calendar ○ Google Tasks ○ Google Prediction
  • 19. Advanced APIs ● Enablement: ○ Advanced APIs button -> Google Developers Console link ● Considerations: ○ Authorization ○ Permission ○ Quota ○ Billing ● References: doc, examples
  • 20. Get stats for an Analytics profile function getStatsForProfileId() { var profileId = 'INSERT_PROFILE_ID_HERE'; // Dates should be in yyyy-mm-dd format. var startDate = 'INSERT_START_DATE_HERE'; var endDate = 'INSERT_END_DATE_HERE'; var results = Analytics.Data.Ga.get('ga:' + profileId, startDate, endDate, 'ga:sessions'); Logger.log('Profile Name: %s', results.profileInfo.profileName); Logger.log('Total Sessions: %s', results.rows[0][0]); }
  • 21. Create event on a calendar function createEvent() { // You can find a Google Calendar's ID from its settings page. var calendarId = 'INSERT_CALENDAR_ID_HERE' ; // Apr 1, 2015 10:00:00 AM - Apr 1, 2015 11:00:00 AM var start = new Date(2015, 3, 1, 10, 0, 0); var end = new Date(2015, 3, 1, 11, 0, 0); var calendarEvent = { summary: 'Run account performance report' , description : 'Run account performance report for March.' , start: {dateTime: start.toISOString()}, end: {dateTime: end.toISOString()}, attendees: [{email: 'alice@example.com '}, {email: 'bob@example.com' }], // Red background. Use Calendar.Colors.get() for the full list. colorId: 11 }; calendarEvent = Calendar.Events.insert(calendarEvent, calendarId); Logger.log('New event with ID = %s was created.' + calendarEvent .getId()); }
  • 22. Upgraded URLs ● Separate landing URL and tracking URL ○ Less time to manage URL tracking updates ○ Reduce crawl and load time of website ○ New ValueTrack and custom tracking parameters ● Migration deadline: 1 July, 2015 (guide) ● References: ○ API: guide, migration guide ○ Scripts: blog post
  • 23. Create a new text ad var adOperation = adGroup.newTextAdBuilder() .withHeadline("headline of ad") .withDescription1("first line of ad description") .withDescription2("second line of ad description") .withDisplayUrl("www.example.com") .withFinalUrl("http://www.example.com") .build(); var ad = adOperation.getResult();
  • 30. Resources ● Documentation ● Code samples ● Solutions ● Forum ● 3rd Party Solution