> For the complete documentation index, see [llms.txt](https://lionstudios.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lionstudios.gitbook.io/readme/analytics/social-events.md).

# Social Events

## Introduction

Social events help understand how players engage with social content, such as creating/joining/leaving teams or guilds and sending/receiving invites and gifts. By tracking these interactions, you can gain insights into player behavior and optimize social features to enhance player engagement and community building.

### Events

#### [**`Social`**](/readme/analytics/api/events/social.md)

A catch-all event for players’ actions and engagement with social features that are not captured by the other specific events.

#### [**`SocialConnect`**](/readme/analytics/api/events/socialconnect.md)

Use this event when the user connects to a social network.

#### [**`InviteSent`**](/readme/analytics/api/events/invitesent.md)

Use this event when an invite is sent.

#### [**`InviteReceived`**](/readme/analytics/api/events/invitereceived.md)

Use this event when an invite is received.

#### [**`GiftSent`**](/readme/analytics/api/events/giftsent.md)

Use this event when a player sends a gift.

#### [**`GiftReceived`**](/readme/analytics/api/events/giftreceived.md)

Use this event when a player receives a gift.

### Critical Parameters

**Required**

* [**`Social`**](/readme/analytics/api/events/social.md):
  * `socialType`: Describes the social action the player takes.
* [**`SocialConnect`**](/readme/analytics/api/events/socialconnect.md):
  * `connectedUserId`: The userID provided when connected to a social network.
* [**`InviteReceived`**](/readme/analytics/api/events/invitereceived.md):
  * `senderID`: The ID of the sender of the invite.
* [**`GiftSent`**](/readme/analytics/api/events/giftsent.md):
  * `gift`: The reward object that contains the name, type, and amount of the gift content.
  * `recipient_id`: The ID of the user who received the gift.
* [**`GiftReceived`**](/readme/analytics/api/events/giftreceived.md):
  * `gift`: The reward object that contains the name, type, and amount of the gift content.
  * `recipientID`: The ID of the user who sent the gift.

**Optional**

* [**`InviteReceived`**](/readme/analytics/api/events/invitereceived.md), [**`InviteSent`**](/readme/analytics/api/events/invitesent.md):
  * `inviteType`: If there are multiple types of invites that players can send, such as “Download Game,” “Join My Guild,” etc., use this parameter to specify the type of invite sent.
* [**`Social`**](/readme/analytics/api/events/social.md), [**`SocialConnect`**](/readme/analytics/api/events/socialconnect.md):
  * `reward`: If the player receives any rewards for performing any social action or connecting their social media account, the `reward` object can be used to track the details of the reward received.

## Example

### Match 3D

<div><figure><img src="/files/r0CpUJ4DwIAMGpSt152J" alt=""><figcaption></figcaption></figure> <figure><img src="/files/myZFusKGxP63CcX48T1Z" alt=""><figcaption></figcaption></figure> <figure><img src="/files/s3a7dfjasSqhDE4e3i91" alt=""><figcaption></figcaption></figure></div>

The game has robust social features. Players can connect their social media or platform account to the game to keep progress across devices, create/join/search for/leave teams, and interact and compete with their teams.

* Example of Event Trigger Timing and Usage of Critical Parameters:
  * [**`Social`**](/readme/analytics/api/events/social.md): When the player clicks the Join button to join a team.
    * `socialType` = “join\_team”
  * [**`Social`**](/readme/analytics/api/events/social.md): When the player fills out Team info and hits the Create button to create a new team.
    * `socialType` = “create\_team”
  * [**`Social`**](/readme/analytics/api/events/social.md): When the player types in a name in the search box and hits the Search button.
    * `socialType` = “team\_search”

#### Implementation

Note that the social event flow chart below is taken from Match 3D. Not all social features have the exact same flow, but the concept should be similar enough.

![Event Tracking Flows - Teams](/files/oAUxg4mfhhRy1Wj3ilVi)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lionstudios.gitbook.io/readme/analytics/social-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
