Results 1 to 5 of 5

Problems with Google Analytics

This is a discussion on Problems with Google Analytics within the Bug Reporting forums, part of the vBSEO SEO Plugin category; I'm having problems with the following scenarios, when Google Analytics is setup through vBSEO to distinguish usergroups: Usergroups with apostrophes ...

  1. #1
    Member
    Real Name
    Ted
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    54
    Liked
    0 times

    Problems with Google Analytics

    I'm having problems with the following scenarios, when Google Analytics is setup through vBSEO to distinguish usergroups:


    • Usergroups with apostrophes in the title. This breaks Javascript on the page.
    • Usergroups with HTML tags in the title. The HTML gets encoded, but the W3C validator still fails. The HTML isn't really needed for analytics, so couldn't strip_tags just be used?
    - the makers of VaultWiki

  2. #2
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    Use
    Code:
    & #39;
    without the space (it will parse otherwise)
    see: '

    in the vb field. As these are Raw feilds in admin cp, they are not parsed to html_entities.

  3. #3
    Member
    Real Name
    Ted
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    54
    Liked
    0 times
    That will only help the first issue, and isn't a real fix. The other fields added to analytics tracking have addslashes used on them, why not this?
    - the makers of VaultWiki

  4. #4
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    Please try to modify functions_vbseo.php file:
    FIND:
    PHP Code:
    $more_tracking[] = "['_setVar', 'usergroup-".(vbseo_vb_userinfo('usergroupid').'-'.htmlspecialchars($grouptitle))."']"
    REPLACE WITH:
    PHP Code:
    $more_tracking[] = "['_setVar', 'usergroup-".(vbseo_vb_userinfo('usergroupid').'-'.addslashes(htmlspecialchars(strip_tags($grouptitle))))."']"

  5. #5
    Member
    Real Name
    Ted
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    54
    Liked
    0 times
    Thanks, this worked for me.
    - the makers of VaultWiki

Similar Threads

  1. vBulletin 3.x Some problems with Analytics
    By caracena in forum Troubleshooting
    Replies: 2
    Last Post: 02-08-2010, 01:43 PM
  2. Replies: 5
    Last Post: 02-05-2007, 08:58 AM
  3. Google Analytics Funnel problems
    By lafsunlmtd in forum General Discussion
    Replies: 8
    Last Post: 06-21-2006, 01:49 PM
  4. Whats the next best analytics tool besides google analytics?
    By K4n4Dian-H4x0r in forum Analysis: Traffic & SERPS
    Replies: 3
    Last Post: 12-06-2005, 05:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •