R is increasingly popular with web analysts due to its powerful data processing, statistics and visualisation capabilities. A large part of R’s strength in data analysis comes from its ever increasing range of open source packages. googleAnalyticsR allows you to download your Google Analytics data straight into an R session, which you could then use with other R packages to create insight and action from your data.
As well as v3 API capabilities, googleAnalyticsR also includes features unique to v4:
- On the fly calculated metrics
- Pivot reports
- Histogram data
- Multiple and more advanced segments
- Multi-date requests
- Batched reports
The library will also take advantage of any new aspects of the V4 API as it develops.
Start up RStudio, and install the package via:
This will install the package on your computer plus any dependencies.
After successful installation, you can load the library via library(googleAnalyticsR), and read the documentation within R via ?googleAnalyticsR, or on the package website.
An example API call — calculated metrics
Once installed, you can get your Google Analytics data similarly to the example below, which fetches an on-the-fly calculated metric:
# authenticate with your Google Analytics login
# call google analytics v4
ga4 <- google_analytics_4(viewId = 123456,
date_range = c(“2016-01-01”,
metrics = c(calc1=’ga:sessions /
dimensions = ‘medium’)
See more examples on the v4 help page.
Segment Builder RStudio Addin
One of the powerful new features of the v4 API is enhanced segmentation, however they can be complicated to configure. To help with this, an RStudio Addin has been added which gives you a UI within RStudio to configure the segment object. To use, install the library in RStudio then select the segment builder from the Addin menu. ￼
Create your own Google Analytics
Dashboards googleAnalyticsR has been built to be compatible with Shiny, a web application framework for R. It includes functions to make Google Analytics dashboards as easy as possible, along with login functions for your end users. ￼
Example code for you to create your own Shiny dashboards is on the website.
BigQuery Google Analytics 360 exports
In addition to the v4 and v3 API functions, BigQuery exports from Google Analytics 360 can also be directly queried, letting you download millions of rows of unsampled data.
Aimed at analysts familiar with Google Analytics but not SQL, it creates the SQL for you to query common standard metrics and dimensions, using a similar interface as the API calls. See the BigQuery section on the website for more details.
To more easily fetch non-sampled data, googleAnalyticsR also features an anti-sampling flag which splits the API calls into self-adjusting time windows that are under the session sampling limit. The approach used is described in more detail here.
If you have any suggestions, bug reports or have any ideas you would like to contribute, then you are very welcome to raise an issue or submit a pull request at the googleAnalyticsR Github repository, or ping me on Twitter at @HoloMarkeD.
Posted by Mark Edmondson, Google Developer Expert
As Slack’s rapid growth begins to slow a little bit, the company is looking to become a wider productivity platform — and that includes getting as many developers as it can building applications that can figure out new and unique use cases for it.
That’s part of the reason it established the Slack Fund, which makes investments in startups that are building tools on top of Slack. Read More
Enterprise – TechCrunch
Learn how a PPC promo template using excel can be an amazing friend for your ecommerce PPC account (and you) to lean on.
Read more at PPCHero.com
Analyst Gartner is projecting flat growth for worldwide device shipments; it says the combined shipments of PCs, tablets, ultramobiles and mobile phones will total just 2.3 billion in 2017, the same as 2016 estimates — with no growth in these so-called “traditional” computing devices expected until 2018. Read More
Houseparty is a new group video chat app that was built by the founders of ex-livestreaming app Meerkat. The app provides a space to video chat with friends – once you open the app you can just pop in other friends group video chats, or wait for friends to join yours. But currently the app notifies all of your friends (who are Houseparty users) with a push notification each time you… Read More
Social – TechCrunch
The future of searches on the Web will likely involve searches by voice, as more and more people are connecting to the web with phones and Google has added voice search interfaces to its search on desktop computers.
I thought it was interesting when I ran across a patent that focused on a problem that might arise with spoken searches, and thought it was worth writing about because it’s something that we will need to become acquainted with as it becomes more commonplace.
When Amit Singhal showed off Google’s hummingbird update, he gave a presentation that showed Google handling searches involving pronouns. It’s worth watching for the information about Hummingbird, but also about how Google is becoming more conversational. The video is at:
I remembered the presentation about hummingbird and a more conversational Google, when I saw this patent come out from Google, which explains some of the technology behind aspects of conversational search:
Resolving pronoun ambiguity in voice queries
Inventors: Gabriel Taubman and John J. Lee;
US Patent 9,529,793
Granted: December 27, 2016
Filed: February 22, 2013
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for resolving ambiguity in received voice queries. An original voice query is received following one or more earlier voice queries, wherein the original voice query includes a pronoun or phrase. In one implementation, a plurality of acoustic parameters is identified for one or more words in the original voice query. A concept represented by the pronoun is identified based on the plurality of acoustic parameters, wherein the concept is associated with a particular query of the one or more earlier queries. The concept is associated with the pronoun. Alternatively, a concept may be associated with a phrase by using grammatical analysis of the query to relate the phrase to a concept derived from a prior query.
I did write about some papers that Google researchers had written about pronouns in the post Searching with Pronouns: What are they? Coreferences in Followup Queries
But, the granted patent from this week had an example that was worth sharing about an aspect of conversational search that wasn’t covered in one of those papers. Here is the example:
A voice query asks: “Who was Alexander Graham Bell’s father?”
The answer: “Alexander Melville Bell”
A followup voice query: “What is HIS birthday?”
The answer to the followup query: “Alexander Melville Bell’s birthday is 3/1/1819”
The point behind this patent is that the search engine decided that it should tell the searcher the birthdate for the inventor’s father. This was done based upon the fact that the “HIS” in that second query was stressed, to indicate that it was about the father, and not son mentioned in that first query.
The patent tells us of a “stress score” for spoken words or phrases in a voice query that could include “volume, pitch, frequency, duration between each spoken words, and spoken duration of words or phrases,” and it tells us that “By comparing the stress score for the pronoun to a threshold, an implementation may determine that the stress score indicates that the pronoun is stressed or not.”
The impact of a stressed query? The patent says, “For example, if a pronoun is stressed, it may indicate that it refers to a concept from an immediately preceding query, while a pronoun that is not stress may refer to a concept from a query that occurred earlier in a series of received queries.” It’s an interesting assumption that does sound like it uses how people actually convey information during inqueries when they are having conversations. The patent does tell us about some of the science behind this determination:
For example, if the absolute measure for the volume of the pronoun is 80 dB and the average volume for the other words in voice query is 60 db, the ratio of the volumes is 1.33. This relative volume measure for the pronoun indicates that the volume of the pronoun is 33% greater than the volume of the rest of voice query. Alternatively, the relative measures can be a difference between the acoustic parameters for the pronoun and the acoustic parameters for the other words in voice query. For example, if the absolute measure for the time duration of the pronoun is 80 ms and the average time duration of the other words in voice query is 50 ms, the difference in the time duration is 30 ms. This relative time duration measure for the pronoun indicates that the time duration of the pronoun is 30 ms more than the average time duration for the words in voice query. Alternatively, the relative measures of the acoustic parameters for the pronoun can be relative to the acoustic parameters for only the words that immediately proceed and follow the pronoun.
The patent provides some other examples of how stresses might be understood, including how grmmatical differences may play a role.
It is interesting that these types of things may influence spoken queries. If you’ve been wondering about how Google might understand pronouns, now you have an idea of how it could understand stresses.
Copyright © 2017 SEO by the Sea. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at may be guilty of copyright infringement. Please contact SEO by the Sea, so we can take appropriate action immediately.
Plugin by Taragana
The post Google and Spoken Queries: Understanding Stressed Pronouns appeared first on SEO by the Sea.
Even economy class will someday feel a bit softer, a bit warmer, a bit faster, a bit easier to sleep in. Mostly. The post Coming Innovations That Will Make Flying Economy (Mostly) Better appeared first on WIRED.
Twitter is taking another step into getting into live video by introducing 360-degree live streams through Periscope. Anyone on Twitter and Periscope can watch 360-degree live video, though currently only select partners can go live in 360 via Periscope, the company announced in a blog post. While it’s only available for a limited number of partners for now, it makes sense that Twitter… Read More
Social – TechCrunch
After opening to much fanfare three years ago, Coca-Cola is shutting down The Founders program, according to a published report in Innovation Leader. Under this program, the company nurtured young startups, hoping to siphon some of that entrepreneurial energy and pass it along to the big lumbering corporation. Over the last several years, companies have recognized the need to innovate, and… Read More
Enterprise – TechCrunch