SlideShare a Scribd company logo
1 of 20
Download to read offline
HTML5 Ads in the
AdWords API
Agenda
● What are HTML5 ads?
● Creating HTML5 ads
● Uploading HTML5 ads via the API
What are HTML5
Ads?
What are HTML5 Ads?
An HTML5 ad is a display ad consisting of a self-
contained HTML, CSS, and Javascript package, which
can provide rich animation and interactivity
What do HTML5 Ads Look Like?
Google Web Designer Showcase
The Past
● Create HTML5 ads only via the AdWords UI
● Support only for predefined HTML5 ad
templates or Google Web Designer ads
Today
● Create HTML5 ads via the API
● Use any authoring tool
HTML5 Ads in AdWords
HTML5 vs Flash
Flash Ads HTML5 Ads
Maturity ● Mature ● Maturing
Availability ● Closed standard
proprietary to Adobe
● Open standard
Browser
support
● Consistent desktop
support, but no longer
played automatically in
Chrome
● Limited mobile support
● Supported by all major
browsers on desktop
and mobile
● Not all browsers are
consistent
Creating HTML5
Ads
Key AdWords HTML5 Ad Policies
● Ad is a single zip file <150 KB
● Format must be a standard
ad size
● Only relative references are
permitted
○ External references (outside the zip file)
allowed only for Google fonts, Google-hosted
jQuery, and exit handler
See the AdWords Help Center for the complete list
Several Ways to Create HTML5 Ads
❏ Google Web Designer
❏ Manual creation
❏ AdWords UI ad gallery
❏ Other authoring tools
✔ discussed today
✔
✔
Google Web Designer
● Simple but powerful WYSIWYG interface
● Many pre-made templates available
● Includes required meta tags automatically
● Low barrier to entry for your creative design team
Manual Creation
<!DOCTYPE html>
<html>
<head>
<meta name="ad.size" content="width=300, height=250"/>
<link type="text/css" rel="stylesheet" href="css/index.css" />
<script src=
"https://tpc.googlesyndication.com/pagead/gadgets/html5/api/exitapi.js">
</script>
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js">
</script>
<script type="text/javascript" src="js/index.js"></script>
</head>
<body>
<!-- Ad content goes here -->
<div class="actions">
<button onclick="ExitApi.exit()" class="button">Call to Action</button>
</div>
Uploading HTML5
Ads via the API
New API Objects
Template Ad ID 419
A new template ad which takes a
MediaBundle object as a field
MediaBundle object
A new subclass of Media that
contains the ad’s zip file and specifies
the HTML entry point
Code Sample
● Create the TemplateAd object
TemplateAd html5Ad = new TemplateAd();
html5Ad.setName("Ad for HTML5");
html5Ad.setTemplateId(419L);
html5Ad.setFinalUrls(new String[] {"http://example.com/html5"});
html5Ad.setDisplayUrl("example.com/html5");
Dimensions dimensions = new Dimensions();
dimensions.setWidth(300);
dimensions.setHeight(250);
html5Ad.setDimensions(dimensions);
Code Sample (Contd.)
● Create the MediaBundle object
byte[] html5Zip = com.google.api.ads.common.lib.utils.Media
.getMediaDataFromUrl("https://goo.gl/9Y7qI2");
MediaBundle mediaBundle = new MediaBundle();
mediaBundle.setData(html5Zip); // takes base64 encoded bytes of the zip file
mediaBundle.setEntryPoint("carousel/index.html");
mediaBundle.setType(MediaMediaType.MEDIA_BUNDLE);
Note: You can also refer to a previously uploaded MediaBundle object
Code Sample (Contd.)
● Populate the TemplateAd
TemplateElementField media = new TemplateElementField();
media.setName("Custom_layout");
media.setFieldMedia(mediaBundle);
media.setType(TemplateElementFieldType.MEDIA_BUNDLE);
TemplateElementField layout = new TemplateElementField();
layout.setName("layout");
layout.setFieldText("Custom");
layout.setType(TemplateElementFieldType.ENUM);
TemplateElement adData = new TemplateElement();
adData.setUniqueName("adData");
adData.setFields(new TemplateElementField[] {media, layout});
html5Ad.setTemplateElements(new TemplateElement[] {adData});
Code Sample (Contd.)
● Create the AdGroupAd
AdGroupAd html5AdGroupAd = new AdGroupAd();
html5AdGroupAd.setAdGroupId(adGroupId);
html5AdGroupAd.setAd(html5Ad);
html5AdGroupAd.setStatus(AdGroupAdStatus.PAUSED); // optional
AdGroupAdOperation operation = new AdGroupAdOperation();
operation.setOperator(Operator.ADD);
operation.setOperand(html5AdGroupAd);
AdGroupAdReturnValue result =
adGroupAdService.mutate(new AdGroupAdOperation[] {operation});
Code Sample (Contd.)
● Uploading a MediaBundle separately
byte[] html5Zip = com.google.api.ads.common.lib.utils.Media
.getMediaDataFromUrl("https://goo.gl/9Y7qI2");
MediaBundle mediaBundle = new MediaBundle();
mediaBundle.setData(html5Zip);
// do not call setEntryPoint()
mediaBundle.setType(MediaMediaType.MEDIA_BUNDLE);
mediaBundle = (MediaBundle) mediaService.upload(new Media[] {mediaBundle})[0];
Map<MediaSize, Dimensions> dimensions = Maps.toMap(mediaBundle.getDimensions());
System.out.printf(
"HTML5 media with ID %d, dimensions '%dx%d', and MIME type '%s' "
+ "was uploaded.%n",
mediaBundle.getMediaId(), dimensions.get(MediaSize.FULL).getWidth(),
dimensions.get(MediaSize.FULL).getHeight(), mediaBundle.getMimeType());
● Google Web Designer - https://goo.gl/2X7BpS
● HTML5 ad policies - https://goo.gl/LIoKJ7
● Swiffy - https://goo.gl/grjyIh
● Template ads - https://goo.gl/7kRFZv
● Example SOAP request - https://goo.gl/J0Fn16
Resources

