Skip to main content

Add custom data to DatAds with Google Sheets

Bring metrics from a data warehouse, CRM or any tool into DatAds reports per ad and day through a Google Sheet that DatAds creates for you.

Written by Daniel von Mirbach

The Google Sheets connection adds your own metrics to DatAds, with one value per ad and day. DatAds creates a Google Sheet for one ad account, and you fill it with data from a data warehouse, a CRM or any other tool. DatAds reads the sheet at every data refresh and shows your metrics in reports.

Who can use this

  • Plans: Regular and Custom, the legacy Plus and Pro plans, and the free trial. Lite and Starter don't include attribution platforms, and Google Sheets is one of them.

  • Roles: Admin and Member (Members only for attribution platform connections of their clients). Anyone with edit access to the Google Sheet can fill it.

  • Platforms: Meta, TikTok, Google Ads

  • In Google: a Google account with the email address you use to sign in to DatAds.

What the Google Sheets connection gives you

The Google Sheets connection adds every metric column of your Google Sheet as a metric of the connected ad account. The metrics appear in every report of each client that contains the ad account, under 3rd Party Metrics, with the names you give them. You can use them in reports, filters and custom metrics like other metrics.

Use the Google Sheets connection for data that DatAds doesn't load itself, for example orders and revenue from your shop system or data warehouse, leads from a CRM, or margins and returns.

Use Google Sheets for data from a data warehouse or another tool

DatAds doesn't connect directly to data warehouses, such as BigQuery or Snowflake, or to CRMs, such as HubSpot. To bring their data into DatAds, write it into the DatAds Google Sheet with a tool that exports to Google Sheets, for example a scheduled export.

The export must follow the format of the Data tab: one row per ad and day, the date in column A, the ad ID in column B and one column per metric. Every row needs the ad ID from Meta, TikTok or Google Ads. DatAds can't match data by campaign, ad name or UTM parameter.

The Google Sheets connection reads only the sheet that DatAds created for it. You can't connect an existing sheet. If your export covers several ad accounts, you can write the same rows into the sheet of each ad account. Each Google Sheets connection uses only the rows with ad IDs of its own ad account.

Before you connect Google Sheets

Connect Google Sheets to DatAds

To create the Google Sheet for an ad account:

  1. Go to Settings > Connections.

  2. Under Attribution Platforms, on the Google Sheets card, select Connect. If the card already lists a Google Sheets connection, select Add.

  3. In Select Accounts, select the ad account that your data belongs to.

  4. Select Connect.

  5. On the page Google Sheets Template created successfully!, select To Google Sheet.

The Google Sheet opens. DatAds names it after your workspace and ad account: Workspace-Googlesheets-Ad-account-name. DatAds shares the Google Sheet with your email address with edit access. DatAds support also has edit access, so it can help you with the setup.

The new connection appears on the Google Sheets card with the name of the sheet and shows Initializing. To open the Google Sheet later, select the connection on the Google Sheets card, and next to Spreadsheet select Open.

One Google Sheets connection covers one ad account. Each time you connect Google Sheets, DatAds creates a new, empty Google Sheet and a new connection. For data of more ad accounts, repeat the steps for each ad account.

Fill in the Data tab of the Google Sheet

The Data tab holds your values. Row 1 is the header row, and every row below holds one ad on one day. The following table lists the columns of the Data tab:

Column

Header in row 1

What to enter

A

Day (yyyy-mm-dd)

The date, as a Google Sheets date or as text in the format yyyy-mm-dd, for example 2026-03-01.

B

Ad ID

The ad ID from Meta, TikTok or Google Ads. For Google Ads, enter the ad ID only, without the ad group ID.

C and the following columns

The name of a metric, for example New Customers

One number per cell. Empty cells and text count as 0.

Follow these rules for the Data tab:

  • Replace (First Metric goes in here) in cell C1 with the name of your first metric. Add one column per metric. An empty column between metric columns is skipped.

  • Format column B as plain text: in Google Sheets, select the column, then Format > Number > Plain text. Google Sheets rounds numbers with more than 15 digits, so a Meta or TikTok ad ID entered as a number no longer matches the ad.

  • Enter values as numbers, for example 1234.5. A value typed as text with a currency sign can count as 0.

  • Enter one row per ad and day. If the same ad and day appear in two rows, DatAds uses the last row.

  • DatAds reads the rows of the last 365 days and ignores older rows.

  • Keep the tab names Data and Rules.

Fill in the Rules tab of the Google Sheet

