Interaction

Inherits from Xamarin.Forms.ContentView

Whenever you view a page in the mobile app, a page view interaction is automatically logged on the server. More specifically, they are queued up and sent to the server in bulk every minute or so. But sometimes you might want to record a custom interaction that the user had when viewing the page. Say for example, recording an interaction that they viewed a blog article. Yes, we know content channels have built-in functionality to do that now too. Why nitpick?

Anyway, this control takes up zero space and provides a simple way to record a custom interaction. You need to specify the Operation, Summary, ChannelId and then one of either ComponentId or ComponentName. All other properties are optional.

Properties

PropertyTypeDescription

ChannelId

int

The identifier of the channel where this interaction will be recorded. Must already exist.

ComponentId

int?

Specifies a specific component identifier where this interaction will be recorded. If used, the component must already exist. Defaults to null.

ComponentName

string

Specifies a component name for where this interaction will be recorded. If you use this property to pick the component then the system will look for a matching component and if not found create one.

Data

string

Custom data that should be stored with the interaction. There is no specific format requirements, as long as the data is a string.

EntityId

int?

Associates the interaction with the specified entity. The entity type will be taken from the channel configuration. Defaults to null.

Operation

string

The type of operation that identifies this interaction. There is no specific list of strings that you must use, but a few suggestions are View and Watch.

Summary

string

The text that describes this event in a user friendly manner.

<Rock:Interaction Operation="Watched video"
    Summary="Watch"
    ChannelId="28"
    ComponentName="{{ video.Name | Escape }}"
    Data="{{ video.Url | Escape }}" />

Last updated

⚙️ Powered by Rock RMS