1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Tracking Feedburner Form Submissions in Google Analytics

Discussion in 'JavaScript and AJAX' started by shabbir, Apr 10, 2012.

  1. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Feedburner statistics are not part of Google Analytics and I couldn't understand why but you can track Feedburner Email Subscription Form Submission in Google Analytics Very easily.

    Activate Email Subscription for your Feed in Feedburner and grab the HTML code of your subscription form. The HTML code should look like this.

    [​IMG]

    Now insert the onclick handler code for submit button to track form submissions in Google Analytics. The onclick event handler code is

    HTML:
    onclick="javascript:_gaq.push(['_trackPageview','/formsubmission/feedburner']);"
    So

    HTML:
    <input type="submit" value="Subscribe" />
    Becomes

    HTML:
    <input type="submit" value="Subscribe" onclick="javascript:_gaq.push(['_trackPageview','/formsubmission/feedburner']);" />
    Tracking works with the latest code of Google Analytics and you can see the tracking in action for my blog in the screenshot below.

    [​IMG]

    If you have multiple forms on a page and want to track submissions of each of them separately you can either change the tracking string like

    HTML:
    onclick="javascript:_gaq.push(['_trackPageview','/formsubmission/feedburner-sidebar']);"
    or like
    HTML:
    onclick="javascript:_gaq.push(['_trackPageview','/formsubmission/feedburner/sidebar']);"
    HTML:
    onclick="javascript:_gaq.push(['_trackPageview','/formsubmission/feedburner/afterpost']);"
    If you have any queries or questions, do share them in comments below.
     

Share This Page