The Rules tab tells DatAds how to add up and show each metric of the Google Sheet. Every metric column of the Data tab needs exactly one row in the Rules tab. A ratio, such as revenue per order, only needs a row in the Rules tab. The following table lists the columns of the Rules tab:

Column

What to enter

Metric Name

The metric name exactly as in the header of the Data tab. For a ratio, a new name. DatAds shows this name.

Aggregate Type

How DatAds combines values across days and ads: SUM, AVG, WEIGHTED_AVG or CUSTOM_RATIO.

Numerator (Optional)

For CUSTOM_RATIO: the Data column to divide.

Denominator (Optional)

For CUSTOM_RATIO: the Data column to divide by.

Weighted By (Optional)

For WEIGHTED_AVG: the Data column to weight the average by.

Formatter

How DatAds shows the value: currency, integer, number, percentage, decimalAsPercentage or seconds.

Sort

desc when a higher value is better, asc when a lower value is better, for example a cost per lead.

Enter the values exactly as written in this article, in the same upper and lower case. Replace (First Metric goes in here) in cell A2 with your first metric, and leave no empty row between two rules.

The following table lists the aggregate types:

Aggregate Type

What DatAds does

Use it for

SUM

Adds up the values.

Counts and amounts, such as orders or revenue.

AVG

Averages the values.

Values that are already averages, such as average watch time.

WEIGHTED_AVG

Averages the values, weighted by the column in Weighted By.

Averages where some rows count more, such as a rating weighted by orders.

CUSTOM_RATIO

Divides the total of the Numerator column by the total of the Denominator column.

Rates, such as revenue per order.

The following table lists the formatters:

Formatter

How DatAds shows the value

currency

As an amount of money.

integer

As a whole number, for example 12.

number

As a number with decimals, for example 1.75.

percentage

As a percentage of a share: 0.05 shows as 5.00%.

decimalAsPercentage

As a percentage you entered as a whole number: 5 shows as 5.00%.

seconds

As a duration in seconds.

For example, a Google Sheet with the Data columns Leads, CRM Revenue and CRM Orders needs these rows in the Rules tab:

Metric Name

Aggregate Type

Numerator (Optional)

Denominator (Optional)

Weighted By (Optional)

Formatter

Sort

Leads

SUM

integer

desc

CRM Revenue

SUM

currency

desc

CRM Orders

SUM

integer

desc

CRM Revenue per order

CUSTOM_RATIO

CRM Revenue

CRM Orders

currency

desc

DatAds matches a Metric Name to a Data column without upper and lower case and without characters other than letters, numbers and spaces. Use letters, numbers and spaces only, so that each name stays unique.

The Rules tab can only use columns of the Data tab. To combine a Google Sheets metric with a Meta, TikTok or Google Ads metric, for example CRM revenue divided by spend, create a custom metric in DatAds. See Create a custom metric.

What DatAds syncs from Google Sheets

The following table lists what DatAds reads from the Google Sheet of each Google Sheets connection:

Item

Details

Level

One value per ad and per day.

Metrics

Every metric column of the Data tab with a row in the Rules tab, and every ratio in the Rules tab.

History

The rows of the last 365 days.

First read

At the next data refresh of the ad account, within 12 hours after you connect. Until then, the connection shows Initializing.

Refresh

DatAds reads the whole Google Sheet again at every data refresh of the ad account, about every 12 hours.

Changes to the Google Sheet appear in DatAds after the next data refresh, within 12 hours. A changed value replaces the value DatAds loaded before for the same ad and day. When you delete a row, DatAds keeps the value it already loaded. To remove a value, enter 0 instead of deleting the row.

After the first read, the Google Sheets connection shows Active, No matching ads or Error. See "Troubleshooting the Google Sheets connection" in this article.

How DatAds matches Google Sheets data to your ads

DatAds matches each row of the Data tab to an ad by the ad ID in column B. DatAds uses the rows whose ad ID belongs to the connected ad account and ignores all other rows.

If no row matches an ad of the connected ad account, and the connection has never loaded data, the Google Sheets connection shows No matching ads. A Google Sheet without data rows shows No matching ads too. After you add matching rows, the connection shows Active after the next data refresh.

Limits of the Google Sheets connection

The Google Sheets connection has these limits:

  • One Google Sheet per connection, and one ad account per connection.

  • Daily values per ad only. Values per campaign, per ad set or per hour aren't possible.

  • Rows older than 365 days are ignored.

  • DatAds reads the Google Sheet about every 12 hours. You can't start a read yourself.

  • You can't connect an existing Google Sheet or change which Google Sheet a connection reads.

Reconnect or delete a Google Sheets connection

