# Shynet

Shynet is an open source self-hosted web analytics platform which works without cookies and is privacy-friendly.

RudderStack supports Shynet as a destination to which you can seamlessly send your event data.

Find the open source transformer code for this destination in the [GitHub repository](https://github.com/rudderlabs/rudder-transformer/tree/main/src/v0/destinations/shynet).

## Connection compatibility

{{< destination-config >}}

## Get started

Once you have confirmed that the source platform supports sending events to Shynet, follow these steps:

1. From your [RudderStack dashboard](https://app.rudderstack.com/), add a source. Then, from the list of destinations, select **Shynet**.
2. Assign a name to the destination and click **Continue**.

## Connection settings

To successfully configure Shynet as a destination, you will need to configure the following settings:

{{< image src="images/event-stream-destinations/shynet-connection-settings.webp" alt="Shynet connection settings" >}}

- **Heart Beat**: This is a **device mode** only setting. Enter the time (in ms) to send a ping request. The default value is 5000 ms.
- **Shynet Script URL**: Enter the script URL generated by Shynet for your service.

{{< info >}}
For more information on getting your Shynet script URL, refer to the [FAQ](#faq) section below.
{{< /info >}}

### Client-side events filtering

{{< image src="images/event-stream-destinations/shynet-connection-settings-2.webp" alt="Shynet connection settings" >}}

This setting lets you specify which events should be blocked or allowed to flow through to Shynet.

{{< info >}}
This option is applicable only if you're sending events to Shynet via web device mode. Refer to the [Client-side Event Filtering]({{< ref "sources/event-streams/sdks/event-filtering.md" >}}) guide for more information on this feature.
{{< /info >}}

### Web SDK settings

{{< image src="images/event-stream-destinations/shynet-connection-settings-3.webp" alt="Shynet connection settings" >}}

These settings are applicable only if you are sending events to Shynet via web device mode.

- **Use device-mode to send events**: Enable this setting to send events from the JavaScript SDK to Shynet via [device mode]({{< ref "destinations/rudderstack-connection-modes.md#device-mode" >}}).

- **Consent management settings**: Configure the consent management settings for the specified source by choosing the **Consent management provider** from the dropdown and entering the relevant consent category IDs. See [Consent Management in RudderStack]({{< ref "data-governance/consent-management/overview.md" >}}) for more information on this feature.

## Page 

The [`page`]({{< ref "event-spec/standard-events/page.md" >}}) call lets you record your website's page views with any additional relevant information about the viewed page.

### Cloud mode

A sample `page` call for [cloud mode]({{< ref "destinations/rudderstack-connection-modes.md#cloud-mode" >}}) is shown below:

```javascript
rudderanalytics.page("HomePage", {
  loadTime: 55
}, {
  context: {
    page: {
      url: 'www.site.com'
    }
  }
});
```

The following table lists the mappings between RudderStack and Shynet properties:

| RudderStack property | Shynet property | Presence | Data type | 
| :----------------- | :--------------- |:--------------- |:--------------- |
| `context.page.url`        | `location`      | Required | String |
| `context.page.referrer`   | `referrer`     | Optional  | String |
| `properties.loadTime`     | `loadTime`      | Optional | Integer |

{{< info >}}
Although the `context.page.url` is a required property, it is taken as the URL of the current page automatically by `rudderanalytics`, if not specified.
{{< /info >}}

### Device mode

A sample `page` call for [device mode]({{< ref "destinations/rudderstack-connection-modes.md#device-mode" >}}) is shown below:

```javascript
rudderanalytics.page("Home");
```

## FAQ 

#### Where can I find the Shynet script URL?

To find the Shynet script URL, follow these steps:
1. Log into your Shynet dashboard.
2. From **Services**, select your service and click **Manage**.
3. Copy the script URL:

{{< image src="images/event-stream-destinations/shynet-script-url.webp" alt="Shynet script url" >}}