More Related Content

Similar to Uploading HTML5 ads

HTML5 - Web Development Fundaments Part 1 - DeepDive Learning Academy
HTML5 - Web Development Fundaments Part 1 - DeepDive Learning AcademyHTML5 - Web Development Fundaments Part 1 - DeepDive Learning Academy
HTML5 - Web Development Fundaments Part 1 - DeepDive Learning AcademyParag Mujumdar
 
Stephan Spencer - SMX Advanced: Rich Snippets, Schema & Microformats
Stephan Spencer - SMX Advanced: Rich Snippets, Schema & MicroformatsStephan Spencer - SMX Advanced: Rich Snippets, Schema & Microformats
Stephan Spencer - SMX Advanced: Rich Snippets, Schema & MicroformatsSearch Marketing Expo - SMX
 
Google Optimize for testing and personalization
Google Optimize for testing and personalizationGoogle Optimize for testing and personalization
Google Optimize for testing and personalizationOWOX BI
 
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...Scott DeLoach
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfKaty Slemon
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfKaty Slemon
 
Google tools for webmasters
Google tools for webmastersGoogle tools for webmasters
Google tools for webmastersRujata Patil
 
A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionAlexey Gravanov
 
Polytechnic 1.0 Granada
Polytechnic 1.0 GranadaPolytechnic 1.0 Granada
Polytechnic 1.0 GranadaIsrael Blancas
 
Course CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsCourse CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsVinícius de Moraes
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Gustaf Nilsson Kotte
 
seo training in chennai | web design training in chennai | web designing trai...
seo training in chennai | web design training in chennai | web designing trai...seo training in chennai | web design training in chennai | web designing trai...
seo training in chennai | web design training in chennai | web designing trai...Sri Hema
 
Kick start your career
Kick start your careerKick start your career
Kick start your careerCss Founder
 

Similar to Uploading HTML5 ads (20)

Google + Website
Google + WebsiteGoogle + Website
Google + Website
 
Faster WordPress Workflows
Faster WordPress WorkflowsFaster WordPress Workflows
Faster WordPress Workflows
 
HTML5 - Web Development Fundaments Part 1 - DeepDive Learning Academy
HTML5 - Web Development Fundaments Part 1 - DeepDive Learning AcademyHTML5 - Web Development Fundaments Part 1 - DeepDive Learning Academy
HTML5 - Web Development Fundaments Part 1 - DeepDive Learning Academy
 
