About Social plugins and interactions

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.

In this article:

Data 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:

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.


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:

Measuring a social interaction: An article with a content ID of 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.

Note: Google+ Badges and +1 Buttons are automatically tracked when using ga.js on the same page.

Collecting Social Interactions

Developers can collect social interaction data using the following client libraries or protocols:

Web: ga.js
Web: analytics.js
Android SDK
Measurement Protocol


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.


The following end-to-end example will show how values are collected, processed, and made available via the various social interaction dimensions and metrics.


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:

Example: A user interacts with embedded Twitter share buttons on two separate articles during a single session.


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.

Was this article helpful?