Official Google Analytics Integration for Share Buttons

 

Logo_Google_Analytics.svg.png

 

Shareaholic Share Buttons automatically and seamlessly integrates with Google Analytics to provide reports related to your share buttons within your Google Analytics dashboard. This article goes over instructions on how to set up, find, and use these reports.

With the help of these reports you can make sure you're using relevant social buttons and prioritize them based on what your audience is using and having the most impact in terms of driving referral volume and conversions. Track the number of referrals generated from each platform and experiment with different strategies to see what works best for your audience.

IN THIS ARTICLE

Google Analytics may take 24–48 hours to process events before data appears in most reports.  In the meantime, you can use Realtime and DebugView reports (both update in real-time) to confirm that share button related data is being collected by Google Analytics.

Tracking Referrals

Quality over Quantity. Not all shares are created equal. A casual share from a random user might generate mild interest, while a well-connected individual could potentially bring a wave of new customers. Tracking click-outs to your website is useful, but it doesn't tell the whole story. By focusing on referrals, you can track the actual impact of each share on website traffic, sales, and brand awareness. It takes just one to have a very meaningful impact on your bottom line.

Ultimately, prioritizing referrals helps us move beyond just "getting clicks" and focus on creating content that sparks authentic connections and genuine word-of-mouth buzz. This is how we attract the right customers, build loyalty, and fuel sustainable growth for our website.

What are UTM Parameters

UTM Parameters (sometimes referred to as UTM codes) are short text codes appended to a URL, which enables Google Analytics to track important data about referral traffic sources. These tracking codes can give insight into which social media platforms your site is performing best on, as well as which posts are receiving the most traffic from them.  Learn more about UTM campaign tracking here.

Examples:

Parameter Name Description Example
utm_campaign Campaign Name name of the campaign "shareaholic_share"
utm_medium Campaign Medium category of source "email", "social network"
utm_source Campaign Source the specific source "whatsapp", "pinterest"

If you're wondering what UTM stands for, it stands for "Urchin Tracking Module." The name comes from the Urchin Software Company. Google acquired Urchin in 2005 to create Google Analytics and retained the "UTM" abbreviation for backward compatibility.

How to Enable UTM Parameters for Share Buttons

With our seamless Google Analytics integration, Shareaholic makes it quick and easy to enable UTM parameters for your share buttons. You can customize the Campaign Name, Campaign Source and Campaign Medium parameters to match your marketing campaigns.

  1. Login to your Shareaholic.com account.
  2. Select a Site Profile
  3. In the Apps section, click 'Configure' next to Content Analytics
    analyticsconfigure.png
  4. Click the Social Sharing tab. This will display all the settings you can find below.
    analyticssocialsharingtab.png
  5. UTM Campaign Tracking. When enabled, you will be able to measure how much traffic is referred back to your website from the buttons. You can set your own UTM tracking parameters to match your marketing campaigns.

    share-button-utm-tracking.jpg

Template Variables available for UTM Campaign tracking:

You may use the ${service_type} and ${service_name} template variable in these fields to include the share source (e.g. facebook, whatsapp) or category (e.g. email, social network) automatically. And don't worry, you can update these settings at any time.

UTM Template Variable Description
${service_name} We will automatically replace the template variable with the specific service name ex. whatsapp (full list)
${service_type} We will automatically replace the variable with the category that corresponds to the service. Possible values include: bookmark, blog, tumblelog, email, socialnetwork, news, mobile, im, forum, tool, urlshortener.
You can combine more than one template variable in the same field. For example: "button_${service_type}_${service_name}" would yield "button_im_whatsapp".

Viewing UTM Referral reports in Google Analytics 4 (GA4):

To view related reports in GA4:

  1. Go to Reports -> Life Cycle -> Acquisition.  Here you can segment each report by your custom Shareaholic UTM parameter settings.
    social-share-buttons-utm-referral-tracking.jpg

 

Tracking Share Button Clicks

By encouraging users to refer your content, you increase the chances of your content appearing organically in front of a larger, more relevant audience. This can significantly boost traffic and sales without relying on paid advertising.

