# Introducing the Google Analytics MCP Server

## Метаданные

- **Канал:** Google Analytics
- **YouTube:** https://www.youtube.com/watch?v=PT4wGPxWiRQ
- **Источник:** https://ekstraktznaniy.ru/video/36711

## Транскрипт

### Segment 1 (00:00 - 05:00) []

Hello and welcome. I'm Matt Landers, head of developer relations for Google Analytics. And in this video, I'm going to show you our MCP server for Google Analytics. And if you don't know what that is, it's a model context protocol server, which allows us to connect an LLM like Gemini to a system like Analytics and essentially allows us to chat with our data. So, let's go ahead and dive right in and see what's possible. All right, I'm going to use the new Gemini CLI in order to do this. So, you can use any client that supports MCP servers, and the new Gemini CLI does. So, I'm just going to type Gemini. This will bring up the Gemini interface. And this is just like using Gemini on the web. Uh, it is an agent. It'll go out. It will try to satisfy whatever question you ask. Well, we've connected it to our MCP server. You can see that here. And the configuration for this is on our GitHub. And you can do this yourself today. So, let's just go ahead and ask it a question. Uh, how many users did I have yesterday? So, it should go out and probably ask me what property I want to work with. Um, I've used this before, so it has some context. It may just answer itself. Let's see what happens. All right, it's asking me, can I use the MCP server? I'm going to say yes. It's going out, making the query, and it did it. So, we had 3,82 users yesterday. So, that's pretty cool. We were just able to ask a question. It figured out how to go get that data from analytics and satisfied that query. So, let's ask it another question like, what were my top selling products over the last month? Now it should be able to go out, figure out how to set up that query, get the data back, and show it to us in a decent way. All right, so now it's come back with what our top products were for the last month. And you can see that the super gick puzzle set selling pretty well right now. And you can see that it came back by item revenue, not necessarily by units sold. So we could say how about by and it can go modify that query and come back with uh a new answer based on different criteria that we've given it. So we're just chatting with the LLM here. All right. And now we see our results in a different view which is how many uh units were sold. All right. We can take it even further. Let's say that we have a marketing budget that we've been given and we want to see what Jim and I can come up with a plan for this website to generate more revenue based on that marketing budget. So, let's ask. I have a marketing budget of 5K a month and I need to generate more revenue. Help me come up with a plan that will drive sales. Run any reports that you need to justify this plan. All right, we're going to send that off and see what Gemini comes back with. It'll take a couple of minutes, but we'll skip to that. All right. So, Gemini has come back with a plan for us that can help us use that budget in order to drive more sales. We can see that it's gone in and said it gave us a uh some initiatives that we should do. We have a total budget of 5,000. We should run Google ads on search and shopping, do some paid social and an email marketing campaign. It comes through and it shows you the justification for all of this. These are the different campaigns that it's come up with uh for the different strategies. But if we scroll up, we'll see that it actually ran some reports to try to figure this out as well. So it says that our direct and organic search are a powerhouse driving over $419,000 in revenue. this in uh and you know it gives you all of this data about how it came up with its uh decision on how it should run this um how you should use this money to drive more sales on your website. So there's many more things that we could sit here and chat with Gemini about our analytics data, but I just wanted to give you a taste of what's possible. Now, we're really interested to see what you do with this new technology and how you can integrate it into either your marketing workflow or if you're a developer, how you might use this MCP server to build agents that can go out, use the analytics data to then help marketers make better

### Segment 2 (05:00 - 05:00) [5:00]

decisions for their site or maybe automate some workflows. Check out the GitHub link in the description in order to get this set up on your machine. Feel free to leave issues there or join our Discord server and tell us how it's going, what you want us to change, and if there's uh any issues that you're having. All right, I'm really excited to see what all of you do with this. Hopefully, you're inspired to go build something new, and I can't wait to see what you all do. All right, happy measuring.
