FDP to deactivate GA and FB pixel codes from loading
-
Hi Jose! How are you?
I would like to know if FDP is able to prevent Google Analytics and FB pixels from loading on selected webpages?
Objective:
I’d like to track both an English and Chinese version of my website (setup using WordPress + TranslatePress) – thereby making it multilingual.Problem:
China blocks Google and Facebook so if GA and FB codes are on the webpage, the page will either load very slowly or may show timeout errorsA proven solution online (I assumed it’s proven cos it’s from a company that does this for a living) states:
“The issue here is that when a page loads the initiator file analytics.js, the domain (google-analytics.com) is VERY slow. Given this typically loads at the end of page following DOM Complete, if a page doesn’t load fully, or if it loads slowly, then that library file/resource file analytics.js will never actually get a chance to load (and subsequently send some events to GA).
The best case is to locally host that analytics.js file and recursively find and locally host all the other js files that may be loaded (assuming you’re using GTM perhaps), so that all the static JS files are hosted on your local domain. This eliminates the need to initiate sessions (i.e. TCP/SSL handshakes) with additional servers, and allows the API calls to trigger as per normal.”
I have no idea what this means. But I think it means that if the files from GA are loaded, then this page will not load properly if the web visitor is from China.
I obviously don’t know how to deal with all these JS stuff but I think a good compromise will be to have all my translated Chinese pages NOT load these files/codes from GA and FB.
I’m adding GA to my website using a plugin called GA Pro and I’m adding FB pixel code to my website using a plugin called Pixel Caffeine. If I disable these 2 plugins on the Chinese pages using FDP, will this achieve what I want? How do I check if it’s successful?
I’ve checked with the plugin author from GA Pro and he said it should work but he told me to double check with you as well ??
Your advice is greatly appreciated. Thank you! ??
- The topic ‘FDP to deactivate GA and FB pixel codes from loading’ is closed to new replies.