CloudFlare RocketLoader causing Woocommerce Add to Cart button to not load - wordpress

So I want to enable CloudFlares Rocketloader feature on my site as it significantly improves the load times of my page.
Thing is, the Add to Cart button doesn't load when it's enabled.
The CloudFlare documentation states:
"You can have Rocket Loader ignore individual scripts by adding the
data-cfasync="false" attribute to the relevant script tag"
I think I need to add the above code to the correct script but I have no idea what the script is called or where it is.
Any help would be greatly appreciated. Thanks

The ignore option doesn't always work (kind of complex). Is it just happening on a specific URL, such as yoursite.com/checkout? If yes, then you might want to look at turning off Rocket Loader on that URL with a PageRule.

Related

disable donotcachepage for woocommerce

I'm using woocommece and wp-rocket. I disabled Page Caching of rocket and just using minify. as default rocket don't cache checkout and cart because these pages used DONOTCACHEPAGE constant but now I want to enable cache for these pages too speedup by minify css and js. I think enabling that not make any problem because content cache is disable. Is it any way to enable cache for cart and checkout?
hm, this isn't a difficult one as much as there really is a compatibility issue with combining the settings. I recommend using elementor & going into the settings of the individual block to really edit the settings of each per page. It'll take a long time, but everything on here really takes a long time to implement or problem solve regardless so I say give it a try

Tracking Clicks [Outbound Links] with Autotrack.js

I am trying to find a clear method of tracking clicks to external sites from a site I have built, it appears a lot of information available on this is contradictory or incomplete. I have found autotrack.js on Github which looks like a simpler method, so my question is three-fold, I'll make the question super clear so there is a super clear answer for others in the same conundrum as me.
What snippet/script is added to the HTML and where? I currently have the standard GA snippet for tracking page loads before the </body> tag.
Should I amend / edit the <a> tags to make sense of the who clicked what? I.e. name them, can this be avoided or automated, what I mean is there a script smart enough to name it the same as the destination, like reallygoodlist.com or fb.com/reallygoodlist ?
Is there any GA work required? Set up Goals etc, ideally I would be looking to avoid this - I have a lot of links.
Here is my site (if it helps):
http://www.reallygoodlist.com
1) What snippet/script is added to the HTML and where? I currently have the standard GA snippet for tracking page loads before the tag.
The installation and usage section of the autotrack documentation shows how to install autotrack, so I'll just link to it rather than repeating.
If you're just using the default GA tag, you can probably copy/paste most of the code there, changing the parts relevant to you: e.g. if you only care about outbound link tracking, then only include the outboundLinkTracker plugin.
It also looks like you're installing code via npm, so in this case you can link autotrack's source file in the node_modules directory as you've done with the Babel polyfill.
<script src="node_modules/autotrack/autotrack.js"></script>
2) Should I amend / edit the tags to make sense of the who clicked what ? i.e. name them, can this be avoided or automated, what i mean is ether a script smart enough to name it the same as the destination, like reallygoodlist.com or fb.com/reallygoodlist ?
Autotrack's outboundLinkTracker plugin automatically sets the link's URL as the event label, so you probably don't need to do anything unless that's not enough.
If you want more control than that, setting one of the common options will allow you to custom any data that is sent to GA.
3) Is there any GA work required? Set up Goals etc, ideally I would be looking to avoid this - I have a lot of links.
Not for outbound link tracking. It's just tracking the data as events, so you'll be able to find them in your event reports in GA.

How to detect a plugin is loaded in wordpress

Is there a way to detect whether a plugin has been loaded into a WordPress page? For example, if contact form 7's plugin is loaded into page, then do some function.
get_plugins() does that for you.
Before calling it you might want to make sure that all plugis are loaded.
To check, wether the plugin is actually active you might have to use is_plugin_active($plugin)
Good luck, and next time maybe try Google before posting a question here.

Wordpress - have to press update on page to pull new plugin data

I'm using "Formidable Pro" which is a fairly popular plugin like Gravity forms. It has a portion to create forms and take those created entries and display them as "custom displays" which is working great EXCEPT for the fact that I have to go back to the page where the shortcode has been inserted to display these entries and hit update before it will pull the latest entries.
What in the world could be causing this?
I've already tried asking on their support forums and I'm getting no response so I'm kind of desperate. I've made sure that it is NOT the theme or other plugins causing the issue.
Issue lives on this page http://thenextarpg.com/skill-list/
Here where i have to hit update http://imgur.com/8UAque4
Any help would be much appreciated!
The issue is probably your caching plugin. Try disabling WP Super Cache and see if your problem goes away.
Assuming that is what's going on there may be some heavier development required to fix it.
I'd start by looking for a way to tell WP Super Cache never to cache that page.

WordPress' Tribe Events leads to main page

My client is using Tribe Events for, well, managing his events :) I was asked to make a new theme for him. I downloaded his old installation and created new theme, checked and everything was great. I uploaded the whole thing to my server - works as well. But when I finally got the thing on my client's host, every link leading to Tribe Events' content is leading back to main page. Strange thing - it happens only when my theme is on. But then again, I tried removing tribe-events directory from the theme, renaming it etc. Nothing helps. Any ideas?
You didn't provide details about the way you use it so I am not sure the way to provide exact reply.
If you use it without default page template (plugin one) then you should check your loop.
Did you override any files or did you change plugin files at all.
Make sure there is no extra loop running and if you use lops on page make sure you finish it properly
And finally - try to reset permalings, both theme and plugin, if any

Resources