kotmyrevich / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Events are logged but not the category details and action details. #239

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
---------------------------------------------------------------------------
NOTE: This issue tracking system is for Google Analytics developer products
only.
If you are not a developer/programmer visit:
http://www.google.com/analytics/support.html
---------------------------------------------------------------------------
Name of affected component: Google Analtyics async _TrackEvent()

Name of related library and version, if applicable (e.g. Java, Python,
HTTP, Objective-C, etc.): jQuery, js

Issue summary:
I have a problem with the events track. I have included the latest tracking 
code to my sharepoint online application. And to track the user actions on the 
documents, I have a below jQuery on my master page 

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

$(document).ready(function(){

 $('a').click(function(){

 var href = ($(this).attr('href') == undefined) ? ('') : ($(this).attr('href'));
var href_lower = href.toLowerCase();

  if(href_lower.substr(-3) == "pdf" 
  || href_lower.substr(-3) == "xls"
  || href_lower.substr(-4) == "xlsx"
  || href_lower.substr(-3) == "doc"
  || href_lower.substr(-4) == "docx"
  || href_lower.substr(-3) == "ppt"
  || href_lower.substr(-4) == "pptx"
    ) {
   _gaq.push(['_trackEvent', 'document', 'download', 
             href_lower.substr(-3), $(this).text()]);
   _gaq.push(['_trackPageview', href]);
  }
);

In Google Analytics dashboard it clearly logs amount of events, but not showing 
in a detailed categories; in our case category name as ‘document’ and 
action as ‘download’ are expected on dashboard.

Steps to reproduce issue:
1.Add tracking code to your web application pages
2.Add _TrackEvent() with proper parameters similar to above snippet for 
tracking all user clicks
3.Open Events section of the dashboard and look for the category details and 
action details.

Expected output:
The logs are shown based on event category and actions

Actual results:
" There is not data for this view " for all event category, event label and 
event actions.

Notes:
Provide any additional information which might be useful here. Feel free to
attach screenshots or sample code which demonstrates the issue being
described.

Original issue reported on code.google.com by caradigm...@gmail.com on 11 Oct 2012 at 8:52

GoogleCodeExporter commented 8 years ago

Original comment by pfrise...@google.com on 10 Oct 2014 at 6:16