Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6029725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:55:44+00:00 2026-05-23T04:55:44+00:00

I would like to apply event tracking in google analytics to facebook comments made

  • 0

I would like to apply event tracking in google analytics to facebook comments made on our website via the facebook social plugin (iframe widget), but I can’t seem to find a way to attach the event. I would prefer if the solution was jquery based, but honostly I’m open to most any suggestion.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:55:44+00:00Added an answer on May 23, 2026 at 4:55 am

    You can use the Facebook JS SDK Event Subscriptions, specifically comment.create event callback.

    FB.Event.subscribe('comment.create', function(response){ 
    _gaq.push(["_trackEvent", "Facebook Comment", "Posted", response.commentID]);
    });
    

    You can also track comment deletions with comment.remove

    FB.Event.subscribe('comment.remove', function(response){ 
    _gaq.push(["_trackEvent", "Facebook Comment", "Deleted", response.commentID]);
    });
    

    I’ve tested this, and both appear to work reliably. If you have any troubles, try clearing your cache, and be sure to check the Facebook SDK Status Page.

    If you’re loading the Facebook SDK asynchronously, those calls should be placed in the asynchronous callback function. If you’re loading the SDK synchronously, they just need to be placed lower on the page than the SDK.

    The response object will have the commentID, as well as a href attribute, and a parentCommentID, if the comment is a reply to another comment (otherwise, it is set to undefined).

    The href attribute’s purpose is unclear, but its contents appear to be composed as follows:

    http://www.facebook.com/plugins/comments_v1.php?app_id=%5Byour-app-id%5D&xid=276&url=%5BencodeURIComponent(location.href)%5D

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question would probably apply equally as well to other languages with C-like multi-line
I would like to apply some function on each row of a dataframe in
I would like to know what a given control does on a given event
I would like to use Apple's Xcode IDE to develop applications on the OS
Would like to get a list of advantages and disadvantages of using Stored Procedures.
Would like to create a strong password in C++. Any suggestions? I assume it
I would like to test a string containing a path to a file for
I would like to sort an array in ascending order using C/C++ . The
I would like to have a reference for the pros and cons of using
I would like to use a language that I am familiar with - Java,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.