Connect Klar to see Klar's orders, revenue, return on ad spend (ROAS) and contribution margin for each ad in your DatAds reports. You connect Klar once for each ad account, on the KLAR API V2 card.
Who can use this
Plans: Regular and Custom, the legacy Plus and Pro plans, and the free trial. Lite and the legacy Starter plan don't include attribution platforms.
Roles: Admin and Member (Members only for attribution platform connections of their clients)
Platforms: Meta, TikTok and Google Ads ad accounts that Klar tracks
In Klar: the Klar account owner creates the API key. A Klar user whose role includes the API Key Management permission can also create it.
What connecting Klar gives you
The Klar connection adds Klar metrics to every report of each client that contains the connected ad account. In a report's metric list, Klar metrics are under 3rd Party Metrics. You choose which Klar attribution models and attribution windows DatAds loads, and one date breakdown.
Each Klar metric exists once for every combination of model and window you select. Its name ends with the model, the window and the date breakdown in brackets. For example, ROAS (FT-7d-Order) is Klar's ROAS with the First Touch model, a 7-day window and the order date. Spend doesn't depend on the model or window, so its name shows only the date breakdown, for example Spend (Order).
The following table lists the Klar metrics in DatAds and how DatAds calculates the ratios. NC means new customers and RC means returning customers.
Klar metric | What it shows |
Orders, New Customers, Gross New Customers, Returning Customers | Orders and customers that Klar attributes to the ad. |
Net Revenue, Gross Revenue, NC Net Revenue, RC Net Revenue, NC Gross Revenue, RC Gross Revenue | Revenue that Klar attributes to the ad, in total, from new customers and from returning customers. |
Spend | Ad spend as Klar reports it. |
Sessions, New Visitor Sessions, Returning Visitor Sessions, Product Views, Add to Carts | Shop activity that Klar attributes to the ad. |
CM2 (contribution margin 2) and aCM2 | Contribution margin values as Klar reports them. |
CM3 | CM2 − Spend. |
ROAS | Net Revenue ÷ Spend. |
ROAS (NC) and ROAS (RC) | NC Net Revenue ÷ Spend, and RC Net Revenue ÷ Spend. |
POAS (profit on ad spend) and aPOAS | CM2 ÷ Spend, and aCM2 ÷ Spend. |
CPO (cost per order) and CPO (RC) | Spend ÷ Orders, and Spend ÷ Returning Customers. |
CAC (customer acquisition cost) | Spend ÷ New Customers. |
AOV (average order value), AOV (NC), AOV (RC) | AOV: Net Revenue ÷ Orders. AOV (NC): NC Net Revenue ÷ New Customers. AOV (RC): RC Net Revenue ÷ Returning Customers. |
Unique A2C % | Add to Carts ÷ Sessions. Klar counts each visitor who added to cart once. |
Before you connect Klar
Connect the Meta, TikTok or Google Ads ad account that Klar tracks, and assign it to a client. See Connect Meta ads to DatAds, Connect TikTok ads to DatAds or Connect Google Ads to DatAds.
Create a Klar API key with the Attribution scope, as described in "Create a Klar API key for DatAds" in this article.
Create a Klar API key for DatAds
DatAds reads Klar data with a Klar API key. Only the Klar account owner, or a Klar user whose role includes the API Key Management permission, sees the API Keys tab in Klar.
To create a Klar API key:
In Klar, go to Account Settings > API Keys. The direct link is app.getklar.com/app/account-settings/api-keys.
Select Create New Secret Key.
Enter a name for the key, for example DatAds.
Turn on the Attribution scope (public_api.attribution).
Don't set an expiry date for the Klar API key.
Select Create.
Copy the key. It starts with klar_pk_.
Klar shows the API key only once. If you lose the Klar API key, create a new one.
Important: Without the Attribution scope, DatAds can't load Klar data. When the Klar API key expires, the Klar connection stops loading data until you connect again with a new key.
Important: The Klar API key belongs to the Klar user who created it. If Klar deletes or suspends that user, the key stops working and so does the Klar connection. Create the key with a Klar user who stays active.
Connect Klar to DatAds
You can select at most 6 combinations of Klar attribution models and windows. The number of combinations is the number of models times the number of windows, for example 3 models and 2 windows.
To connect Klar to an ad account:
Go to Settings > Connections.
Under Attribution Platforms, on the KLAR API V2 card, select Connect. If the card already lists a Klar connection, select Add.
In Select Accounts, select the ad account that Klar tracks, then select Connect.
Under Step 1: Provide your KLAR API Key, enter the key in API Key.
Under Step 2: Select your Shop, select Load shops, then select the shop under Shop. If the key has access to one shop only, DatAds selects it for you.
Under Step 3: Select your Date Breakdown, select Order date or Touch date.
Under Attribution Models, select one or more models.
Under Attribution Windows, select one or more windows. Keep the total at 6 combinations or fewer.
Select Finish setup.
DatAds confirms the Klar connection and says that the data will be available in the next 2-3 hours. On the KLAR API V2 card, the connection shows Initializing, then Loading historic data, then Active. Loading historic data takes up to 4 hours, and more than 24 hours for very large accounts. If the Klar connection shows Error or No matching ads, go to "Troubleshooting the Klar connection" in this article.
One Klar connection covers one ad account and one Klar shop. To connect Klar to more ad accounts or shops, repeat the steps for each one. You can use the same Klar API key.
Klar attribution models, windows and date breakdowns you can select
DatAds offers 8 Klar attribution models. The following table lists each Klar model as the setup page shows it, with the short name DatAds adds to metric names:
Klar model on the setup page | Short name in metric names |
First Touch | FT |
Last Touch | LT |
Data Driven | DD |
Linear | LIN |
Any Click Unique | ACU |
U Shape | US |
Time Decay | TD |
Marketing Mix | MM |
The Klar attribution windows in DatAds are Unlimited, 1 Day, 7 Day and 28 Day. Their short names in metric names are Max, 1d, 7d and 28d.
The Klar date breakdown decides on which day DatAds counts a conversion. It applies to every metric of the Klar connection. The following table lists the two Klar date breakdowns:
Date breakdown | Short name in metric names | What it means |
Order date | Order | Revenue is counted on the day the order was placed. |
Touch date | Touch | Revenue is counted on the day the ad was seen or clicked. This lines up revenue with the spend that caused it. |
What DatAds syncs from Klar
The following table lists what DatAds loads from Klar for each connected ad account:
Item | Details |
Level | One value per ad and per day. |
Metrics | The Klar metrics in this article, for each model and window combination you selected, with your date breakdown. |
History | Up to 12 months, loaded in the background after you connect. The Klar connection shows Loading historic data until the history is complete. |
Refresh | Every 12 hours, after DatAds refreshes the ad platform data of the ad account. |
Days reloaded at each refresh | The last 7 days. Klar attributes conversions at most 7 days back, so older days don't change. |
How DatAds matches Klar data to your ads
DatAds matches Klar data by ad ID. Each Klar row has the ad ID from Meta, TikTok or Google Ads. DatAds loads the rows whose ad ID belongs to the connected ad account and ignores all other rows.
If no Klar row matches an ad in the connected ad account, the Klar connection shows No matching ads. This happens, for example, when you selected a shop that doesn't track this ad account. How attribution platforms work in DatAds explains matching for all attribution platforms.
Change the Klar models, windows, date breakdown or API key
A Klar connection has no edit screen. To change the Klar models, windows or date breakdown, or to replace the Klar API key, run the steps in "Connect Klar to DatAds" again. Select the same ad account and the same shop.
DatAds then updates the existing Klar connection instead of adding a new one. If you changed the models, windows or date breakdown, DatAds deletes the Klar data it stored for that ad account. Then DatAds loads the Klar data again with the new settings. A new API key alone doesn't reload the data. A different shop creates a second Klar connection for the same ad account.
Switch from KLAR API V1 to KLAR API V2
DatAds no longer loads data for the KLAR API V1 (deprecated) card. A KLAR API V1 connection shows Error with the Error details "This KLAR integration is no longer supported. Please disconnect it and connect KLAR API V2 instead." Reconnect isn't available for KLAR API V1.
To switch an ad account from KLAR API V1 to KLAR API V2:
Create a Klar API key with the Attribution scope, as described in this article.
Connect Klar on the KLAR API V2 card for the same ad account, as described in "Connect Klar to DatAds".
Go to Settings > Connections.
On the KLAR API V1 (deprecated) card, select the old connection.
Select Delete connection and confirm.
KLAR API V2 metrics are new metrics. Their names add the date breakdown, for example ROAS (FT-7d-Order) instead of ROAS (FT-7d). Replace the KLAR API V1 metrics in your reports, filters and custom metrics with the KLAR API V2 metrics.
Delete or reconnect Klar
To delete a Klar connection:
Go to Settings > Connections.
On the KLAR API V2 card, select the connection.
Select Delete connection.
Confirm the deletion in the dialog that opens.
DatAds shows "Connection deleted successfully." and stops loading Klar data for that ad account. Deleting the Klar connection doesn't delete the Klar data that DatAds already loaded. What happens to the Klar metrics in your reports is described in How attribution platforms work in DatAds.
If the ad account is removed from DatAds, the Klar connection shows Ad account removed. Select the connection, then Reconnect, and pick the ad account again. DatAds keeps the API key, the shop, the models, the windows and the date breakdown. See A connection shows "Ad account removed".
Troubleshooting the Klar connection
"This API key is invalid or expired"
After you select Load shops, the Klar setup page shows "This API key is invalid or expired. Create a new key in KLAR and paste it here." Klar rejected the key, for example because of a typo or because the key expired. Create a new Klar API key, enter it and select Load shops again.
"This key is missing the Attribution scope"
The Klar setup page shows "This key is missing the Attribution scope. Recreate it in KLAR with public_api.attribution enabled." The Klar API key has no Attribution scope. Create a new Klar API key with the Attribution scope turned on, then enter the new key.
"This key's KLAR account has no shops"
The Klar setup page shows "This key's KLAR account has no shops." when the Klar account of the key has no shop. Create the Klar API key in the Klar account that holds the shop for this ad account.
"You selected too many models and windows"
The Klar setup page shows "You selected too many models and windows. At most 6 combinations are allowed (e.g. 3 models and 2 windows). Please unselect attribution models or windows." Finish setup stays turned off. Clear models or windows until the number of models times the number of windows is 6 or less.
Klar connection shows Error with "Authentication error"
The Klar connection shows Error, and its Error details start with "Authentication error". The Error details say one of these:
"The Klar API key is invalid, expired or revoked. Create a new API key in Klar". The key expired, was deleted, or its Klar user was deleted or suspended.
"The Klar API key is missing the public_api.attribution scope, or the selected shop does not belong to this key's Klar account. Recreate the key in Klar with the Attribution scope enabled."
To fix the Klar connection, create a new Klar API key with the Attribution scope. Then run the steps in "Connect Klar to DatAds" again for the same ad account and the same shop, with the new key.
Klar connection shows No matching ads
The Klar connection shows No matching ads when no Klar data matched an ad in the connected ad account. Make sure that the shop you selected tracks this ad account. Then make sure that Klar shows data for these ads.
KLAR API V2 card shows Upgrade to unlock
The KLAR API V2 card shows Upgrade to unlock when your plan doesn't include attribution platforms. Klar isn't available on Lite and the legacy Starter plan. To connect Klar, upgrade to Regular. See Compare plans.
Klar connection still not working
If the Klar 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 Klar connection and the text of its Error details. Never send your Klar API key.

