#1626 Use GA Custom Fields to track "logged in" user activity

v1.0.0
closed
sf-2 (994)
General
nobody
2015-08-20
2011-03-03
Mark Ramm
No

In the Visitor scope track userid:123456 or something like that, so we can do a GA report on only logged in users.

SFX, SFPY, and Allura

Discussion

  • Mark Ramm - 2011-03-03
    • milestone: limbo --> backlog
     
  • Mark Ramm - 2011-07-08
    • milestone: backlog --> jul-15
     
  • Dave Brondsema

    Dave Brondsema - 2011-07-08
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,1 +1,3 @@
    -In the Visitor scope track status:logged-in or something like that, set from the login page, so we can do a GA report on only logged in users. 
    +In the Visitor scope track userid:123456 or something like that, so we can do a GA report on only logged in users.
    +
    +SFX, SFPY, and Allura
    
    • size: --> 2
     
  • Anonymous - 2011-07-13

    Originally by: algorithms

    • assigned_to: Wayne Witzel III
     
  • Anonymous - 2011-07-20

    Originally by: algorithms

    This one turned out to be a fun adventure. Sorry it took so long, but I learned a lot in the process and managed to dip my toe in to each code base a little bit.

    ww/1626 is the branch. This story is in sfx, sfpy, forge, and sftheme
    No automated test were created for this story.
    Manual testing was performed on my sandboxes as outlined.

    The magic numbers in the Javascript itself were taken from: http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html

    Most of the GA code is disabled when running in debug mode, so ensure you have that set to false. Also if testing locally you will need to set the config.get('dist_google_analytics') value to enable GA code for sfpy.

    • Browse the site anonymously. View source. Search for gaq. There should be no userid push.
    • Login as a user. Check the following pages for the new GA userid tracking.
    • Browse to a sfx page (I just reloaded /account/login.php)
    • Browse to a sfpy page (I used the Home page)
    • Browse to a forge page (I used /p)

    The tracking code itself looks like this: _gaq.push(['_setCustomVar', 2, 'userid', '1000', 1]);

    • status: in-progress --> code-review
    • assigned_to: Wayne Witzel III --> John Hoffmann ☠
     
  • John Hoffman - 2011-07-25

    sfx, sfpy, sftheme, allura merged to dev.

     
  • John Hoffman - 2011-07-25
    • status: code-review --> closed
     

Log in to post a comment.