Tag Archives: Developer

Introducing a new developer show "Machine Learning: Recipes for New Developers"

Posted by Josh Gordon, Developer Advocate

To help you get started building applications with machine learning, we’re excited to launch a new developer show, Machine Learning: Recipes for New Developers. In the first few episodes, we’ll teach you the ropes of machine learning without requiring any major prerequisites (like calculus). As the series progresses, we’ll walk you from “Hello World” to solving some real world problems.

Episodes will generally publish bi-weekly, and be only about 5-10 minutes in length to keep the material lightweight. Occasionally, we’ll have guests on the show who work with machine learning on different teams around Google.

Ep #1: Hello World.

  • Six lines of Python is all it takes to write your first machine learning program! In this episode, we'll briefly introduce what machine learning is and why it's important. Then, we'll follow a recipe for supervised learning (a technique to create a classifier from examples) and code it up.

Also: Coffee with a Googler came to NYC! Laurence and Josh talk about the importance of machine learning for developers, and reducing barriers to machine learning education. Check out the video!

Designing for Mobile Micro-Moments

Posted by Jenny Gove, UX Research Lead, Google

Mobile has shaped the way users interact with businesses and brands alike. Nowadays, businesses cannot simply replicate their desktop strategy on mobile; they need to re-think how to build mobile experiences that are useful for clients in their moments of need - those I-want-to-know, I-want-to-go, I-want-to-do, and I-want-to-buy moments throughout the day.

To help app and mobile site developers learn what comprises a best-in-class mobile experience, we’re launching a new mobile design hub on Think with Google: Designing for Mobile Micro-Moments. The new hub features in-depth research on exactly what people expect from a mobile experience.

Learn what makes a best in class mobile experience

We partnered with AnswerLab to run user studies with more than 100 people, where we tested user's behavior on more than 100 different apps and mobile sites to undercover what led to a seamless experience and what design experiences were problematic or caused frustration to users. The results are two new sets of UX principles with specific recommendations to help you improve your mobile experience and drive conversions:

Start building better mobile sites and apps today

After you’ve identified how to improve your mobile experience, you can find tools and resources to start making improvements. Here are just a few of the resources that are available on the hub:

  • For mobile sites, consider using the latest technologies to create an Accelerated Mobile Page. This dramatically improves the performance of the mobile web and allows rich content to load instantaneously for a speedy, delightful experience.
  • Research shows that the bounce rate can be as high as 58% for web pages that take nearly ten seconds to load. Check Pagespeed Insights to gauge your mobile site’s speed.
  • Building a native app? Take advantage of Google API and Services to simplify development, grow and engage your user base, and earn money.
  • Improve the look and feel of your mobile site and app with Material Design.

Learn More

Visit the Designing for Mobile Micro-Moments hub on Think with Google to view the studies and get additional resources to start developing and marketing great mobile sites and apps.

Google Cloud Messaging: State of the Union

Posted by Laurence Moroney, Developer Advocate

Google Cloud Messaging (GCM) is an infrastructure that allows you to do simple and reliable messaging to distribute your messages to and across many devices.

Every day, GCM delivers over 150 Billion messages to devices on various platforms including Android Devices, iOS Devices and Web Browsers. It has a number of different techniques for sending messages:

Single devices. Each device has a unique registration token. If you want to reach that device -- for example using GCM to build a 1:1 chat application, you can do so, addressing it via that token.

Device Groups allow you to bundle devices together into a group. For example, one of your users might have multiple devices -- including the very common scenario of having both a phone and a tablet. Using Device Groups in GCM, you can send a message to all of her devices, and if you desire, you can implement your app so that dismissing on one dismisses on all.

Topics allow you to create interest groups for your users. Once they subscribe to a topic, you can send messages to that topic, and your users will receive them. There’s no subscription limit to these, so you don’t have to worry about how many users subscribe to your topics! Some great scenarios of topics being used to improve user experience can be found in this blog post.

When it comes to reliability of messages, an internal study at Google found that the majority of notification messages (95th percentile) are delivered within 250ms to connected devices. Connectivity is impacted by many factors -- including carriers, routers and local connectivity. Indeed, in some locales it is common for people to disable mobile data for large parts of the day in order to save on bandwidth costs. In this scenario, users will still receive their notifications once they re-activate their data connection.

