This guide provides an overview of how social interactions work across the Google Analytics platform.
More
|
Overview
Many social networks provide embeddable buttons and widgets that allow users to easily share content from the web or from an app. Examples of these buttons include the Google+ "+1" button, or the Facebook "Like" button.
User interactions with these embedded social buttons represent social interactions with your content. These social interactions are valuable signals of user engagement and can be measured using Google Analytics.
What Are Social Interactions?
In Google Analytics, user interactions with social buttons and widgets are called social interactions. By measuring social interactions, you can gain additional insight into user engagement with your content.
Understanding Social Interactions
The lifecycle of social interactions in Google Analytics extend over two relevant sections of the processing pipeline:
- Collection – social interaction data is sent to Google Analytics as users interact with embedded social buttons and widgets.
- Reporting – social interaction dimensions and metrics become available in the web interface and via the Core Reporting API.
The following sections describe in detail how social activities data interacts with the Google Analytics platform at each of those stages.
Collection
A social interaction, like a pageview, screen view, or an event, is a unique hit type that includes a set of unique values to describe the social interaction.
The Data Model
A social interaction in Google Analytics is represented by the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
| socialNetwork | string
| Required | The social network being measured (e.g. Facebook, Twitter, Google+, etc.). |
| socialAction | string
| Required | The social action the user is taking, e.g. “Like�?, “Share�?. |
| socialTarget | string
| Optional | The content on which the social action was taken, e.g. the path of an article or video. |
Measurement
A social interaction should be measured when a user completes an interaction with an embedded social button or widget. Examples of social buttons include Facebook “Like�? buttons or Google+ “+1�? buttons.
For example, a developer could measure the interaction of a user with Twitter share button on a web page using the following values:
article_5555 is shared using an embedded
Twitter share button. The share is measured as a social interaction in
Google Analytics.Each button or widget may have its own API with which developers need to integrate with to measure social interactions. Developers should refer to the API documentation provided by each social network for more information on how best to integration.
Collecting Social Interactions
Developers can collect social interaction data using the following client libraries or protocols:
Web: ga.js
Web: analytics.js
Android SDK
iOS SDK
Measurement Protocol
Reporting
After processing, social interaction data can be accessed via the Social Plugin report or custom reports in the web interface, or via the Core Reporting API.
The following are the social interaction dimensions and metrics available in Google Analytics:
Social Interaction Dimensions
| Web Interface | Core Reporting API | Description |
|---|---|---|
| Social Source | ga:socialInteractionNetwork | a value representing the social network being tracked (e.g. Google, Facebook, Twitter, LinkedIn) |
| Social Action | ga:socialInteractionAction | a value representing the social action being tracked (e.g. +1, like, bookmark) |
| Social Source and Action | ga:socialInteractionNetworkAction | a value representing the concatenation of the social network and action
measured (e.g. Google: +1, Facebook: Like |
| Social Entity | ga:socialInteractionTarget | a value representing the URL (or resource) which receives the social network action. |
Social Interaction Metrics
| Web Interface | Core Reporting API | Description |
|---|---|---|
| Social Actions | ga:socialInteractions | The total number of social interactions. |
| Unique Social Interactions | ga:uniqueSocialInteractions | Number of sessions during which the specified social action(s) occurred at least once. Based on unique combination of network, action, and target. |
| Actions per Social Session | ga:socialInteractionsPerSession | The number of social interactions per session. |
For the complete list of social interaction dimensions and metrics available via the Core Reporting API, see the Core Reporting API Social Dimensions and Metrics reference.
Example: Measuring Social Interactions
The following end-to-end example will show how values are collected, processed, and made available via the various social interaction dimensions and metrics.
Collection
In this example, a single user shares two different articles from a website using an embedded Twitter "share" button. At collection time, the developer sends two social interactions to Google Analytics, once after each "share" is completed, with the following values:
Reporting
After processing, a custom report that uses social entity as the dimension and each of the social action metrics would look like this:
| Social Entity | Social Actions | Unique Social Actions | Actions per Social Session |
|---|---|---|---|
| /articles/2012/june/article?id=5555 | 1 | 1 | 2 |
| /articles/2012/june/article?id=6000 | 1 | 1 | 2 |
On the other hand, a custom report that used Social Action as the dimension with the same social action metrics used above would look like this:
| Social Action | Social Actions | Unique Social Actions | Actions per Social Session |
|---|---|---|---|
| Twitter / Share | 2 | 1 | 2 |
Unique Social Actions
In the example above, note that there is only one unique social action
attributed to the network / action combination Twitter / Share.
Even though the user interacted with two separate Twitter share buttons,
they both had the network / action combination of Twitter / Share,
which results in a single unique social action in the reports.
Actions per Social Session
Lastly, in the same example above, note that Actions per Social Session is
calculated by dividing the total number of Social Actions, in this case, 2, by
the number of unique social actions, in this case, 1.