# Google Analytics

For this, you will need a Measurement ID. To find the Measurement ID in your Google Analytics account, follow these steps:

1. **Log in to Google Analytics**: Go to [Google Analytics](https://analytics.google.com) and sign in with your account.
2. **Select the Account and Property**: From the dashboard, choose the account and property for which you want to retrieve the Measurement ID.
3. **Go to Admin Settings**: Click on the **Admin** option in the lower-left corner of the interface.
4. **Access Data Streams**: Under the **Property** column, select **Data Streams**.

<figure><img src="https://1024951375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj3mk8X1lr8iYBWypC-%2Fuploads%2FvGZw8QwFh85F7XGNH8ek%2Fimage.png?alt=media&#x26;token=7490114f-1536-4a9b-b618-c6d9ee38b3d6" alt=""><figcaption></figcaption></figure>

5. **Choose Your Data Stream**: Click on the data stream associated with your website or app.

<figure><img src="https://1024951375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj3mk8X1lr8iYBWypC-%2Fuploads%2FEuhMli1ukYTLiIlrA70D%2Fimage.png?alt=media&#x26;token=238ee8d6-6c96-4a8e-85d7-a05159439619" alt=""><figcaption></figcaption></figure>

6. **Find the Measurement ID**: In the data stream details, you will see the Measurement ID at the top of the page. It starts with "G-" followed by a unique series of numbers and letters.

<figure><img src="https://1024951375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj3mk8X1lr8iYBWypC-%2Fuploads%2Fj40VUOQPbVvuf1MwSfBk%2Fimage.png?alt=media&#x26;token=247f4fe5-7ae5-4e95-a460-0d9c1cde3749" alt=""><figcaption></figcaption></figure>

Make sure to copy this ID for use in your integrations.

7. **Go to the Integrations tab** in the StorySDK dashboard.

<figure><img src="https://1024951375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj3mk8X1lr8iYBWypC-%2Fuploads%2Fmop9s2wVK746aR7ijxRY%2Fimage.png?alt=media&#x26;token=fa41b9aa-c595-4a56-8cbd-cb12a87a63cc" alt=""><figcaption></figcaption></figure>

8. **Find the Google Analytics card** and **click the "Activate" button**. In the modal window that opens, paste the obtained Measurement ID and click the "Save" button.

<figure><img src="https://1024951375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj3mk8X1lr8iYBWypC-%2Fuploads%2FOEKPAYufK9QhGMlTGS4A%2Fimage.png?alt=media&#x26;token=c6e9156c-3326-44bc-b71a-2966e2c152f1" alt=""><figcaption></figcaption></figure>

9. After that, the indicator on the card will turn green, and the label will change to "Active".

<figure><img src="https://1024951375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mj3mk8X1lr8iYBWypC-%2Fuploads%2FPWDoGAT4a0sjYmhLdvwN%2Fimage.png?alt=media&#x26;token=7dab1dd3-3110-47ea-ad45-abac0b6b6f3e" alt=""><figcaption></figcaption></figure>

You can change the Measurement ID at any time by clicking the "Configure" button on the card. To delete the integration, simply leave the field empty and click "Save."

## StorySDK Google Analytics Events

* **`storysdk_group_duration`**: This event tracks the duration of time a user spends on a specific group of stories or content within the StorySDK.
* **`storysdk_group_open`**: This event is triggered when a user opens a group of stories within the StorySDK.
* **`storysdk_group_close`**: This event is triggered when a user closes or exits a group of stories  within the StorySDK.
* **`storysdk_story_duration`**: This event tracks the duration of time in seconds a user spends on a single story within the StorySDK.
* **`storysdk_story_impression`**: This event is triggered when a story or content is shown more then one second.
* **`storysdk_story_open`**: This event is triggered when a user opens or starts viewing a particular story within the StorySDK.
* **`storysdk_story_close`**: This event is triggered when a user closes or finishes viewing a particular story within the StorySDK.
* **`storysdk_story_next`**: This event is triggered when a user navigates to the next story  in a sequence within the StorySDK.
* **`storysdk_story_back`**: This event is triggered when a user navigates to the previous story  in a sequence within the StorySDK.
* **`storysdk_widget_answer`**: This event is triggered when a user provides an answer or interacts with a widget within a story  in the StorySDK.
* **`storysdk_widget_click`**: This event is triggered when a user clicks on a widget or interactive element within a story in the StorySDK.
* **`storysdk_quiz_start`**: This event is triggered when a user starts a quiz or interactive questionnaire within the StorySDK.
* **`storysdk_quiz_finish`**: This event is triggered when a user finishes a quiz or interactive questionnaire within the StorySDK.