We’ve provided a number of resources to help you to build apps using GCM. Check out this talk where you are taken step by step through building an Android app and an associated server in PHP. There’s also an open source ‘GCM Playground’ on GitHub here, which provides a sample server implementation that runs on the Google Cloud Platform!

If you want to reach iOS users, today we’re adding an API that will help you to migrate your existing infrastructure to send notifications to iOS device, with no client code changes required. With the new batch Import API you can import the APNs device tokens that you collected from your iOS audience into GCM, and immediately start sending notifications through GCM. After you import the APNs device tokens, you can also use the InstanceID API to transparently subscribe users to GCM topics, achieving efficient fan-out of notifications based on interest groups, once again with no changes required on client code.

We’re continuing to build and innovate on this platform -- stay tuned for lots of cool new features coming soon!

You can learn more about Google Cloud Messaging on the Developers site here, including quickstarts for Android and iOS!

Google’s Launchpad Accelerator successfully takes off. Apply to join the June class.

Originally posted on Android Developers Blog

Posted by Roy Glasberg Global Lead, Launchpad Program & Accelerator

Last month, 24 promising startups from India, Indonesia, and Brazil came to Silicon Valley to participate in Google’s Launchpad Accelerator, a new program that provides late-stage startups (mobile apps) with mentoring and resources to successfully scale in their local economies.

During the intensive two-week Accelerator kickoff in our Mountain View headquarters, Google engineers from 11 product areas, as well as experts from other companies, were on hand to provide startups with mentorship on how to scale and monetize their apps, and ultimately, build successful businesses. Now back in their home countries, the teams will continue developing their products with the support of up to $50,000 in equity-free funding, six more months of ongoing mentorship, and a breadth of developer tools from the Launchpad Accelerator program.

So far, many startup participants have already seen an immediate impact. Two weeks after attending the kickoff event, Brazilian mobile game developer UpBeat Games was featured on Google Play and saw a 1,000% increase in app installations in Asia, as well as a 200% overall increase in active users, by leveraging analytics to better understand their users.

According to UpBeat Games founder Vinicius Heimbeck, “By working one-on-one with the mentors, we learned that we needed to be a data-driven company. We now have the right analytics tools to measure the results of our efforts and to learn from them to optimize the user experience. This all directly impacted our huge success once we were featured on Google Play.”

eFishery, an Indonesian startup that produces smart automated fish feeders, turned its focus on scaling since attending Launchpad Accelerator. “The mentors gave us great insight about how to build a scalable product and how to engage billions of users,” said co-founder and CEO Gibran Chuzaefah Amsi El Farizy. “We received both technical and practical advice on our business, from building back-end technology to embracing failure with the right mindset.”

Apply now for Launchpad AcceleratorWe are also excited to announce the second class for Launchpad Accelerator which will begin in June 2016.

If you are a startup from India, Indonesia, Brazil, or Mexico (a new addition!) and are interested in participating in the next wave, we encourage you to apply here by March 31. We expect to continue adding more countries to the program in the future, so be on the lookout!

App Monetization Insights: How Poki cleverly tests their games before launching

Originally posted on Inside AdMob

Posted by Joe Salisbury, Product Specialist, AdMob

This is the 2nd post of our 5-part blog series providing monetization tips straight from successful app developers. If you’re exploring the question, “what’s the best way to monetize my app?”, also check out AdMob’s free No-nonsense Guide to App Monetization.

This week, we meet with Sebastiaan Moeys, co-founder of Poki, a cross-platform game publisher. They develop and publish web and app games for kids of all ages, reaching 30 million monthly active users. Originally Poki, operated exclusively on the web, but with the rise of mobile they’ve recently released their first app called Zoi. Zoi has over 500,000 downloads and a 4.4 rating across the app stores. Check out these tips from Sebastiaan.



1. Start simply when first approaching in-app analytics
Sebastiaan’s team is sophisticated with their in-app analytics platform and use this data to drive all of their decision making.

