niska
Forum Replies Created
-
I didn’t think Google Analytics required jQuery. But if it does and you use jQuery in your plugin – are you using wp_register_script() to add jquery as a dependency?
Thank you for your reply.
It seems the script is correct:
<script type="text/javascript">(function($){$(window).load(function(){$('a').filter(function(){return this.href.match(/.*\.(zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*)(\?.*)?$/);}).click(function(e){ga('send','event','download','click',this.href);});$('a[href^="mailto"]').click(function(e){ga('send','event','email','send',this.href);});$('a[href^="http"]').filter(function(){if(!this.href.match(/.*\.(zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*)(\?.*)?$/)){if(this.href.indexOf('mydomain.com')==-1)return this.href;}}).click(function(e){ga('send','event','outbound','click',this.href);});});})(jQuery);</script> <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','https://www.google-analytics.com/analytics.js','ga');ga('create','UA-XXXXX-26','auto');ga('send','pageview');</script>I’ve logged out of WordPress and clicked an external link. But can not see anything in Google Analytics.
I’ve added the URL to my profile. Thanks for your help!
Forum: Plugins
In reply to: [FeedWordPress] Prioritize what feeds that are polled for updatesI’m still trying to modify the update/window. Does anyone know how to do this?
I forgot to mention that I only get my specific error (sslv3 alert handshake failure) when using cloudflare. Not sure how it is working – but I _think_ that cloudflare is adding sslv3 to my sites.
Forum: Plugins
In reply to: [FeedWordPress] Prioritize what feeds that are polled for updatesI’ve tried using the action feedwordpress_check_feed in order to check the lastbuilddate. If more than one month old, then I want to modify update/window. Not sure how to actually do the modification. Any ideas?
This is my code so far:
function fwpd_ignorefeed ( $settings ) { if (is_array($settings) && $settings['feed/lastbuilddate']) { $time = strtotime($settings['feed/lastbuilddate']); if ($time > 0 && $time < strtotime('-1 month')) { // set $settings['update/window'] = 10080 // save $settings } } } add_action('feedwordpress_check_feed', 'fwpd_ignorefeed');Forum: Plugins
In reply to: [Widget Logic] Incorrect “Widget Logic team security recommendation”Never mind. I deleted Widget Logic plugin. Problem solved 🙂
Forum: Plugins
In reply to: [W3 Total Cache] W3TC Causes Garbled Code Display on PagesI’ve tried 0.9.5.2 but it doesn’t seem to solve this issue (at least not for my sites)
Forum: Plugins
In reply to: [W3 Total Cache] W3TC Causes Garbled Code Display on PagesI have the same problem. All my pages gives garbeled output on first pageload. Second pageload it is working again. But I have a lot of pages.
I have deleted all cache, but no difference. I have restarted nginx, bot no difference.
I tried to use older version of W3TC but it says I cannot active. So for now I have disabled the plugin completely.
- This reply was modified 9 years, 6 months ago by niska.
Forum: Plugins
In reply to: [EWWW Image Optimizer] PageSpeed Insights say: Optimize ImagesThank you. Editing ewww-image-optimizer.php was an easy fix.
Forum: Plugins
In reply to: [EWWW Image Optimizer] PageSpeed Insights say: Optimize ImagesThank you. How do I switch to non-progressive encoding? I’m aware of the downside of this – but would like to enable it anyway.
Regarding PSI. Are you sure they are using lossy encoding? I haven’t been able to find any other source that mentions this. As you say, all my images are small – why would they use lossy encoding on them? My guess is that they are also using non-progressive encoding.
(btw my front page doesn’t have random images, but we add about 2-3 images every day)
Forum: Plugins
In reply to: [EWWW Image Optimizer] PageSpeed Insights say: Optimize ImagesThere are some images like this so it adds upp a little bit, but I’m not that worried. But would be happy if I can get a better result at PSI.
Sending you a link to the image using your contact form.
Forum: Plugins
In reply to: [EWWW Image Optimizer] PageSpeed Insights say: Optimize ImagesThanks for the info. I’ve tried Gmetrix as suggested. But it gives me the same info: “Losslessly compressing http://www.xyz.com/image0030.jpg could save 270B (10% reduction). See optimized version.” for the same images as PSI. What could be wrong?
Forum: Plugins
In reply to: [W3 Total Cache] wp-blog-header.php included, but page not cachedResponse header of dynamic.php says:
Cache-Control:no-cache, must-revalidate, max-age=0
CF-RAY:2f3b1019446705b5-ARN
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html; charset=utf-8
Date:Tue, 18 Oct 2016 09:57:48 GMT
Expires:Wed, 11 Jan 1984 05:00:00 GMT
Set-Cookie:wfvt_1543333163=5805ef6ec1a01; expires=Tue, 18-Oct-2016 10:16:22 GMT; path=/; httponly
Transfer-Encoding:chunked
X-Powered-By:W3 Total Cache/0.9.5.1Not sure why the expires date is 1984 and cache control says “no cache”
Any ideas?
Forum: Fixing WordPress
In reply to: Version 4.6. Error "The data could not be converted to UTF-8"I’ve solved it now. It seems as if a RSS-feed was returning error 500. That caused the error message above.
The reason the RSS feed was returning 500 was the following code.
$body = wp_remote_retrieve_body($response); $head = wp_remote_retrieve_headers($response); $total = $head.$body; // used to work < 4.6I solved it with replacing the above code with:
$body = wp_remote_retrieve_body($response); $head = wp_remote_retrieve_headers($response); $head = implode(" ", $head); // solution $total = $head.$body;Anyone else with this problem?
More specifially, I’m referring to this code in class-opengraph.php:
// Get the width and height of the image. if ( $img_data[1] < 200 || $img_data[2] < 200 ) { return false; }