sendSocialInteraction

The sendSocialInteraction() method records likes, shares and comments on social media on 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 media for which the interaction happened. Example: Facebook, Instagram, YouTube.

Examples

To track a Facebook like on your app:

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

Notes

  • In analytics, this call is stored as an event with category Social interaction. Your action argument is the event action, and your network argument is the event name.

Did this page help you?