Overview
Ahrefs is a leading SEO research platform founded in 2010 and headquartered in Singapore. It operates one of the largest web crawlers outside of Google, maintaining a backlink index of over 35 trillion known links. Ahrefs is used extensively by SEO practitioners, digital marketing agencies, and in-house marketing teams for competitive analysis, keyword research, content gap identification, and site auditing. On third-party websites, Ahrefs' presence manifests as embedded SEO metric widgets, Domain Rating (DR) badges, and backlink count displays that site owners use to demonstrate their domain's search authority and link profile health.
What This Script Does
Ahrefs' embeddable widgets load JavaScript from ahrefs.com and associated CDN infrastructure. The scripts query Ahrefs' public metrics API to render data visualisations showing Domain Rating (DR, a 0–100 logarithmic scale), referring domains count, organic traffic estimates, and backlink growth trend lines.
Cookies and identifiers:
ahrefs_session— Session-scoped first-party cookie set onahrefs.comwhen a visitor clicks through from an embedded widget to the Ahrefs platform; expires at session end.ahrefs_ref— Referral attribution cookie tracking which widget or external embed drove a visit to ahrefs.com; typical expiry 30 days._ahrefs_uid— Long-lived first-party identifier used to deduplicate widget impressions and track cross-site widget distribution for Ahrefs' own analytics; expiry up to 12 months.
Script filenames and CDN domains: widget.js and badge.js served from cdn.ahrefs.com. API calls route to api.ahrefs.com/v2/site-explorer/metrics for live metric retrieval. Widget impression and interaction events are transmitted to analytics.ahrefs.com.
Per-interaction data collected:
- Page URL and HTTP referrer of the embedding page
- Widget type rendered (DR badge, backlink count, organic traffic estimate)
- Metric values displayed (used to validate widget data freshness)
- Interaction events: hover, click-through to Ahrefs platform, expand/collapse
- User agent string and approximate IP geolocation for analytics segmentation
Widget engagement feeds Ahrefs' internal reporting on distribution of their metrics across the web and conversion attribution from third-party embeds to Ahrefs subscription trials.
Consent & Compliance
Ahrefs embedded widgets are classified under the analytics category. The data visualisations themselves are informational, but the accompanying tracking — engagement measurement, referral attribution, and widget impression analytics — constitutes non-essential third-party data processing. Under GDPR Article 6(1)(a) and the ePrivacy Directive Article 5(3), cookies set by Ahrefs' widgets for tracking engagement are not strictly necessary for any service explicitly requested by the page visitor and require prior opt-in consent. Singapore-based as Ahrefs is, data transfers to EU/EEA visitors are handled under Standard Contractual Clauses (SCCs). The host site should list Ahrefs as a third-party analytics sub-processor in its privacy notice and Data Processing Agreement. Under CCPA/CPRA, the interaction data, device identifiers, and referral tracking must be disclosed, with opt-out rights provided.
Should You Block This Without Consent?
Yes. Ahrefs embedded widgets collect analytics data, may set attribution cookies, and transmit engagement events to a third-party platform. The widgets are supplementary to the host site's core functionality and should be blocked until the visitor consents to analytics tracking.
Consent Categories
Also Known As
Industries
Tracked Domains (1)
ahrefs.comAnalyticsFrequently Asked Questions
Do Ahrefs embedded widgets require consent?
Yes. Ahrefs widgets set attribution cookies and transmit engagement analytics to Ahrefs servers, serving Ahrefs' own internal reporting rather than the site visitor. These are non-essential third-party analytics activities requiring consent under GDPR Article 6(1)(a) and ePrivacy Directive Article 5(3).
What cookies does an Ahrefs widget set?
Ahrefs widgets set _ahrefs_uid (12-month identifier for cross-site widget impression deduplication), ahrefs_ref (30-day referral attribution cookie), and ahrefs_session (session-scoped). Interaction data — widget type, metric values displayed, clicks, hover events, and page URL — is sent to analytics.ahrefs.com.
How does ConsentStack handle Ahrefs widgets?
ConsentStack blocks Ahrefs widget scripts until analytics consent is granted. The Domain Rating or backlink badge will not render until consent is obtained. ConsentStack can show a placeholder in its place, ensuring the page remains compliant without leaving blank spaces where the widget would appear.
Related Vendors
Manage consent for Ahrefs
ConsentStack automatically detects and manages Ahrefs trackers so your site stays compliant with global privacy regulations.