> For the complete documentation index, see [llms.txt](https://docs.edgetag.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgetag.io/mcp/skills/edge-lake.md).

# Edge Lake

The Edge Lake skill covers querying and analyzing your event data lake. Edge Lake stores all website and shop events in Cloudflare R2 and makes them queryable via SQL.

{% hint style="info" %}
Edge Lake requires the [DataNexus Shopify app](https://apps.shopify.com/blotout-datanexus) to be installed.
{% endhint %}

### What it covers

* **SQL querying** - Writing queries against the `lake.events` table with R2 SQL syntax and limitations
* **Event schema** - Complete column reference for events, payloads, users, geolocation, attribution, and consent
* **Funnel analysis** - Building conversion funnels (PageView -> AddToCart -> Checkout -> Purchase)
* **Attribution reporting** - UTM source/medium/campaign analysis, first-click vs. last-click attribution
* **Revenue analysis** - Daily/weekly/monthly revenue trends, average order values, top products
* **Traffic analysis** - Browser, OS, device, and country breakdowns
* **Bot detection** - Analyzing Cloudflare bot scores to identify automated traffic
* **WAF attack analysis** - Understanding attack traffic patterns and classifications

### When it triggers

The skill activates automatically when you mention:

* Edge Lake, event data lake, or R2 data lake
* SQL events, funnel analysis, or attribution analysis
* Bot score, WAF attack score, or traffic analysis
* Revenue reporting, conversion funnel, or event analytics
* `lake.events`, `edgeLakeQuery`, or `edgeLakeCodeQuery`

### Example prompts

* "Build a conversion funnel for the last 7 days"
* "What are our top UTM sources by revenue?"
* "Show me daily purchase counts and revenue this month"
* "How much bot traffic are we getting?"
* "Which pages have the most AddToCart events?"
* "Compare new vs. returning customer purchase rates"


---

# 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://docs.edgetag.io/mcp/skills/edge-lake.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.
