# How to Connect to ShareASale

> **Note:** Looking to bring your ShareASale affiliate marketing data into a single, automated reporting workflow? This guide will walk you through connecting ShareASale as a data source in Power My Analytics, so you can centralize your transaction, commission, and affiliate metrics, create comprehensive reports, and make data-driven decisions to optimize your affiliate program.

## Prerequisites

Before you begin, make sure you have:

- An active [ShareASale](https://www.shareasale.com/) merchant account
- Permission to access the Merchant API page in ShareASale
- Your **Merchant ID** (visible in the upper-left corner of your ShareASale account)

## Step 1: Generate a ShareASale Token and API Secret

Power My Analytics connects to ShareASale using API credentials generated in your ShareASale account. To create them:

1. Log in to your ShareASale merchant account.
2. Navigate to the **Merchant API** page.
3. Generate a new **Token** and **API Secret**, and keep them in a secure location. You will paste these into the Power My Analytics hub in Step 3.

> **Note:** Note your **Merchant ID** as well — it appears in the upper-left corner of your ShareASale account and is required alongside the Token and API Secret.

## Step 2: Configure ShareASale API IP Settings

> **Important:** Power My Analytics requires your ShareASale Merchant API setting to be set to **"Require IP address match only for version 1.1 and lower"** in order for data to sync correctly. If a stricter IP restriction is enabled for the version Power My Analytics uses, your reports will fail or return no data.

Power My Analytics processes data requests through Google Cloud Functions, which use a dynamic pool of IP addresses that change frequently. Because these IP addresses are not static, it is not possible to provide a fixed list of IPs to whitelist in ShareASale. To configure your ShareASale Merchant API IP settings for use with Power My Analytics:

1. In ShareASale, go to your **Merchant API** settings.
2. Set the IP requirement to **"Require IP address match only for version 1.1 and lower"**.
3. Save your changes.

> **Note:** Your ShareASale account is still protected with this setting. Every API request still requires your Token, API Secret, and Merchant ID for authentication, so only services with all three credentials can access your data.

## Step 3: Add ShareASale as a Data Source in Power My Analytics

1. Log in to your Power My Analytics hub at [https://hub.powermyanalytics.com](https://hub.powermyanalytics.com).
2. Navigate to **Sources** from the main menu.
3. Click **\+ Add new source**.
4. Select **ShareASale** from the list of available sources.
5. Enter your **Token**, **API Secret**, and **Merchant ID** from Step 1.
6. Provide a name for your ShareASale account.
7. Click **Connect** to authenticate and finish adding your ShareASale account as a data source.

Once connected, ShareASale will appear in your list of active data sources. Your ShareASale data will automatically begin syncing to your Power My Analytics data warehouse — 30 days of historical data is imported automatically on the initial backfill, with up to 18 months available via manual backfill. When the initial backfill is finished, you can use this data in Data Studio reports, Google Sheets, Microsoft Excel, or export it to your preferred data destination.

> **Note:** **API request limits:** ShareASale's API allows 200 reports per merchant account per month. Power My Analytics typically generates around 90 reports per month, with each manual backfill generating about 3 additional reports.

> **Note:** **Affiliate Reporting fields:** Use caution when selecting **Affiliates** and **Active Affiliates** fields. There are separate versions labeled **(use in a daily chart)** and **(use in a scorecard)** — using the wrong version in a report will produce inflated values.

## Related Articles

- [ShareASale Data Connector User Guide](https://knowledge.powermyanalytics.com/application/sources/shareasale-data-connector-user-guide/)
- [ShareASale Authorization Error - Invalid Account - Error Code 4002](https://knowledge.powermyanalytics.com/application/troubleshooting/shareasale-authorization-error-invalid-account-error-code-4002/)
- [Basic Troubleshooting](https://knowledge.powermyanalytics.com/application/troubleshooting/basic-troubleshooting/)
- [Submit a Ticket](https://knowledge.powermyanalytics.com/support/submit-a-ticket/)
