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