Social Interaction tracking via Google Analytics

Discussion in 'Google Analytics' started by Ujjwal Dalmia, May 19, 2014.

  1. #1
    I am a new born in understanding Google Analytics and trying to track social interactions on my wordpress blog.

    I have installed a wordpress plugin (facebook like button plugin) on my blog page which shows a like button on every post.

    In order to find out which post is the most liked post, i added following code in my header.php file just after the Google Analytics Universal Tracking code.

    FB.Event.subscribe('edge.create',function(targetUrl){
    ga('send','social','facebook','like', targetUrl);});


    I am not sure if what i have done is correct or not but this is not tracking any likes for me.

    Can someone please help me in correctly placing the correct code at the right place. I have read multiple blogs but in those blogs no one is using plugins to enable the like button.

    Please help.

    Regards
    Ujjwal Dalmia
     
    Ujjwal Dalmia, May 19, 2014 IP