📖

Date range usage in Site Audit reports

Historical charts and current crawl selection

In the Site Audit connector, the date range parameter has two functions: defining the period for historical charts, and selecting the current crawl.

You can build historical charts with fields from the "Project history" field group, which shows the same data as the "Project history" report in Site Audit. For example, you can build historical charts of changes in Health Score or the number of pages with/without issues. For these charts, the date range controls the period of historical data to show.

You can also create scorecards and charts using fields from the "Page Explorer (PE)" and "Link Explorer (LE)" field groups, or retrieve issue statistics for a given crawl using fields from the "All Issues" field group. Here, the date range controls which crawl's data will be shown for those fields.

For reports that use the connector, we suggest the following date range configuration.

  • Set a default date range for the overall report so that it selects the most recent crawl.
  • Set chart-specific date ranges for historical charts, to override the default setting.
💡
Note that if you created a report from our Site Audit template, these settings have already been applied for you. However, you should still change the default date range to match your project's crawl settings. We explain how to choose an ideal default date range for your project in the next section.

How to select the latest crawl using the date range

This section explains how to derive an ideal date range for your project to retrieve the latest crawl data.

For best results, the date range should only select one crawl; if you are also using comparison metrics, the comparison date range should only select the crawl before. In general, this is achieved by using the same date range duration as your project's crawl frequency.

As long as the date range only selects one crawl, this method should work for Ahrefs report types with both Historical and Crawl selection date range usage.

⚠️
Comparison metrics behavior is not guaranteed when your project has crawls started at irregular intervals.

For example, consider a project with a weekly crawl schedule. Suppose we have a chart that requests fields from Page Explorer, which has Crawl selection date range usage.

image

Here, the main date range is set to the "Last 7 days (including today)" preset, to match the project's weekly schedule. The comparison date range is set to "Previous Period". They select crawls 4 and 3, respectively.

The problem is that when you access the chart during an ongoing crawl, your date range might not select any crawl at all:

image

Now, using the same presets, the main date range doesn't select a crawl, and the comparison date range selects crawl 4! As a result, the chart will show an error.

You can mitigate this possibility by offsetting the main date range's end date by a few days. The ideal number of days depends on your priorities for the report. There's a tradeoff between avoiding report breakage and getting more recent crawl data.

Prioritize avoiding report breakage

Use this rule of thumb if you never want your reports to break due to an invalid date range setting:

  • Use the same interval as your project's crawl interval.
  • Set the End Date to "Today Minus N Days", where N is the the maximum crawl duration plus one day.
image

For example, suppose your project has a weekly crawl schedule, with a max crawl duration of 48 hours. Then, for guaranteed crawl data availability, N should be 2 + 1 = 3 days. Select the Advanced option in the date range panel, and set the Start Date to "Today Minus 10 Days" (7 + 3 = 10) and the End Date to "Today Minus 3 Days". The tradeoff is that you'll see data for what was considered to be the latest crawl three days ago.

Prioritize displaying recent crawl data

You might consider opting for a smaller date offset if all of the following are true.

  • You want to wait less for the latest crawl data to appear in your Data Studio report.
  • Your project's crawl duration usually falls short of the maximum.
  • On rare cases where accessing the report during an ongoing crawl does break the report due to the date range setting, you don't mind manually setting a valid date range.

Suppose you find that your project usually only takes about 24 hours to crawl in practice, and don't mind changing the date range when your report breaks when accessed during an ongoing crawl. Then you might opt for the "Last 7 days" preset (excluding today), which lets you see data for what was considered to be the latest crawl one day ago.

How to select a past crawl using the date range

You may occasionally want your report to display data for a specific crawl from the past. This section explains how to derive the ideal date range for such a case.

Choose the main date range (and the comparison date range, for comparison metrics) so that they each select the intended crawl.

For example, to compare a specific crawl with the one immediately before it:

image

Here, the main date range selects crawl 3, and the comparison date range selects crawl 2.

Finally, we look at a more contrived example, to show the difference in behavior between Ahrefs report types when the date range overlaps with more than one crawl:

image
  • If this is for an Ahrefs report type with Historical date range usage, the main date range selects crawls 3 and 4, and the comparison date range selects crawls 1 and 2.
  • If this is for an Ahrefs report type with Crawl selection data range usage, the main date range selects crawl 4, and the comparison data range selects crawl 2.