How to enable Share Button Click event tracking:

  1. Shareaholic sends an event to Google Analytics each time a visitor clicks a share button. The event is named ShareaholicShare. There is nothing to switch on in your Shareaholic settings. Tracking works automatically as long as Google Analytics 4 is installed on your site, in one of these two ways:
    1. Google tag (gtag.js). Events are sent with no further setup.
    2. Google Tag Manager. You need to add one trigger and one tag to your container. See the steps below.
  2. Google Tag Manager.  If, and only if, you're using Google Tag Manager (GTM) to load Google Analytics, you will need to setup GTM to receive Shareaholic Share Button click events and send them to Google Analytics.

    How to tell if you're using Google Tag Manager to load Google Analytics? Open "View Source" and search for "https://www.googletagmanager.com/gtag/js?id=". If you get a match, it means you are not using GTM to load Google Analytics. Instead you are setup using the Google tag (gtag.js) and can skip this step.

    To send a custom event to a Google Analytics 4 property when a user clicks a share button:

    1. Create 3 new Variables
       

      Variable Type Data Layer Variable
      Data Layer Version Version 2
        Name Data Layer Variables
      1 Shareaholic Button shrButton
      2 Shareaholic Link shrLink
      3 Shareaholic Location shrLocation


      Example:
      gtm-social-tracking-custom-variables.jpg
      Once setup, your 3 new variables might look like this in the summary:
      gtm-social-tracking-custom-variables-summary.jpg
       

    2. Create a Trigger
      gtm-social-tracking-custom-share-event.jpg
       

      Name Shareaholic Share Event
      Trigger Type Custom Event
      Event Name ShareaholicShare
      Trigger Fires on... Some Custom Events
      Fire Trigger When... Event equals ShareaholicShare
    3. Create a GA4 Event Tag
      gtm-social-tracking-events.jpg
       

      Name GA4 Event - Share Button Click
      Tag Type Google Analytics: GA4 Event
      Event Name ShareaholicShare
      Event Parameters shrButton = {{Shareaholic Button}}
      shrLink = {{Shareaholic Link}}
      shrLocation = {{Shareaholic Location}}
      Firing Trigger Shareaholic Share Event

Once your changes are saved and deployed, GTM will automatically send share button click events to Google Analytics.

Google Analytics may take 24–48 hours to process events before data appears in most reports.  In the meantime, you can use Realtime and DebugView reports (both update in real-time) to confirm that share button related data is being collected by Google Analytics.

Setup GA4 Custom Dimensions [OPTIONAL]

To track button clicks actions Shareaholic sends Custom Events ("ShareaholicShare") along with custom parameters to Google Analytics when a button is clicked.  Event parameters provide more details about the action, like which link was shared and where. Each ShareaholicShare event contains the following custom parameters:

Parameter Description Example
shrButton share service/button clicked pinterest
shrLink URL of link shared https://amazon.com/product/
shrLocation share button placement identifier floated_share_buttons
event_label share service/button clicked pinterest
event_category event category shareaholic

To access some of these custom values assigned to an event parameter in your GA4 reports, you will need to create custom dimensions in your GA4 Admin settings. A custom dimension lets you see and segment reports with the information you have collected from an event parameter. Custom dimensions can also be used in advertising and remarketing campaigns. Learn more about custom dimensions.

  1. Go to Admin -> Data Display -> Custom definitions
    ga-custom-dimensions-definitions.jpg

     
  2. Add Custom Dimensions. Add the ones you want from the table above:
    ga4-custom-dimension-share-buttons.jpg
  3. Once the custom dimension is defined, you will be able to segment reports on custom event parameters:
    ga4-custom-dimension-share-buttons-select.jpg

Viewing Share Button Click reports in Google Analytics 4 (GA4):

To view related reports in GA4:

  1. Go to Reports -> Life Cycle -> Engagement -> Events. Here you will find the "ShareaholicShare" event.

    ga4-share-button-tracking.jpg
  2. Click "ShareaholicShare" to view event details.

Not seeing events?

  • Ad blockers and privacy extensions can stop Google Analytics in your own browser. Try a private window with extensions turned off.
  • Google Tag Manager: check that your container is published and that the trigger's event name is exactly ShareaholicShare.
  • Consent tools: if your site waits for visitor consent before loading Google Analytics, clicks made before consent are not tracked.
Was this article helpful?
20 out of 30 found this helpful