XF 2.2 A couple of Xenforo/Cloudflare questions

RobParker

Well-known member
1) I realised I've never enabled the cloudflare web analytics.
The instuctions say to:
"Add the JS Snippet below before the ending body tag on any of your HTML pages."

What does that mean for Xenforo? Does it need adding in every page (i.e. to the page_container template?) Is there somewhere this should be specified (like there is for Google Analytics)?

2) I've see a few posts about caching the css.php file. Is this page rule set up correctly to do that?

Screenshot 2021-09-02 at 23.14.45.webp
 
If you are already using Cloudflare on your domain, you do not need to add their JS code to your template to get dashboard Analytics. Though I suppose they still haven't enabled advance analytics on free accounts so to get that version of analytics, this is required.

Thanks. My site is proxied through Cloudflare (but currently on the free plan). The only option seemed to be to use the JS snippet but that might be because I selected that option when I first set things up and it won't let you change it.
 
A follow-on cloduflare question.

In our config.php file we specify the cdn for the javascript and data directories:

$config['externalDataUrl'] = 'https://cdn.mysite.co.uk/data';
$config['javaScriptUrl'] = 'https://cdn.mysite.co.uk/js';

If I have another directoiry containing images (things like banners, logos, smileys, etc we use on the site), how do I set Xenforo to serve them from the CDN as well? Is that possible from the config file or somewhere else? e.g. https://cdn.mysite.co.uk/images (and subdirs).
 
Top Bottom