Aggregation
Looker Studio's aggregations should not be used for Ahrefs report types that truncate data, as they will produce incorrect results.
info
For more implications of data truncation, see Data size restrictions.
Instead, we expose some metric fields as part of our connector schema, in addition to regular dimension fields. You should place metric fields under "Metrics", and all other fields (i.e., dimension fields) under "Dimensions" in the Looker Studio chart property pane. The data exhibits different behavior depending on the composition of the requested fields:
- A mixture of dimension and metric fields: Ahrefs aggregates on the metric fields before returning the result to Looker Studio, treating the other fields as aggregation keys. This ensures both metric accuracy and compliance with the data size restrictions.
- No metric fields: Ahrefs returns the standard, non-aggregated data.
- Metric fields only: Ahrefs returns single value statistics calculated from the entire dataset.
How to identify metric fields
We indicate metric fields by the following suffixes.
[Count]Counts the number of occurrences of the field’s values.[Avg]Finds the average of the field’s values.[Max]Finds the maximum of the field’s values.[Min]Finds the minimum of the field’s values.[Exists]Indicates whether at least one of the field’s values is true.[All]Indicates whether all of the field’s values are true.
Special behavior for backlinks
Backlinks grouping mode
For the Ahrefs report type Backlinks, the requested fields affect the type of data we return.
If both Ref. page URL and Target URL are among the requested fields, the data returned is a Backlinks report. Under this setting, the behavior depends on the backlinks grouping mode selected in the data source configuration:
All backlinks: There is no special behavior.Group similar: Dimension field values will be of each grouping's "best" (i.e., not "garbage") link. If metric fields are among the requested fields, metrics will be aggregated per similarity group.One link per domain: Dimension field values will be of the link chosen for each domain. If metric fields are among the requested fields, metrics will be aggregated per domain.
Limitation on number of requestable dimension fields
For performance reasons, the maximum number of dimension fields that can be requested at once is 4.