AddToAny & Google Analytics

AddToAny automatically integrates with Google Analytics to provide sharing statistics within your analytics dashboard.

Getting Stats from Social Interaction Tracking

To access sharing stats for shares, saves, emails and more, start in Acquisition > Social > Plugins. Shares via AddToAny have a Social Network attributed to AddToAny, where each social destination is considered an Action in Google Analytics.

For example, you can view the top sharing destinations via AddToAny by choosing Plugins and the Primary Dimension titled Social Network and Action. Using the Segment Builder, you can filter social reports by Mobile & Tablet Traffic, Paid Traffic, Search Traffic, Organic Traffic, New Users, Returning Users, Made a Purchase, and many other custom segments.

You can email a report on a recurring basis, such as daily, weekly, monthly, or quarterly.


Google Tag Manager Setup

A setup process is necessary for tracking shares in Google Analytics with Google Tag Manager.

  1. New Variable named "Social Network"
    • Data Layer Variable Name =
      socialNetwork
  2. New Variable named "Social Action"
    • Data Layer Variable Name =
      socialAction
  3. New Variable named "Social Target"
    • Data Layer Variable Name =
      socialTarget
  4. New Trigger named "AddToAny Share Event"
    1. Custom Event
    2. Event name =
      AddToAnyShare
    3. Fire this trigger when…
      Event equals AddToAnyShare
  5. New Tag for Google Analytics
    1. Track Type = Social
    2. Network = "Social Network"
    3. Action = "Social Action"
    4. Action Target = "Social Target"
    5. Fire On = "AddToAny Share Event"

Using AddToAny event handling JavaScript, configure AddToAny to track shares in Google Analytics on a share event:

    var a2a_config = a2a_config || {};
    a2a_config.callbacks = a2a_config.callbacks || [];
    a2a_config.callbacks.push({
        share: function(data) {
            // Track shares in Google Analytics with Google Tag Manager
            dataLayer.push({
                'event': 'AddToAnyShare', 
                'socialNetwork': 'AddToAny', 
                'socialAction': data.service, 
                'socialTarget': data.url
            });
        }
    });