diff options
Diffstat (limited to 'files/th/mozilla/firefox/privacy/tracking_protection/index.html')
-rw-r--r-- | files/th/mozilla/firefox/privacy/tracking_protection/index.html | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/files/th/mozilla/firefox/privacy/tracking_protection/index.html b/files/th/mozilla/firefox/privacy/tracking_protection/index.html deleted file mode 100644 index 371f3e9873..0000000000 --- a/files/th/mozilla/firefox/privacy/tracking_protection/index.html +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: Tracking Protection -slug: Mozilla/Firefox/Privacy/Tracking_Protection -translation_of: Mozilla/Firefox/Privacy/Tracking_Protection ---- -<div>{{FirefoxSidebar}}</div><h2 id="What_is_tracking_protection">What is tracking protection?</h2> - -<p>Starting in version 42, Firefox Desktop and Firefox for Android include built-in tracking protection. In Private Browsing windows (tabs, in Firefox for Android), Firefox will block content loaded from domains that track users across sites.</p> - -<p>Some blocked content is part of the page layout, and users may notice layout issues where Firefox blocked these loads. Sometimes users won’t notice at all, if the page grid works such that other page elements slide in to fill holes left by blocked elements.</p> - -<p>When Firefox blocks content, it will log a message to the Web Console like this:</p> - -<pre>The resource at "http://some/url" was blocked because tracking protection is enabled.</pre> - -<p>Note that with Firefox for Android, you can access console output using the remote debugger.</p> - -<p>The Firefox UI will indicate to users when content has been blocked and enable them to unblock it for the current session if they choose. Users will also be able to disable tracking protection entirely if they choose.</p> - -<h2 id="How_does_Firefox_choose_what_to_block">How does Firefox choose what to block?</h2> - -<p>Content is blocked based on the domain from which it is to be loaded.</p> - -<p>Firefox will ship with a list of sites which have been identified as engaging in cross-site tracking of users. When tracking protection is enabled, Firefox will block content from sites in the list.</p> - -<p>Sites that track users are most commonly third-party advertising and analytics sites.</p> - -<h2 id="What_does_this_mean_for_your_website">What does this mean for your website?</h2> - -<p>Most obviously, it means that when tracking protection is enabled:</p> - -<ul> - <li>content served from third-party trackers will not be visible to users</li> - <li>your site won't be able to use third-party advertising or analytics services that engage in tracking</li> -</ul> - -<p>More subtly, if other parts of your site depend on trackers being loaded, then these parts will also be broken when tracking protection is enabled. For example, if your site includes a callback that runs when content from a tracking site is loaded, then the callback will not execute.</p> - -<p>For example, you should not use Google Analytics in the following way:</p> - -<pre class="brush:html example-bad"><a href="http://www.example.com" onclick="trackLink('http://www.example.com', event);">Visit example.com</a> -<script> -function trackLink(url,event) { - event.preventDefault(); - ga('send', 'event', 'outbound', 'click', url, { - 'transport': 'beacon', - 'hitCallback': function() { - document.location = url; - } - }); -} -</script></pre> - -<p>Instead, you should account for the case when Google Analytics is missing by checking to see if the ga object has initialized:</p> - -<pre class="brush:html example-good"><a href="http://www.example.com" onclick="trackLink('http://www.example.com', event);">Visit example.com</a> -<script> -function trackLink(url,event) { - event.preventDefault(); - if (window.ga && <span class="pl-smi">ga</span>.loaded) { - ga('send', 'event', 'outbound', 'click', url, { - 'transport': 'beacon', - 'hitCallback': function() { document.location = url; } - }); - } else { - document.location = url; - } -} -</script> -</pre> - -<p>More information about this technique is available at <a href="https://hacks.mozilla.org/2016/01/google-analytics-privacy-and-event-tracking/">Google Analytics, Privacy, and Event Tracking</a>.</p> - -<p>Note that depending on a third party in this way is not a good practice anyway, as it means your site can be broken if the third party is slow or unavailable, or if the tracker is blocked by an add-on.</p> |