sendSocialInteraction

The sendSocialInteraction() method records interactions with social networks, such as likes, shares, and comments, from your app.

Syntax

PiwikTracker.sharedInstance()?.sendSocialInteraction(action: "action", network: "network")
[[PiwikTracker sharedInstance] sendSocialInteractionWithAction:@"action" network:@"network"];

Parameters

  • action (string, required)
    The interaction type. Example: like, share, comment.
  • network (string, required)
    The social network where the interaction occurred. Example: Facebook, Instagram, YouTube.

Examples

To track a Facebook like in your app:

PiwikTracker.sharedInstance()?.sendSocialInteraction(action: "like", network: "Facebook")
[[PiwikTracker sharedInstance] sendSocialInteractionWithAction:@"like" network:@"Facebook"];

Notes

  • In Analytics, this call appears as an event in the social interaction category. The value of action becomes the event action, and the value of network becomes the event name.

Did this page help you?