A Google Sheets connection shows Ad account removed when its ad account was removed from DatAds. To reconnect the Google Sheets connection:

  1. Go to Settings > Connections.

  2. On the Google Sheets card, select the connection.

  3. Select Reconnect.

  4. In Select Accounts, select the ad account whose ad IDs are in the Google Sheet.

  5. Select Reconnect.

DatAds shows "Reconnected. New data usually appears within a few hours." The connection keeps its Google Sheet. For Google Sheets, Select Accounts lists every ad account that is in a client, so you can also link the Google Sheet to another ad account. See A connection shows "Ad account removed".

To delete a Google Sheets connection:

  1. Go to Settings > Connections.

  2. On the Google Sheets card, select the connection.

  3. Select Delete connection and confirm.

DatAds shows "Connection deleted successfully." and stops reading the Google Sheet. The Google Sheet isn't deleted, and DatAds keeps the values it already loaded. If Google Sheets was the last attribution platform connection of the ad account, its metrics stay under 3rd Party Metrics with their old values. Otherwise they leave the metric list after the next data refresh, within 12 hours.

Important: If you connect Google Sheets again after deleting, DatAds creates a new, empty Google Sheet. Copy your data into the new Google Sheet. When you remove the ad account from DatAds, for example by clearing it in Select Accounts or removing it from its last client, DatAds deletes its Google Sheets connection too.

Troubleshooting the Google Sheets connection

When DatAds can't use the Google Sheet, the Google Sheets connection shows Error. To see the cause, select the connection on the Google Sheets card and read Error details. DatAds reads the Google Sheet again at every data refresh, so the connection recovers within 12 hours after you fix the sheet.

"Invalid date format"

Error details shows "Invalid date format:" followed by a value from column A of the Data tab. The date is text in another format, for example 01.03.2026. Enter the date as yyyy-mm-dd, for example 2026-03-01, or as a Google Sheets date.

"Missing metrics in rule sheet"

Error details shows "Missing metrics in rule sheet:" followed by the headers of the Data tab exactly as you wrote them, for example Revenue (€). A metric column of the Data tab has no row in the Rules tab. Add a Rules row with the same name for each.

"Invalid aggregate functions", "Invalid sorts" or "Invalid formatters"

Error details shows "Invalid aggregate functions:", "Invalid sorts:" or "Invalid formatters:" followed by the values DatAds doesn't accept. A cell in the Rules tab has another value or another case than the values in this article, for example Sum or des, or a row in the Rules tab is empty. Correct the value, for example to SUM or desc, and delete empty rows between rules. The message for aggregate functions ends with: Use one of: SUM, AVG, CUSTOM_RATIO, WEIGHTED_AVG.

"Rule … is missing a column with the same name in the data sheet"

Error details says that a rule, or the numerator, denominator or weighted by of a rule, "is missing a column" in the data sheet. A row in the Rules tab names a column that the Data tab doesn't have. Make the names in the Rules tab match the headers of the Data tab, or delete the row. If Error details says that a rule "cannot reference itself", give the ratio a name that differs from its Numerator, Denominator and Weighted By columns.

"Error fetching data" or "Length must be at least 1"

DatAds couldn't read the Google Sheet. "Length must be at least 1" means that row 1 of the Data tab or the Rules tab is empty: restore the header row. "Error fetching data" can mean that a tab was renamed or deleted: keep the tabs Data and Rules. If the error stays after the next data refresh, contact support.

"The Ad ID in row N of the Data sheet is stored as a number"

Error details says "The Ad ID in row N of the Data sheet is stored as a number, so Google Sheets rounded it and it no longer matches an ad." N is the row number. Format column B as plain text: select Format > Number > Plain text. Then paste the ad IDs again.

Google Sheets connection shows No matching ads

No row of the Data tab has an ad ID of the connected ad account and a date in the last 365 days. Check that column B holds the ad IDs of this ad account, formatted as plain text, and that column A holds recent dates.

You can't open the Google Sheet

DatAds shares the Google Sheet with the email address of the DatAds user who connected it. Sign in to Google with that email address, or ask that user to share the Google Sheet with you.

Google Sheets card shows Upgrade to unlock

The Google Sheets card shows Upgrade to unlock when your plan doesn't include attribution platforms. Attribution platforms aren't available on the Lite and Starter plans. To use Google Sheets, upgrade to Regular. See Compare plans.

Google Sheets connection still not working

If the Google Sheets connection still doesn't load data, contact support via the chat in the app or at [email protected]. Send your workspace name, the ad account ID, the name of the Google Sheets connection and the text of its Error details.

Related articles

Did this answer your question?