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

  • SEARCH
  • Home
  • 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

I would like to apply successive animations (say ScaleAnimation) to an ImageView showing a
I would like to apply FileIOPermission on set of files using mask in file
I am using TortoiseHg and would like to apply a hook to my repo.
I have some auto-instantiation code which I would like to apply to about 15
I have a HtmlHelper extension method that I would like to apply some logic
I would like to do some exercice and apply DDD to my Domain Model
I would like to know if there is any way I can apply 100%
This question would probably apply equally as well to other languages with C-like multi-line
Being new to Scala (2.9.1), I have a List[Event] and would like to copy
I would like to know what a given control does on a given event

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.