Cardinal Path’s response to COVID-19 Cardinal Path is sharing all we know to help marketers during COVID-19.  Learn more.

So it looks like Google gave me something new to write about right away: _tracksocial. An event by any other name tracks as well, and so _tracksocial tracks much as any event does – utm.gif call and all.

Nick Iyengar points out that tracksocial doesn’t seem to add much that you couldn’t already do with events. However, as he also notes, having a dedicated set of reports for social interactions both gives room for social to grow, as well as providing some nice clean reports to work with. It also introduces a whole bunch of utm.gif calls and settings for analytics geeks to play with.

In this post we’re going to explore some of those.

Setting It Up

Google provides a wonderful table, which I have reproduced below (might want to look at Google’s as I just noticed this is unstyled), illustrating the parameters involved with _tracksocial.

_trackSocial(network, socialAction, opt_target, opt_pagePath)

network (String)The network on which the action occurs (e.g. Facebook, Twitter)
socialAction (String)The type of action that happens (e.g. Like, Send, Tweet).
opt_target (String) Optional.The text value that indicates the subject of the action; most typically this is a URL target. If undefined, defaults todocument.location.href. For example, if a user clicks the Facebook Like button for a news article, the URL for that news article could be sent as the string. You could also supply any other ID identifying the target, such as an ID from your content management system. As another example, a user could click the Like button next to a blog post, in which case no value need be sent for this parameter because the current document location URL is sent by default.

Note: If you want to leave this value undefined at the same time you want to supply a value for the next parameter (opt_pageUrl), you must specify undefined in your code.
opt_pagePath (String) Optional.The page (by path, not full URL) from which the action occurred. If undefined, defaults todocument.location.pathname plus You will only need to supply a value for this string if you use virtual (or custom) page paths for Analytic reporting purposes. When using this option, use a beginning slash (/) to indicate the page URL. For more information, see “Virtual URLs” in Typical Customizations.

How it works

_tracksocial functions by making a gaq.push call, sending a utm.gif to Google Analytics. You can check out the utm.gif call it makes at the Google Analytics Social Tracking Demo. I’ve also included a sample below.

With this request we get the following new parameters, and very little documentation on what they do.

utms: Technically not new since I see references to it online going back to April. It appears to be some kind of internal counter, but I don’t know what it tracks. Some claim that once it hits 500, GA no longer makes utm.gif requests.

utmsn: Social network, I am guessing. Labels the campaign that the request is associated with the “network” string above.

utmsa: The social action taken. Or at least so I assume.

utmsid: I am guessing the path defined by opt_pagePath

Confirming these with our coders now, and Monday I should have some firmer details on what each of these are, so check back.