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.
Is Ahrefs GDPR compliant?
Ahrefs typically loads analytics trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Ahrefs can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Ahrefs, not on Ahrefs itself.
Consent Categories
Also Known As
Industries
Tracked Domains (1)
ahrefs.comAnalyticsahrefs.com is an analytics domain operated by Ahrefs, used to measure visits, sessions, and on-site behavior.
Frequently Asked Questions
Related Vendors
Manage consent for Ahrefs
ConsentStack automatically detects and manages Ahrefs trackers so your site stays compliant with global privacy regulations.