For context, Poki continually monitors three things. First, they measure a custom metric called ‘Pure Game Time’. This metric tracks how much time a player spends in-app excluding everything that isn’t actually game time (i.e. subtracting time the users engage with ads or time waiting for the game to load). Second, they monitor 1st, 3rd and 7th day retention rates, benchmarking their game’s performance with top performers in the market. And lastly, they measure drop-off rate. 

Sebastiaan clearly advocates for building out a robust analytics setup over time, but he believes it's important to start off simply:

“You should start simple. In-app analytics can be extensive and you can’t figure out everything in one night. The key is to take small steps, make sure you really understand all the metrics you’re looking at and iterate. It’s a mindset.”

Consider choosing a single, meaningful metric to start, potentially drop-off rate. Then, begin to get in the routine of using that data to improve your app’s quality. 



2. Test your assumptions cheaply and quickly before investing in major developments
Globally, game players have embraced multi-screen options, simultaneously playing on lots of different platforms. For Poki, this meant transitioning their web-based development company to include mobile development. Although exciting, the new challenge brought a new problem. 
Now every time they wanted to launch a new game, it would require a larger team and more money upfront. Every project became a bigger gamble.

To solve this, Poki uses a clever approach that has worked really well for them. Instead of launching on every platform, all at once, they use the web to launch softly, test and iterate. Once they feel comfortable with the new release, then they develop for mobile. The insights they learn from web helps them test a lot of decisions that need to be made for the business.

“By developing games in a smart, iterative way, we not only had the time to ensure that players loved it, we were able to channel the momentum and insights into further growing our user base. With our web learnings, we’re able to perfect game play, quickly A/B test the best places to show ads in our app version, learn what global regions we should localize our app for, and even ask our existing users to help spread the word about the future app launch.”

The process has worked so well with Zoi, that they’ve already begun to scale. The company now has 3 new games in development, and is collecting data to help improve their chances of being a success on mobile. Sebastiaan thinks that the approach of testing quickly and cheaply before launching is something that other game developers can replicate as well. He explains, “for new game developers, try to test your assumptions as early as possible – test your prototype quickly, get your game design and monetization right, and then release your app.” 

Google Ventures, Google’s investment firm, also believes in testing ideas before spending on development. To help more companies do this, they’ve created an approach called a Design Sprint, “a five-day process for answering critical business questions through design, prototyping, and testing ideas with customers.” Learn more about Google Venture’s approach to inexpensive prototyping here.



3. Look outside your home country for opportunities
Sebastiaan started what is now Poki when he was still in high school in Holland. A popular trend he loved was web-based games. All of his friends played them and he knew it was popular all over the country. When on a family vacation in France, he was amazed to find out that the trend hadn’t become popular there yet. Once he got home, he coded up a site and translated everything into French using his parent’s dictionary. The rest is history. Now Poki has 29 dedicated translators, helping the team bring more games to more regions of the world.

Sebastiaan uses the same principle to find the best markets to promote new games in. Additionally, he loves using AdMob to monetize internationally, because it’s easy and quick to get started. His advice for developers looking to go global:

“Work with Google to begin with, and keep your ad implementation simple. Once you start growing in a certain market, look for partners that have local expertise in that market, and use Google’s tools to run localized ads in concurrence with ad demand in the Google network. We have taken this approach in many markets, and the payoff was great for us.”

If you found these tips helpful, don’t forget to check out The No-nonsense Guide to App Monetization. Also, stay connected on all things AdMob by following our Twitter and Google+ pages and don’t forget to check out Poki on Twitter.




Introducing Autotrack for analytics.js


The web has changed a lot since the early days of Google Analytics. Back then, most websites actually consisted of individual pages, and moving from one page to the next involved clicking a link and making a full-page request. With sites like this, it's possible to track the majority of relevant user interactions with a single, one-size-fits-all JavaScript tracking snippet.

But the web of today is much more complex and varied than it used to be. In addition to traditional, static websites, we have full-featured web applications. User interactions aren't limited to clicking links and submitting forms, and a "pageview" doesn't always mean a full-page load.

The web has changed, but analytics implementations have stayed pretty much the same. Most Google Analytics users copy and paste the default tracking snippet and that's it. They know there's more they can do with Google Analytics, but taking the time to learn is often not a priority.

Autotrack for analytics.js is a new solution to this problem. It attempts to leverage as many Google Analytics features as possible while requiring minimal manual implementation. It gives developers a foundation for tracking data relevant to today's modern web.

