trackContentInteraction

The trackContentInteraction() method tracks content block interaction and sends data about the content name, content piece and content target.

Syntax

await FlutterPiwikPro.sharedInstance.trackContentInteraction(
    contentName: "contentName",
    contentInteraction: 'contentInteraction',
    piece: 'contentPiece',
    target: 'contentTarget');

Parameters

contentName (string, required)

The name of the tracked content block.

contentInteraction (string, required)

The type of interaction with the tracked content block. Example: click.

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 an interaction with a content block in your mobile app:

await FlutterPiwikPro.sharedInstance.trackContentInteraction(
    contentName: "gravel bikes collection",
    piece: 'banner',
    target: 'https://example.com/bikes/',
    contentInteraction: 'click');

Notes

  • To track content interactions, turn on: Menu > Tag Manager > Tags > Piwik PRO (tracking code) > Data collection > Interactions with popups and content (on). Read more
  • Tracked interactions are visible in Analytics > Reports > Content performance.

Related methods