Skip to content

Commit

Permalink
ZRZ-1495 Add docs for logpush
Browse files Browse the repository at this point in the history
  • Loading branch information
omarmosid committed Dec 30, 2024
1 parent f828b04 commit 9def541
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 9 deletions.
46 changes: 46 additions & 0 deletions src/content/docs/zaraz/advanced/logpush.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
pcx_content_type: how-to
title: Logpush
sidebar:
order: 11
---

import { Plan } from "~/components";

Send Zaraz logs to an external storage provider like R2, S3, etc.

This is an Enterprise only feature.

## Setup

To configure logpush support for Zaraz please follow these steps

### 1. Create a logpush job

Navigate to your Website (Zone) and from the left side side bar find **Analytics and Logs**.

Under this **Analytics and Logs** section navigate to **Logpush**

Click on **Create a Logpush Job** and follow the steps described in the [Logpush documentation](https://developers.cloudflare.com/logs/get-started/).

When it comes to selecting a dataset please make sure to select **Zaraz Events**

### 2. Enable Logpush from Zaraz settings

Navigate to your website's [Zaraz settings](https://dash.cloudflare.com/?to=/:account/:zone/zaraz/settings)

Enable **Export Zaraz Logs**.

## Fields

Logs will have the following fields

| Field | Type | Description |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| RequestHeaders | `JSON` | The headers that were sent with the request. |
| URL | `String` | The Zaraz URL to which the request was made to. |
| IP | `String` | The originating IP. |
| Body | `JSON` | The body that was sent along with the request. |
| Event Type | `String` | The Event type that occured. Can be one of the following: `server_request`, `server_response`, `action_triggered`, `ecommerce_triggered`, `client_request`, `component_error`. |
| Event Details | `JSON` | Details about the event. |
| TimestampStart | `String` | The time at which the event occured. |
27 changes: 18 additions & 9 deletions src/content/docs/zaraz/reference/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ title: Settings
head:
- tag: title
content: Zaraz settings

---

import { Plan } from "~/components";

To configure Zaraz's general settings, select [**Zaraz**](https://dash.cloudflare.com/?to=/:account/:zone/zaraz) > **Settings**. Make sure you save your changes, by selecting the **Save** button after making them.

## Workflow
Expand Down Expand Up @@ -37,15 +38,15 @@ When you toggle Single Page Application support off, the `pageview` trigger will

Zaraz offers privacy settings you can configure, such as:

* **Remove URL query parameters**: Removes all query parameters from URLs. For example, `https://example.com/?q=hello` becomes `https://example.com/`.
- **Remove URL query parameters**: Removes all query parameters from URLs. For example, `https://example.com/?q=hello` becomes `https://example.com/`.

* **Trim IP addresses**: Trims part of the IP address before passing it to server-side loaded tools, to hide it from third-parties.
- **Trim IP addresses**: Trims part of the IP address before passing it to server-side loaded tools, to hide it from third-parties.

* **Clean User Agent strings**: Clear sensitive information from the User Agent string by removing information such as operating system version, extensions installed, among others.
- **Clean User Agent strings**: Clear sensitive information from the User Agent string by removing information such as operating system version, extensions installed, among others.

* **Remove external referrers**: Hides the page referrers URL if the hostname is different from the website's.
- **Remove external referrers**: Hides the page referrers URL if the hostname is different from the website's.

* **Cookie domain**: Choose the domain on which Zaraz will set your tools' cookies. By default, Zaraz will attempt to save the cookies on the highest-level domain possible, meaning that if your website is on `foo.example.com`, the cookies will be saved on `example.com`. You can change this behavior and configure the cookies to be saved on `foo.example.com` by entering a custom domain here.
- **Cookie domain**: Choose the domain on which Zaraz will set your tools' cookies. By default, Zaraz will attempt to save the cookies on the highest-level domain possible, meaning that if your website is on `foo.example.com`, the cookies will be saved on `example.com`. You can change this behavior and configure the cookies to be saved on `foo.example.com` by entering a custom domain here.

## Injection

Expand Down Expand Up @@ -85,10 +86,18 @@ Choose whether to prevent Zaraz from loading on suspected bot-initiated requests

The options are:

* **Block none**: Load Zaraz for all requests, even if those come from bots.
* **Block automated only**: Prevent Zaraz from loading on requests from requests in the [**Automated** category](/bots/concepts/bot-score/#bot-groupings).
* **Block automated and likely automated**: Prevent Zaraz from loading on requests from requests in the [**Automated** and **Likely Automated** category](/bots/concepts/bot-score/#bot-groupings).
- **Block none**: Load Zaraz for all requests, even if those come from bots.
- **Block automated only**: Prevent Zaraz from loading on requests from requests in the [**Automated** category](/bots/concepts/bot-score/#bot-groupings).
- **Block automated and likely automated**: Prevent Zaraz from loading on requests from requests in the [**Automated** and **Likely Automated** category](/bots/concepts/bot-score/#bot-groupings).

### Context Enricher

Refer to the [Context Enricher](/zaraz/advanced/context-enricher/) for more information on this setting.

### Logpush

<Plan type="enterprise" />

Send Zaraz events logs to an external storage service.

Refer to the [Context Enricher](/zaraz/advanced/logpush/) for more information on this setting.

0 comments on commit 9def541

Please sign in to comment.