Features


The autotrack library is built as a collection of analytics.js plugins, making it easy to use the entire library as-is or to pick and choose just the plugins you need. The next few sections describe some of the features autotrack enables.

Outbound link and form tracking

When a user clicks a link that points to another page on a site, that other page typically sends a pageview hit once the user arrives. Because there's a series of pageviews, Google Analytics can figure out on the back end where the user navigated to (and from). But if a user clicks a link or submits a form to an external domain, that action is not captured unless you specifically tell Google Analytics what happened.

Historically, outbound link and form tracking has been tricky to implement because most browsers stop executing JavaScript on the current page once a new page starts to load. Autotrack handles these complications for you, so you get outbound link and form tracking for free.

URL change tracking for single page applications

If you're building a single page application that dynamically loads content and updates the URL using the History API, the default tracking snippet will not suffice -- it only tracks the initial page load. Even if you're sending additional pageviews after successfully loading new content, there can still be complications.

Autotrack automatically detects URL changes made via the History API and tracks those as pageviews. It also keeps the tracker in sync with the updated URL so all subsequent hits (events, social interactions, etc.) are associated with the correct URL.

Declarative event tracking

Sometimes it's easier to declaratively add an event to the HTML than to manually write an event listener in JavaScript. Tracking simple click events is a prime example of this. To track click events with autotrack, you just add data attributes to your markup.

<button data-event-category="Video" data-event-action="play">Play</button>

When a user clicks on the above button, an event with the corresponding category and action (and, optionally, label and value) is sent to Google Analytics.

Media query tracking

Most sites today use responsive design to update the page layout based on the screen size or capabilities of the user's device. If media queries are used to alter the look or functionality of a page, it's important to capture that information to better understand how usage differs when different media queries are active.

Autotrack allows you to register the set of media query values you're using, and those values are automatically tracked via custom dimensions. It also tracks when those values change. (Note that media query tracking requires you to set up custom dimensions in Google Analytics. The process only takes a few minutes, and the instructions are explained in the mediaQueryTracker plugin documentation.)

These are just a few of the features you can enable when using Autotrack. For a complete list of all plugins and instructions on how to use them, refer to the Autotrack documentation on Github.

Who should use autotrack?


While anyone could use and benefit from autotrack, the library is primarily geared toward sites that do not customize their current analytics implementation and would like to take advantage of the features described in this article.

If you're just using the default tracking snippet today, you should consider using autotrack. If you already have a custom implementation of Google Analytics, you should first check the documentation to make sure none of the autotrack features will conflict and no data will be double-counted.

Next steps


To get started using autotrack, check out the usage section of the documentation. If you're curious to see what the data captured by autotrack looks like, the Google Analytics Demos & Tools site uses autotrack and has a page with charts showing the site's own Google Analytics data.

If you want to go deeper, the autotrack library is open source and can be a great learning resource. Have a read through the plugin source code to get a better understanding of how many of the advanced analytics.js features work.

Lastly, if you have feedback or suggestions, please let us know. You can report bugs or submit any issues on Github.

By: Philip Walton, Developer Programs Engineer

EarlGrey – iOS Functional UI Testing Framework

Posted by Siddartha Janga, Google iOS Developers

Brewing for quite some time, we are excited to announce EarlGrey, a functional UI testing framework for iOS. Several Google apps like YouTube, Google Calendar, Google Photos, Google Translate, Google Play Music and many more have successfully adopted the framework for their functional testing needs.

The key features offered by EarlGrey include:

  • Powerful built-in synchronization : Tests will automatically wait for events such as animations, network requests, etc. before interacting with the UI. This will result in tests that are easier to write (no sleeps or waits) and simple to maintain (straight up procedural description of test steps).
  • Visibility checking : All interactions occur on elements that users can see. For example, attempting to tap a button that is behind an image will lead to test failure immediately.
  • Flexible design : The components that determine element selection, interaction, assertion and synchronization have been designed to be extensible.

Are you in need for a cup of refreshing EarlGrey? EarlGrey has been open sourced under the Apache license. Check out the getting started guide and add EarlGrey to your project using CocoaPods or manually add it to your Xcode project file.

