---
schema_version: "1"
id: 730485d35eb1855d5e969f2f46a28f404b1fa0074cc918f25b58a5d1f968ccb5
title: Tracking.TotalByIntervalRetrieve
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-programmatic-content/ssjs_sendTrackingTotalByIntervalRetrieve.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/ssjs_sendTrackingTotalByIntervalRetrieve.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 45d85e899ee2a8ce724130a91fe4cc3dd7f35a808e67eec58ade0ead7506e440
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Tracking.TotalByIntervalRetrieve

## Overview

Returns tracking data related to an initialized send specified by type, duration, and interval

### Syntax

Tracking.TotalByIntervalRetrieve(1, 2, 3, 4)

### Function Properties

<!--complex table-->

| Ordinal | Type   |              | Description                                                                             |
| ------- | ------ | ------------ | --------------------------------------------------------------------------------------- |
| **1**   | string | **Required** | Type of data to aggregate and return. Choose Send, Open, Click, Bounce, or Unsubscribe. |
| **2**   | string | **Required** | Start date of data period                                                               |
| **3**   | string | **Required** | End date of data period                                                                 |
| **4**   | string | **Required** | Interval used to aggregate data. Choose day or hour.                                    |

## Example

This sample code returns a month's worth of click data for the initialized send aggregated by day:

```
var singleSend = Send.Init(12345);
var results = singleSend.Tracking.TotalByInterval.Retrieve('Click', '07-01-2010', '07-31-2010', 'day');
```
