sendContentInteraction
The sendContentInteraction() method tracks interactions with a content block and passes data about 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 the interaction with a content block on 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 will be visible in Analytics > Reports > Content performance.
- Use the same name and piece as in
sendContentImpression()when you track impressions for the same content, so conversion rates can be calculated correctly.
Related methods
Updated 16 days ago