Get your app featured on the first smartphone with Project Tango from Lenovo

Posted by Johnny Lee, Technical Project Lead, Project Tango

Today, at CES, Lenovo announced the development of the first consumer-ready smartphone with Project Tango. By adding a few extra sensors and some computer vision software, Project Tango transforms your smartphone into a magic lens that lets you place digital information on your physical world.


*Renderings only. Not the official Lenovo device.

To support the continued growth of the ecosystem, we’re also inviting developers from around the world to submit their ideas for gaming and utility apps created using Project Tango. We’ll pick the best ideas and provide funding and engineering support to help bring them to life, as part of the app incubator. Even better, the finished apps will be featured on Lenovo’s upcoming device. The submission period closes on February 15, 2016.

All you need to do is tell us about your idea and explain how Project Tango technologies will enable new experiences. Additionally, we’ll ask you to include the following materials:

  • Project schedule including milestones for development –– we’ll reach out to the selected developers by March 15, 2016
  • Visual mockups of your idea including concept art
  • Smartphone app screenshots and videos, such as captured app footage
  • Appropriate narrative including storyboards, etc.
  • Breakdown of your team and its members
  • One pager introducing your past app portfolio and your company profile

For some inspiration, Lowe’s is developing an app where you can point your Project Tango-enabled smartphone at your kitchen to see where a new refrigerator or dishwasher might fit virtually.


Elsewhere, developer Schell Games let’s you play virtual Jenga on any surface with friends. But this time, there is no cleanup involved when the blocks topple over.


There are also some amazing featured apps for Project Tango on Google Play. You can pick up your own Project Tango Tablet Development Kit here to brainstorm new fun and immersive experiences that use the space around you. Apply now!

Google Apps Script: Tracking add-on usage with Google Analytics

The following was originally published on the Google Developers Blog.

Editor's note: Posted by Romain Vialard, a Google Developer Expert and developer of Yet Another Mail Merge, a Google Sheets add-on.

Google Apps Script makes it easy to create and publish add-ons for Google Sheets, Docs, and Forms. There are now hundreds of add-ons available and many are reaching hundreds of thousands of users. Google Analytics is one of the best tools to learn what keeps those users engaged and what should be improved to make an add-on more successful.

Cookies and User Identification

Add-ons run inside Google Sheets, Docs, and Forms where they can display content in dialogs or sidebars. These custom interfaces are served by the Apps Script HTML service, which offers client-side HTML, CSS, and JS with a few limitations.

Among those limitations, cookies aren’t persistent. The Google Analytics cookie will be recreated each time a user re-opens your dialog or sidebar, with a new client ID every time. So, Analytics will see each new session as if initiated by a new user, meaning the number of sessions and number of users should be very similar.

Fortunately, it’s possible to use localStorage to store the client ID — a better way to persist user information instead of cookies. After this change, your user metrics should be far more accurate.

Add-ons can also run via triggers, executing code at a recurring interval or when a user performs an action like opening a document or responding to a Google Form. In those cases, there’s no dialog or sidebar, so you should use the Google Analytics Measurement Protocol (see policies on the use of this service) to send  user interaction data directly to Google Analytics servers via the UrlFetch service in Google Apps Script.

A Client ID is also required in that case, so I recommend using the Apps Script User properties service. Most examples on the web show how to generate a unique Client ID for every call to Analytics but this won’t give you an accurate user count.

You can also send the client ID generated on client side to the server so as to use the same client ID for both client and server calls to Analytics, but at this stage, it is best to rely on the optional User ID in Google Analytics. While the client ID represents a client / device, the User ID is unique to each user and can easily be used in add-ons as users are authenticated. You can generate a User ID on the server side, store it among the user properties, and reuse it for every call to Analytics (both on the client and the server side). 

Custom Dimensions & Metrics
In add-ons, we usually rely on event tracking and not page views. It is possible to add different parameters on each event thanks to categories, actions, labels and value, but it’s also possible to add much more info by using custom dimensions & metrics.

For example, the Yet Another Mail Merge add-on is mostly used to send emails, and we have added many custom dimensions to better understand how it is used. For each new campaign (batch of emails sent), we record data linked to the user (e.g. free or paying customer, gmail.com or Google for Work / EDU user) and data linked to the campaign (e.g. email size, email tracking activated or not). You can then reuse those custom dimensions inside custom reports & dashboards.

