sendContentInteraction
The sendContentInteraction() method tracks content block interactions and sends the content name, interaction type, piece, and target.
Syntax
PiwikTracker.sharedInstance()?.sendContentInteraction(
name: "name",
interaction: "interaction",
piece: "piece",
target: "target"
)[[PiwikTracker sharedInstance] sendContentInteractionWithName:@"name"
interaction:@"interaction"
piece:@"piece"
target:@"target"];Parameters
- name (string, required)
The name of the tracked content block. - interaction (string, required)
The type of interaction with the tracked content block. Example:taporclick. - piece (string, optional)
The piece of the tracked content block. Example: a creative, banner or video. - target (string, optional)
The target of the tracked content block. Example: a link in the content block.
Examples
To track content block interactions in your mobile app:
PiwikTracker.sharedInstance()?.sendContentInteraction(
name: "gravel bikes collection",
interaction: "tap",
piece: "banner",
target: "https://example.com/bikes/"
)[[PiwikTracker sharedInstance]
sendContentInteractionWithName:@"gravel bikes collection"
interaction:@"tap"
piece:@"banner"
target:@"https://example.com/bikes/"];Notes
- Tracked interactions appear in Analytics > Reports > Content performance.
- Use the same
nameandpiecevalues as insendContentImpression()when tracking impressions for the same content so conversion rates can be calculated correctly.
Related methods
Updated 2 months ago
Did this page help you?