Loading ...
Sorry, an error occurred while loading the content.

26097Re: [webanalytics] Re: GA code question

Expand Messages
  • Ramjee Ganti
    May 31, 2010
    • 0 Attachment
      Hi Massimo,
      Not sure what is the problem in your case.

      Can you stacking up multiple trackingevents one after the other. Can you try
      the following:
      i. register the code corresponding to trackevents on window.load. if you use
      jquery it is as simple as $(document).ready(function(){ <your track event
      code> });
      ii. Not sure if the following applies to you but do look at the
      implementation considerations:
      http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html#implementationConsiderations

      Hope you can get the issue resolved. I will try similar code on my blog and
      see if I can root cause (but will take a couple of days, as I can see the
      effect only after a day).


      rAm

      i Think, i Wait, i Fast -- Siddhartha
      Nabler
      www.nabler.com


      On Mon, May 31, 2010 at 6:34 AM, Massimo Paolini
      <massimopaolini@...>wrote:

      >
      >
      > Hi Jared,
      >
      > Thanks for responding, I really liked your post. Once I resolve this issue
      > I'll need categories.
      >
      > Here is the html generated from the plugin. It looks like it should be
      > working. However, by poking around in firebug, I saw and removed an older
      > test I was doing with StatsIt. I also just realized that I installed W3
      > Total cache on the test site too, could it be interfering?
      >
      > <!-- Google Analytics Tracking by Google Analyticator 6.1.1:
      > http://ronaldheft.com/code/analyticator/ -->
      > <script type="text/javascript">
      > var analyticsFileTypes = ['doc','exe','js','pdf','ppt','tgz','zip','xls'];
      > var analyticsEventTracking = 'enabled';
      > </script>
      >
      > <script type="text/javascript">
      > var _gaq = _gaq || [];
      > _gaq.push(['_setAccount', 'UA-9248008-1']);
      > _gaq.push(['_trackPageview']);
      > _gaq.push(['_setVar', 'admin']);
      >
      > setTimeout('_gaq.push([\'_trackEvent\', \'NoBounce\', \'Over 10
      > seconds\'])',10000);
      >
      >
      > <?php $posttags = get_the_tags();
      > if ($posttags)
      > {
      > foreach($posttags as $tag)
      > {
      > echo "_gaq.push(['_trackEvent','PostTag','View','$tag->name']);";
      > }
      > }
      > ?>
      >
      > (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);
      > })();
      > </script>
      >
      > Thanks,
      > Massimo
      >
      >
      > On Sun, May 30, 2010 at 9:41 AM, Jared <huber_jared@...<huber_jared%40yahoo.com>>
      > wrote:
      >
      > >
      > >
      > > Hi Massimo,
      > > Glad to see you found the tag tracking method helpful!
      > >
      > > I'm not sure exactly how the Google Analyticator plugin works. The code
      > > looks right, but the plugin may not butcher raw php from the form input.
      > >
      > > Can you paste the resulting HTML?
      > >
      > > Thanks,
      > > Jared Huber
      > >
      > >
      > > --- In webanalytics@yahoogroups.com <webanalytics%40yahoogroups.com><webanalytics%
      > 40yahoogroups.com>,
      >
      > > "Massimo" <massimopaolini@...> wrote:
      > > >
      > > > Hi all,
      > > >
      > > > Here is a simple but frustrating GA code problem.
      > > > I need to add code to a WordPress blog for tracking post tags as an
      > > event.
      > > >
      > > > The client uses WordPress and Google Analyticator.
      > > >
      > > > We started by modifying the code from this blog post:
      > >
      > http://jaredhuber.com/wordpress/track-wordpress-post-topics-in-google-analytics-using-trackevent/andthen translated it to async.
      > > >
      > > > We also used these resources and others to check the code:
      > > >
      > >
      > http://code.google.com/apis/analytics/docs/tracking/asyncMigrationExamples.htmlandother sources to no avail.
      >
      > > >
      > > > I added the following to the plugin after the tracker initialization.
      > > >
      > > > <?php $posttags = get_the_tags();
      > > > if ($posttags)
      > > > {
      > > > foreach($posttags as $tag)
      > > > {
      > > > echo "_gaq.push(['_trackEvent','PostTag','View','$tag->name']);";
      > > > }
      > > > }
      > > > ?>
      > > >
      > > > However the code breaks GA tracking all together, it's probably staring
      > > me in the face... Any suggestions?
      > > >
      > > > Thanks,
      > > > Massimo
      > > >
      > >
      > >
      > >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >


      [Non-text portions of this message have been removed]
    • Show all 8 messages in this topic