Stephan Spencer - SMX Advanced: Rich Snippets, Schema & Microformats
Stephan Spencer - SMX Advanced: Rich Snippets, Schema & MicroformatsStephan Spencer - SMX Advanced: Rich Snippets, Schema & Microformats
Stephan Spencer - SMX Advanced: Rich Snippets, Schema & Microformats
 
Google Optimize for testing and personalization
Google Optimize for testing and personalizationGoogle Optimize for testing and personalization
Google Optimize for testing and personalization
 
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...
 
Html 5
Html 5Html 5
Html 5
 
Html5 - Novas Tags na Prática!
Html5 - Novas Tags na Prática!Html5 - Novas Tags na Prática!
Html5 - Novas Tags na Prática!
 
Google AJAX APIs
Google  AJAX APIsGoogle  AJAX APIs
Google AJAX APIs
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdf
 
How to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdfHow to Integrate Google Adwords API in Laravel App.pdf
How to Integrate Google Adwords API in Laravel App.pdf
 
Google tools for webmasters
Google tools for webmastersGoogle tools for webmasters
Google tools for webmasters
 
A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI Composition
 
Polytechnic 1.0 Granada
Polytechnic 1.0 GranadaPolytechnic 1.0 Granada
Polytechnic 1.0 Granada
 
Course CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsCourse CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.js
 
Ui dev@naukri-2011
Ui dev@naukri-2011Ui dev@naukri-2011
Ui dev@naukri-2011
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
 
The World of Dynamic Sites
The World of Dynamic SitesThe World of Dynamic Sites
The World of Dynamic Sites
 
seo training in chennai | web design training in chennai | web designing trai...
seo training in chennai | web design training in chennai | web designing trai...seo training in chennai | web design training in chennai | web designing trai...
seo training in chennai | web design training in chennai | web designing trai...
 
Kick start your career
Kick start your careerKick start your career
Kick start your career
 

More from supergigas

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
 
MCC Scripts update
MCC Scripts updateMCC Scripts update
MCC Scripts updatesupergigas
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performancesupergigas
 
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
 
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
 

More from supergigas (11)

How to build a platform
How to build a platformHow to build a platform
How to build a platform
 
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
 
MCC Scripts update
MCC Scripts updateMCC Scripts update
MCC Scripts update
 
Rate limits and Performance
Rate limits and PerformanceRate limits and Performance
Rate limits and Performance
 
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
 
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
 

Recently uploaded

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfryanfarris8
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2
 

Recently uploaded (20)

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
WSO2CON 2024 - Lessons from the Field: Legacy Platforms – It's Time to Let Go...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAMWSO2Con2024 - Organization Management: The Revolution in B2B CIAM
WSO2Con2024 - Organization Management: The Revolution in B2B CIAM
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 

