Disable personalized advertisements and identifier tracking
Overview
This script improves your privacy on macOS.
These changes use Mac system commands to update your settings.
This script enhances your privacy by deactivating Personalized Ads and disabling the collection of identifiers related to your device. The process involves modifying certain key configurations, which prevents Apple's advertising platform from using your personal information to deliver targeted ads 1.
When Personalized Ads is enabled, your information may be used to provide ads that closely align with your interests 1. You might occasionally encounter such targeted ads in Apple News, Stocks, and the Mac App Store 2. Disabling Personalized Ads will prevent Apple from using your data for ad targeting 2. Although this does not necessarily decrease the quantity of ads you receive, it may result in the ads being less relevant to your interests 2.
The primary keys to deactivating personalized ads are:
allowApplePersonalizedAdvertising
: If set to false, this restricts Apple's personalized advertising 3. This is applicable on macOS 12 and subsequent versions 3.allowIdentifierForAdvertising
: TheadvertisingIdentifier
is a unique string assigned to each device 5. Apple uses this identifier and recommends its use in third-party applications for tasks like frequency capping, attribution, conversion events, estimating the number of unique users, detecting advertising fraud, and debugging 5. Although there is no official documentation on it, a discussion on JAMF.com corroborates its existence 6.
My tests show that disabling any of the keys mentioned above results in the "System Preferences > Apple Advertising > Personalized ads" option being deactivated in the GUI, starting from macOS Monterey.
Please note: The forceLimitAdTracking
key limits ad tracking 3 4 and is found in CIS
benchmarks for macOS 4. However, the official macOS documentation specifies that it is
applicable only to iOS 7 and newer versions, not to macOS 3. The key does not exist on the OS
by default.
This script uses Bash (Shell script) scripting language.
This script is recommended for all users. It helps to improve privacy without affecting stability.
Implementation Details
-
Language: bash
-
Required Privileges: Administrative (sudo) access
-
Compatibility: macOS only
-
Reversibility: Can be undone using provided revert script
Explore Categories
This action belongs to Configure OS category. This category configures macOS using 16 scripts. These scripts are organized in 4 categories. The category includes 7 subscripts and 2 subcategories that include more scripts and categories. Read more on category page ▶
Apply now
Choose one of three ways to apply:
- Automatically via privacy.sexy: The easiest and safest option.
- Manually by downloading: Requires downloading a file.
- Manually by copying: Advanced flexibility.
Alternative 1. Apply with Privacy.sexy
privacy.sexy is free and open-source application that lets securely apply this action easily.
You can fully restore this action (revert back to the original behavior) using the application.
privacy.sexy instructions
- Open or download the desktop application
- Search for the script name:
Disable personalized advertisements and identifier tracking
. - Check the script by clicking on the checkbox.
- Click on Run button at the bottom of the page.
Alternative 2. Download
This script is irreversible, meaning there is no straightforward method to restore changes once applied. Exercise caution before running, restoring it may not be possible.
-
Download the script file by clicking on the button below:
-
Run the script file by clicking on it.
Download revert script
This file restores your system to its original state, before this script is applied.
Alternative 3. Copy
This is for advanced users. Consider automatically applying or downloading the script for simpler way.
-
Open Terminal app
-
Copy the following code:
defaults write com.apple.AdLib allowIdentifierForAdvertising -bool false
defaults write com.apple.AdLib allowApplePersonalizedAdvertising -bool false
defaults write com.apple.AdLib forceLimitAdTracking -bool true
- Paste the code into terminal.
- Press Enter to apply the code.
Some scripts requires restarting your computer to take affect.
Copy restore code
Copy and run the following code to restore changes:
defaults write com.apple.AdLib allowIdentifierForAdvertising -bool true
defaults write com.apple.AdLib allowApplePersonalizedAdvertising -bool true
sudo defaults delete com.apple.AdLib forceLimitAdTracking
Support
This website relies on your support.
Your donation helps keep the project alive and improves its content ❤️.
Share this page: