# Creating a Data Set using an API Connector

{% hint style="success" %}
*Check out the given GIF on how to create a Data Set using an API Connector.*
{% endhint %}

<figure><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FcgrASXCAMUA8MPkcpRy1%2FAPI%20mileage%20dataset%20creation.gif?alt=media&#x26;token=6453ad82-4cd4-47ee-b7a6-a474bffb1b5f" alt=""><figcaption></figcaption></figure>

* Click the ***New*** menu from the Data Center page.
* Select the ***Data Set*** option from the context menu.

&#x20;     ![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F6t7AZ2daOvLvuSVIaI4F%2Fimage.png?alt=media\&token=cba4fa47-0d50-41cf-9404-b626b52b0bb5)

* The ***Data Source*** page containing all the data connectors opens.
* Use the ***Data Source*** filter to search for a specific API Data Connector (E.g., the below image displays **Google Analytics** as the data source filter).
* Select a data connector from the displayed list (E.g., in this case, a google analytics data connector is selected).
* Click the ***Create Data Set*** icon.&#x20;

<figure><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FldPc6JA6KojlYHJiENX8%2Fimage.png?alt=media&#x26;token=caa1a50b-08b9-4101-a919-0571a7537cf6" alt=""><figcaption></figcaption></figure>

* The **Google Analytics Dataset form** opens.
* Fill in the following information:
  * **Dataset Name**: Enter any user-defined name for the new dataset.
  * **Description**: Provide a brief description of the Data Set (It is an optional field).
  * **Data Connector Name**: This option comes pre-defined as per the selected data connector.
  * **Account:** This option comes pre-defined based on the selected google account.

<figure><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FtlvPrVxmLvZiLkGza2F8%2Fimage.png?alt=media&#x26;token=87d7a8a6-3c29-436a-9b4f-8fc8f9bfd2a3" alt=""><figcaption></figcaption></figure>

* The user can select specific data using the below given drop-down lists:

  * **Select Web Property**: Select the required web property using the drop-down menu.
  * **Select View**: Select the required view using the drop-down menu.
  * **Dimensions**: Select the required dimensions using the drop-down menu (The selected      dimensions get displayed below with the ‘ga’ suffix).
  * **Metrics**: Select the required metrics using the drop-down menu (The selected metrics get displayed below with ‘ga’ suffix).

  <figure><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FtbjhHnRmplbQ0uBUgt9F%2Fimage.png?alt=media&#x26;token=f28f6ba2-dcdf-4e81-b357-af2b305f2243" alt=""><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:green;">Please Note</mark>: *The **Web Property**, **View**, and **Metrics** are mandatory fields to create a Google Analytics Data Set.*
{% endhint %}

* **Apply Filter**: Enable the filter option. The filter query gets displayed below.    &#x20;

<figure><img src="https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fv8fonS4HxBcv4eNXOX7e%2Fimage.png?alt=media&#x26;token=74a1d0e9-a9c4-4e5d-ad19-bf1a04396f9f" alt=""><figcaption></figcaption></figure>

* **Date Type**: Select a Date Type using the given options- **Fixed Type** and **Dynamic Type.**
  * **Fixed Type**: Define a time range by specifying dates using the ***From date*** and ***To date*** options.

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FGSakujN15hMDOQ9LjyWc%2Fimage.png?alt=media\&token=8c2a8f10-81f7-4701-a8bf-cf0fe8e1504e)

* **Dynamic Type**: Select an option from the drop-down menu to define the time range.

![     ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FWhWeEQnZJSQrrHISHCFG%2Fimage.png?alt=media\&token=b13c0153-09f8-45ea-8113-6b934898c04f)

{% hint style="info" %} <mark style="color:green;">Please Note</mark>: *The Current Data Set is saved with **Fixed Type** option for the Date Type.*
{% endhint %}

* Click the ***Preview Data*** option.
* The ***Preview*** options below.
* The Save option gets enabled. Click the ***Save*** option.

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F1rJNcnObksEVaAMzP4N0%2Fimage.png?alt=media\&token=dac73993-8c6b-4136-b435-2be2603e8adf)

{% hint style="info" %} <mark style="color:green;">Please Note</mark>: *After getting the data preview in the tabular format, click the **Save** option.* &#x20;
{% endhint %}

* A success message appears, and the newly created Google Analytics dataset gets added to the **Data Sets** list.

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fw0MvaqnPtKxusxFPMkNK%2Fimage.png?alt=media\&token=5f243580-b2b7-44b9-9133-1de919c5e2c8)
