John Huebner
Forum Replies Created
-
Forum: Plugins
In reply to: [Blunt GA] W3 Total Cache Broke my AnalyticsWhen I inspect your site using firebug I see 2 copies of ga.js being loaded. It looks to me like you also have Google Analytics for WordPress by Yoast installed and active. Try deactivating that plugin and maybe removing it from you site.
If I was running on an Apache server I would create a rewrite rule to rewrite all requests for PDF files or other types of downloadable documents to the script.
Example:
RewriteRule ^(.+\.pdf)$ /my-document-loader.php?file=$1
Forum: Plugins
In reply to: [Blunt GA] How to use ga.jsYou’re welcome.
Honestly glad you brought up the problem. We use this for all of our clients and I was unaware that the event tracking had stopped working. It wouldn’t have been till the next review before we noticed it.
Forum: Plugins
In reply to: [Blunt GA] How to use ga.jsI’m uploading a new version now.
Between my rush to fix the bug and it being past my bed time I failed to include a required file.
Forum: Plugins
In reply to: [Blunt GA] How to use ga.jsI have uploaded a new version that should correct the event tracking issue. For more details see the topic about event tracking problem.
Forum: Plugins
In reply to: [Blunt GA] Problem with Event TrackingProblem with event tracking should be corrected with version 3.1.0
What cause the problem? Not exactly sure. Some time after the last time I checked details on accounts event tracking as events stopped working while tracking as page views continued to work. I tracked the problem to aborted pings to google when a link was opened. There was a delay in the script that was allowing the ping to complete before the link was opened. For some reason this delay stopped working.
The JavaScript now uses a different method to create this delay that allows the ping to complete before the link is opened.
Hopefully this laps in event tracking did not cause anyone too many problems.
Forum: Plugins
In reply to: [Blunt GA] How to use ga.jsIt appears there is a problem with event tracking, I’m working on a fix for it now. More details here.
Forum: Plugins
In reply to: [Blunt GA] How to use ga.jsTesting now.
Forum: Plugins
In reply to: [Blunt GA] How to use ga.jsga.js is the older code snippet and looks something like this:
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-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); })(); </script>The new version that is in public beta is analytics.js. The code snippet for it looks something like:
<!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXX-Y'); ga('send', 'pageview'); </script> <!-- End Google Analytics -->At this time, if you have you site set up to use either of them you can’t convert Google Analytics Dashboard to use the other one.
However, you can set up two properties in you Google Analytics Dashboard and track your site using both types. This is what Google is recommending.
Here’s an article about it: http://analytics.blogspot.com/2013/03/expanding-universal-analytics-into.html.
Hope this information helps.
I have plans to expand this plugin to work with the new tracking script as well as keep it compatible with the current script, I just haven’t gotten there yet.
Forum: Plugins
In reply to: [Blunt GA] Faw in Cross Domian TrackingUpdated to version 3.0.0 corrected this problem.
If you have any questions about setting up cross site tracking or need help setting it up, please start a new support topic.
Forum: Plugins
In reply to: [Blunt GA] Flaw in Cross Site LinkingThis issue was corrected in version 2.0.0 Please see documentation on settings page for this plugin for details.
Forum: Reviews
In reply to: [Any Mobile Theme Switcher] Does not play well with others and Poor supportI did post it on your forum a couple of days after posting here
http://dineshkarki.com.np/forums/topic/any-mobile-theme-switcher-interferes-with-session-values-in-other-pluginsI will test it out if I ever have need to use this again. I prefer using responsive design rather than switching themes. I inherited the site that uses the plugin and then removed it and switched to a responsive design when I could not get another plugin to work do to interference with session values.
That, i don’t know, sorry I couldn’t help more.
In my case I knew that this would be more work than I wanted to invest for a single site I inherited. It was much more cost effective to use a single theme and make it responsive. Like I said, responsive design with CSS is a better option than loading different themes. There are also plenty of responsive themes available now.
You might want to try the developers other support forum, the link is on the description page for the plugin. But I posted this problem there and got no more response to it there than I got here.
The sad part is that this plugin appears to have been updated just 2 days ago and neither this thread or the one I posted on the developers support forum got any response.
I never actually got this fixed. There are more problems than just when session start is called in this plugin.
The problem is that the session is started and session values set when the plugin is loaded. Then, the session is completely destroyed when WP does it’s normal initialization, which happens after the plugin file is loaded.
What has to happen with this plugin is that all actions need to be deferred until init.
here is basically what needs to be done…
Everything in the plugin file starting on line 13 and running through line 106 needs to be put into a function. Lets call it start_theme_switcher. Then, instead of calling the session starter function like I indicated before you would create an init action to call this new function
/* Plugin Name: Any Mobile Theme Switcher Plugin URI: http://dineshkarki.com.np/any-mobile-theme-switcher Description: This plugin allow you to detect all mobile platform and switch the theme. Supports most of the mobile platform including iphone, ipad, ipod, windows mobile, parm os, blackberry, android, andriod tab. Author: Dinesh Karki Version: 1.0 Author URI: http://www.dineshkarki.com.np */ /* Copyright 2012 Dinesh Karki (email : dnesskarki@gmail.com)*/ add_action('init', 'start_theme_switcher', 1); function start_theme_switcher() { if (!session_id()){ session_start(); } // ... // all code up until about line 107 // ... } // end function start_theme_switcher // the following is the code that follows // where you would end the function. function loadMobileStyle(){ global $mobile_browser; $mobileTheme = $mobile_browser; $themeList = get_themes(); foreach ($themeList as $theme) { if ($theme['Name'] == $mobileTheme) { return $theme['Stylesheet']; } } }Now, I can’t be 100% certain this will work because I have not completely read all the code. But, if I were going to do this, that is where I’d start and then debug from there.
The better solution, and the one that we used, was to rebuild the main theme to be responsive and then we removed this plugin.