# Implementing Pageview Tracking

## Step 3 - Add Google Analytics to Your Application

For users of the SSK Pro version, the Google Analytics integration is already included in the RootLayout component, which automatically injects the GoogleAnalytics component into your app. This means that tracking page views is handled globally without any additional setup required from your end.

Here’s how the RootLayout in SSK Pro includes Google Analytics:

```
import { GoogleAnalytics } from '@pro/analytics/GoogleAnalytics'

function RootLayout() {
  return (
    <>
      <GoogleAnalytics />
      {/* Other SSK-Pro features */}
    </>
  )
}
```

**What this means:**

* **No manual integration needed**: Since the GoogleAnalytics component is already integrated in the RootLayout, it automatically tracks page views and user behavior site-wide.
* **Page view tracking is automatic**: Every page you add to the Pro version of your app will already be tracked by Google Analytics. Just ensure that the GA\_MEASUREMENT\_ID environment variable is correctly set.
* **Cookie consent handling**: The Google Analytics setup respects the user’s cookie consent, so data is only sent if users have agreed to it.

**In summary**: For Pro users, the Google Analytics tracking functionality is baked into the foundation of your application via the RootLayout. You simply need to ensure that your Google Analytics Measurement ID is correctly added to your .env file.


---

# Agent Instructions: 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:

```
GET https://docs.startupstarterkits.com/ssk-pro-features/index-1/chapter-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
