Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Umbraco Engage uses a cookie to collect visitor data on your Umbraco website. Le

## [Profiling](../profiling/)

The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and anonymous visitors.
The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and unidentified visitors.

## [Settings](../settings/)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: >-
Explore how the Profiles section helps track visitor sessions, manage
profiles, and differentiate between identified and anonymous visitors.
profiles, and differentiate between identified and unidentified visitors.
---

# Profiling
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Property Value Converter full example
This page includes an example of a complete Property Value Converter. The example is that of a Property Value Converter for a Content Picker, where the user picks a node from the Umbraco tree.

This page includes an example of a complete Property Value Converter. The example is that of a Property Value Converter for a Content Picker, where the user picks a node from the Umbraco tree.

{% code title="ContentPickerPropertyConverter.cs" %}

Expand Down
18 changes: 8 additions & 10 deletions 17/umbraco-cms/customizing/property-editors/property-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ Property Actions appear as a small button next to the property label, which expa

## Property Actions in the UI

<figure style="max-width:60%; margin:auto; text-align:center;">
<img src="../../.gitbook/assets/property-actions-blocklist.png" alt="" style="max-width:60%; height:auto; display:block; margin:auto">
<figcaption><p><strong>Property action in Block List</strong></p></figcaption>
</figure>
![Property action in Block List](../../.gitbook/assets/property-actions-blocklist.png)

## Registering a Property Action

Expand All @@ -22,9 +19,9 @@ Before creating a Property Action, make sure you are familiar with the [Extensio
{% endhint %}

Here is how you can register a new Property Action:
```
import { extensionRegistry } from '@umbraco-cms/extension-registry';
import { MyEntityAction } from './my-property-action.api';

```typescript
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
const manifest =
{
type: 'propertyAction',
Expand All @@ -40,14 +37,15 @@ const manifest =
}
};

extensionRegistry.register(manifest);
umbExtensionsRegistry.register(manifest);
```

### Creating the Property Action Class

Every Property Action needs a class that defines what happens when the action is executed.
You can extend the `UmbPropertyActionBase` class for this.

```
```typescript
import { UmbPropertyActionBase } from '@umbraco-cms/backoffice/property-action';
import { UMB_PROPERTY_CONTEXT } from '@umbraco-cms/backoffice/property';

Expand All @@ -62,4 +60,4 @@ export class MyPropertyAction extends UmbPropertyActionBase {
}
}
export { MyPropertyAction as api };
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ A Property Value Converter converts a property editor's database-stored value in
For example, a Content Picker stores the Key of the picked node in the database. When reading published data, Umbraco returns an `IPublishedContent` object instead of the Key. This conversion is done by a Property Value Converter.

A Property Value Converter has three conversion levels:

* **Source** - The raw data stored in the database; this is generally a `string`.
* **Intermediate** - An object of a type that is appropriate to the property. For example, a node Key should be a `Guid`, or a collection of node Keys would be a `Guid[]`.
* **Object** - The object to be used when accessing the property using the Published Content API. For example, the object returned by the `IPublishedContent.Value<T>(alias)` method. Additionally, the Models Builder generates a property of the same type as the object.

## Create a Property Value Converter

A class becomes a Property Value Converter when it implements the `IPropertyValueConverter` interface from the `Umbraco.Cms.Core.PropertyEditors` namespace. Property Value Converters are automatically registered when implementing the interface. Any given PropertyEditor can only utilize a single Property Value Converter.

```csharp
Expand All @@ -27,6 +29,7 @@ Consider using the `PropertyValueConverterBase` class as the base of your Proper
The `IPropertyValueConverter` interface exposes the following methods you need to implement:

## Implement information methods

Implement the following methods, which provide Umbraco with context about the Property Value Converter.

### `IsConverter(IPublishedPropertyType propertyType)`
Expand All @@ -44,6 +47,7 @@ public bool IsConverter(IPublishedPropertyType propertyType)
```

### `IsValue(object value, PropertyValueLevel level)`

The `IsValue` method determines whether a property contains a meaningful value or should be considered "empty" at different stages of the value conversion process. This method is essential for Umbraco's `property.HasValue()` method.

{% hint style="info" %}
Expand Down Expand Up @@ -125,6 +129,7 @@ Here you specify which level the property value is cached at.
A property value can be cached at the following levels:

#### `PropertyCacheLevel.Element`

This is the most commonly used cache level and should be your default, unless you have specific reasons to do otherwise.

The property value will be cached until its _element_ is modified. The element is what holds (or owns) the property. For example:
Expand Down Expand Up @@ -158,11 +163,15 @@ public PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyT
```

## Implement conversion methods

Implement the methods that perform the conversion from a raw database value to an intermediate value and then to the final type. Conversions happen in two steps.

### `ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview)`

This method converts the raw data value into an appropriate intermediate type that is needed for the final conversion step to an object.

For example:

- A basic text property likely stores its data as a `string`, so that can be converted to a `string` intermediate value.
- A Content Picker stores the node identifier (`Udi`) as a `string`. To return `IPublishedContent`, the final conversion step needs a `Udi` instead. So in the intermediate step, check if the `string` value is a valid `Udi` and convert the `string` to a `Udi` as the intermediate value.

Expand Down Expand Up @@ -201,6 +210,7 @@ public object? ConvertIntermediateToObject(IPublishedElement owner, IPublishedPr
```

## Override existing Property Value Converters

To override an existing Property Value Converter, either from Umbraco or a package, additional steps are required. Deregister the existing one to prevent conflicts.

```csharp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Umbraco Engage uses a cookie to collect visitor data on your Umbraco website. Le

## [Profiling](../profiling/)

The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and anonymous visitors.
The Profiling section helps track visitor sessions, manage profiles, and differentiate between identified and unidentified visitors.

## [Settings](../settings/)

Expand Down
6 changes: 3 additions & 3 deletions 17/umbraco-engage/marketers-and-editors/profiling/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: >-
Explore how the Profiles section helps track visitor sessions, manage
profiles, and differentiate between identified and anonymous visitors.
profiles, and differentiate between identified and unidentified visitors.
---

# Profiling
Expand All @@ -20,9 +20,9 @@ The graph shows the number of new identified visitors over the last 30 days.

The table displays an overview of the profiles per month.

## Identified versus Anonymous Profiles
## Identified versus Unidentified Profiles

As long as there is no data of a visitor, this profile is called "Anonymous". If a visitor [does not give consent](../../developers/introduction/the-umbraco-engage-cookie/module-permissions.md) to be identified, they remain "Anonymous".
As long as there is no data of a visitor, this profile is called "Unidentified". If a visitor [does not give consent](../../developers/introduction/the-umbraco-engage-cookie/module-permissions.md) to be identified, they remain "Unidentified".

However, once a visitor logs in (via Umbraco's Members section) or submits an Umbraco Form, they become an "Identified Profile." For example: If you see a visitor name in the Profiles table it is because the visitor has logged in as a member.

Expand Down