AdvertisingManager.AdvertisingId | advertisingId property

Applies to Windows and Windows Phone

Retrieves a unique ID used to provide more relevant advertising by understanding which apps are used by the user and how they are used, and to improve quality of service by determining the frequency and effectiveness of ads and to detect fraud and security issues. This ID is per-user, per-device; all of the apps for a single user on a device have the same advertising ID. If the advertising ID feature is turned off, no ID is retrieved.

Syntax


public:
static property String^ AdvertisingId { 
   String^ get();
}

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The advertising ID is represented as an alphanumeric string. When the advertising ID feature is turned off, this is an empty string.

Remarks

The advertising ID feature is turned on if the user chooses express settings when installing Windows. The feature can be turned off by the user, either during the custom setup process when installing Windows or at any time later through the Privacy page of PC Settings. It can also be turned off through group policy.

Note  If the advertising ID feature is turned off by the user during the new device customization process, the feature will be turned off by default for any user account added to the device later. If they want to use the advertising ID, those users will have to explicitly turn the feature on through PC Settings.

When the feature is turned off and then on again, Windows creates a new advertising ID—the old one is not reused. The advertising ID can also be reset during operating system upgrades. Because the advertising ID is a per-device value, it is does not roam with the user account. It cannot be turned on for child accounts. The value is not backed up.

This property is called as shown here:



auto advertisingId = Windows::System::UserProfile::AdvertisingManager::AdvertisingId;

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.System.UserProfile
Windows::System::UserProfile [C++]

Metadata

Windows.winmd

See also

AdvertisingManager
Microsoft Advertising SDK
Windows 8.1 app certification requirements for ads

 

 

Show:
© 2014 Microsoft