Tracking social actions in Google Analytics for My World from

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Good afternoon, friends!

For anybody not a secret that Google Analytics does an excellent job with many interesting challenges. Among the latest innovations — tracking of social action ( ). For Google +1 it works, as they say, out of the box.

To track Facebook and Twitter need to pocalypse, but Google made live examples ( ).

If a little more straining your brains, you can do tracking and VK ( ).

But for the full picture lacks the rest of the social networks My World and Classmates. Of course, I understand that they are not as popular, but still, I want to "finish" them!

So, Mailru gives buttons

They have their own API

There is a guide to use —

List of functions

Example of use

And the most valuable event —

So, the goal is to capture the event that can be liked, unliked in the Google Analytics counter.

Anyone have practice set up?

PS Procolophonia this thing for two days, today finally managed asynchronously load js and it even worked. But while the test results did not appear in GA. But I decided to ask the knowledgeable, svaki case.

Many thanks in advance for your help and your answers!
by | 29 views

1 Answer

0 like 0 dislike
I found this code:
mailru.loader.require('api', function() { mailru.connect.init('siteid', 'privatecode'); });
_ga.trackmymail=function(opt_pageUrl, opt_trackerName){
try {
if (mailru && && {, function(event, params) {
var button_type = _ga.extractParamFromQuery_(params, "type") || 'mymail';
if (button_type) {
_gaq.push(["_trackSocial", button_type, 'like', opt_targetUrl, opt_pageUrl]);
});, function(event) {
_gaq.push(["_trackSocial", 'mymail', 'unlike', opt_targetUrl, opt_pageUrl]);
} catch (e) {}
In head it is necessary to add the download script
110,608 questions
257,187 answers
40,251 users