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 interactioncategory. The value ofactionbecomes the event action, and the value ofnetworkbecomes the event name.
Updated 2 months ago
Did this page help you?