Click for full-size version
Once you begin to leverage all that, you can get very insightful data. Until October 2015, Yet Another Mail Merge let you send up to 100 emails per day for free. But we’ve discovered with Analytics that most people sending more than 50 emails in one campaign were actually sending 100 emails - all the free quota they could get - but we failed to motivate them to switch to our paid plan.

Click for full-size version

As a result of this insight, we have reduced this free plan to 50 emails/day and at the same time introduced a referral program, letting users get more quota for free (they still don’t pay but they invite more users so it’s interesting for us). With this change, we have greatly improved our revenue and scaled user growth.

Or course, we also use Google Analytics to track the efficiency of our referral program.

To help you get started in giving you more insight into your add-ons, below are some relevant pages from our documentation on the tools described in this post. We hope this information will help your apps become more successful:
Posted by Romain Vialard, Google Developer Expert. After some years spent as a Google Apps consultant, he is now focused on products for Google Apps users, including add-ons such as Yet Another Mail Merge and Form Publisher.

Google Cloud Messaging – We’ve Come a Long Way

Posted by Laurence Moroney Developer Advocate

Google Cloud Messaging (GCM) is a technology that provides simple and reliable messaging to devices. In the last six months, the number of messages that GCM handles has more than doubled -- to 150 billion messages per day, and the number of applications has grown 25% to 750,000. With this growth in mind, we’re continuing to improve the service with some helpful updates for developers.

Google Cloud Messaging supports topic messaging - an easy way to segment your users’ devices into groups and send a message to the entire segment at once. We’re now happy to announce that we’re allowing unlimited free topics for your app. This means app developers can place an unlimited number of devices within each topic and create an unlimited number of topics.

Moovit uses topics to efficiently scale

Moovit, a community of 30 million+ users, helps improve transit routes in cities worldwide. Using GCM, Moovit has been able to create over 60,000 topics to help users in individual cities navigate the headache of daily transit.

"We started using GCM to power our push infrastructure in a more seamless, efficient way. Not only does GCM help us to send real-time updates to a high volume of tens of millions of users, keeping them informed of any transit information they need for a stress-free commute, but we don't have to spend extra time or energy developing an infrastructure for delivery on the backend. GCM Topics allows us to message users in hundreds of cities around the world with multi-platform support for both iOS and Android."

For example: Users of London’s Underground Service were impacted by recent strikes that disrupted the regular service. While Moovit has a global audience, only those impacted were notified, as Moovit used GCM topic messaging to send the message to only those that needed it.

National Public Radio (NPR) uses Topics for news personalization

NPR is a mission-driven multimedia news organization and radio program producer in the United States. To reach their users efficiently, NPR sends and schedules personalized notifications to their listeners

via their NPR One App. For example, if you listened to the Aziz Ansari interview on the show All Things Considered, and wanted to hear more, you could subscribe to the topic ‘Aziz Ansari’ and receive a notification of his appearance on the Hidden Brain podcast. Similarly, you could subscribe to other topics such as Election 2016, Women in Combat or Pop Culture Happy Hour.

Tejas Mistrly, Mobile Product Manager for NPR, described their use of topics: “With GCM topic messaging, NPR is able to send and schedule personalized notifications to our listeners on NPR One. Whether to catch them up on the latest news or to tell them a story from a recommended podcast across public radio, GCM topic messaging gives us the tool set to send the most effective notifications that ties into our personalized radio app.”

New APIs for GCM topic management

Complementing unlimited free topics and the existing client-side API, we’re launching a new suite of server APIs that allow you to manage message subscriptions. The new APIs allow you to subscribe/unsubscribe devices individually or in batches, as well as allow retrieval of info on current subscriptions per device. We think the server-side API is a great tool to help you reduce roll-out friction, and allow for easy management and migration of subscriptions as your app grows.

To learn more about Google Cloud Messaging, visit the Google Developers Site, where you can learn more about how to build for this technology, and download sample implementations. There’s also a full reference implementation available on GitHub and the GCM Diagnostics tool for when you need help to troubleshoot.