I'm considering using Cloudflare with my Drupal 7 site.

I see that Cloudflare offers a Google Analytics app: https://www.cloudflare.com/apps/google_analytics

I already have the Google Analytics module installed and configured on my site.

Are there any advantages to using both a CDN Google Analytics app and the drupal module at the same time?


CloudFlare acts as a reverse proxy and a CDN. So it can change the HTML output of your Drupal site. If your site has no Analytics script, it can add the code for you. That's for the convenience only. You are still using same Google Analytics.

For Performance

I would avoid GA module if there is a custom module that already has a hook_page_build or hook_page_alter hook. I'm more of a developer so I feel like the GA is an unnecessary load when I could include it in a custom module.

For Easy integration with precise tracking

With GA module, you can expose custom variables to GA, have per-path, per-role, and other contextual tracking, and also cache the snippet (This is actually a bad step IMHO because ga.js snippet is usually cached in the browser from your site or from some other site that uses GA).

If you don't have access to edit the modules, or would prefer to use the contrib, GA module would be better.

For the easiest integration with blind tracking

Use CloudFlare. They are a really good service (I took part in a CloudFlare guide ebook too), and responded quickly to the recent core SQL injection vulnerability. If you don't care about precising tracking, I would use CloudFlare.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.