The Kentico Cloud Personal Data .NET SDK is a client library used for retrieving or deleting data about your tracked visitors. You can use the SDK in the form of a NuGet package.
To retrieve and delete data from Kentico Cloud via the Personal Data API, you need to have a Kentico Cloud subscription at https://app.kenticocloud.com. For more information see our documentation.
Some methods of the SDK work with User ID, which identifies a specific visitor on your website. You can get this value either by parsing the content of a cookie using the Personalization SDK or by calling a JavaScript method in the code of your website. For more details, see Identifying visitors on websites.
The PersonalDataClient
class is the main class of the SDK. Using this class, you can retrieve and delete visitor data stored in your Kentico Cloud project.
To create an instance of the class, you need to provide a Project ID and your Personal Data API Key. You can find both inside the Kentico Cloud app. From the app menu, choose Project settings. Then, under Development, choose API keys.
var projectId = new Guid("<YOUR_PROJECT_ID");
var apiKey = "<YOUR_PERSONAL_DATA_API_KEY>";
client = new PersonalDataClient(apiKey, projectId);
Calling a get method returns all data about the specified visitor stored in Kentico Cloud. The Response object contains:
- an HTTP status code
- the content of the response OR error details
var response = await client.GetByEmailAsync("[email protected]");
var response = await client.GetByUidAsync("1a7379c4026d4614");
Calling a delete method registers a deletion request on our servers. All personal data of the specified visitor is then deleted within 24 hours. The Response object contains:
- an HTTP status code
- error details, in case of an error
var response = client.DeleteByEmailAsync("[email protected]");
var response = client.DeleteByUidAsync("1a7379c4026d4614");
##Feedback & Contributing Check out the contributing page to see the best places to file issues, start discussions and begin contributing.