Uploading HTML5 ads

  • 1. HTML5 Ads in the AdWords API
  • 2. Agenda ● What are HTML5 ads? ● Creating HTML5 ads ● Uploading HTML5 ads via the API
  • 4. What are HTML5 Ads? An HTML5 ad is a display ad consisting of a self- contained HTML, CSS, and Javascript package, which can provide rich animation and interactivity
  • 5. What do HTML5 Ads Look Like? Google Web Designer Showcase
  • 6. The Past ● Create HTML5 ads only via the AdWords UI ● Support only for predefined HTML5 ad templates or Google Web Designer ads Today ● Create HTML5 ads via the API ● Use any authoring tool HTML5 Ads in AdWords
  • 7. HTML5 vs Flash Flash Ads HTML5 Ads Maturity ● Mature ● Maturing Availability ● Closed standard proprietary to Adobe ● Open standard Browser support ● Consistent desktop support, but no longer played automatically in Chrome ● Limited mobile support ● Supported by all major browsers on desktop and mobile ● Not all browsers are consistent
  • 9. Key AdWords HTML5 Ad Policies ● Ad is a single zip file <150 KB ● Format must be a standard ad size ● Only relative references are permitted ○ External references (outside the zip file) allowed only for Google fonts, Google-hosted jQuery, and exit handler See the AdWords Help Center for the complete list
  • 10. Several Ways to Create HTML5 Ads ❏ Google Web Designer ❏ Manual creation ❏ AdWords UI ad gallery ❏ Other authoring tools ✔ discussed today ✔ ✔
  • 11. Google Web Designer ● Simple but powerful WYSIWYG interface ● Many pre-made templates available ● Includes required meta tags automatically ● Low barrier to entry for your creative design team
  • 12. Manual Creation <!DOCTYPE html> <html> <head> <meta name="ad.size" content="width=300, height=250"/> <link type="text/css" rel="stylesheet" href="css/index.css" /> <script src= "https://tpc.googlesyndication.com/pagead/gadgets/html5/api/exitapi.js"> </script> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"> </script> <script type="text/javascript" src="js/index.js"></script> </head> <body> <!-- Ad content goes here --> <div class="actions"> <button onclick="ExitApi.exit()" class="button">Call to Action</button> </div>
  • 14. New API Objects Template Ad ID 419 A new template ad which takes a MediaBundle object as a field MediaBundle object A new subclass of Media that contains the ad’s zip file and specifies the HTML entry point
  • 15. Code Sample ● Create the TemplateAd object TemplateAd html5Ad = new TemplateAd(); html5Ad.setName("Ad for HTML5"); html5Ad.setTemplateId(419L); html5Ad.setFinalUrls(new String[] {"http://example.com/html5"}); html5Ad.setDisplayUrl("example.com/html5"); Dimensions dimensions = new Dimensions(); dimensions.setWidth(300); dimensions.setHeight(250); html5Ad.setDimensions(dimensions);
  • 16. Code Sample (Contd.) ● Create the MediaBundle object byte[] html5Zip = com.google.api.ads.common.lib.utils.Media .getMediaDataFromUrl("https://goo.gl/9Y7qI2"); MediaBundle mediaBundle = new MediaBundle(); mediaBundle.setData(html5Zip); // takes base64 encoded bytes of the zip file mediaBundle.setEntryPoint("carousel/index.html"); mediaBundle.setType(MediaMediaType.MEDIA_BUNDLE); Note: You can also refer to a previously uploaded MediaBundle object
  • 17. Code Sample (Contd.) ● Populate the TemplateAd TemplateElementField media = new TemplateElementField(); media.setName("Custom_layout"); media.setFieldMedia(mediaBundle); media.setType(TemplateElementFieldType.MEDIA_BUNDLE); TemplateElementField layout = new TemplateElementField(); layout.setName("layout"); layout.setFieldText("Custom"); layout.setType(TemplateElementFieldType.ENUM); TemplateElement adData = new TemplateElement(); adData.setUniqueName("adData"); adData.setFields(new TemplateElementField[] {media, layout}); html5Ad.setTemplateElements(new TemplateElement[] {adData});
  • 18. Code Sample (Contd.) ● Create the AdGroupAd AdGroupAd html5AdGroupAd = new AdGroupAd(); html5AdGroupAd.setAdGroupId(adGroupId); html5AdGroupAd.setAd(html5Ad); html5AdGroupAd.setStatus(AdGroupAdStatus.PAUSED); // optional AdGroupAdOperation operation = new AdGroupAdOperation(); operation.setOperator(Operator.ADD); operation.setOperand(html5AdGroupAd); AdGroupAdReturnValue result = adGroupAdService.mutate(new AdGroupAdOperation[] {operation});
  • 19. Code Sample (Contd.) ● Uploading a MediaBundle separately byte[] html5Zip = com.google.api.ads.common.lib.utils.Media .getMediaDataFromUrl("https://goo.gl/9Y7qI2"); MediaBundle mediaBundle = new MediaBundle(); mediaBundle.setData(html5Zip); // do not call setEntryPoint() mediaBundle.setType(MediaMediaType.MEDIA_BUNDLE); mediaBundle = (MediaBundle) mediaService.upload(new Media[] {mediaBundle})[0]; Map<MediaSize, Dimensions> dimensions = Maps.toMap(mediaBundle.getDimensions()); System.out.printf( "HTML5 media with ID %d, dimensions '%dx%d', and MIME type '%s' " + "was uploaded.%n", mediaBundle.getMediaId(), dimensions.get(MediaSize.FULL).getWidth(), dimensions.get(MediaSize.FULL).getHeight(), mediaBundle.getMimeType());
  • 20. ● Google Web Designer - https://goo.gl/2X7BpS ● HTML5 ad policies - https://goo.gl/LIoKJ7 ● Swiffy - https://goo.gl/grjyIh ● Template ads - https://goo.gl/7kRFZv ● Example SOAP request - https://goo.gl/J0Fn16 Resources