Ahrefs

Ahrefs

Ahrefs embeds SEO metric widgets including backlink and traffic data badges on partner and third-party websites. Scripts may load data visualizations that set tracking cookies to measure engagement and attribute referral traffic. Primarily a SaaS SEO toolset.

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 on ahrefs.com when 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.

Visit website

Consent Categories

Analytics

Also Known As

Ahrefs SEOAhrefs backlinksAhrefs widgetAhrefs site explorerSEO toolset

Industries

Computers Electronics and Technology

Tracked Domains (1)

ahrefs.comAnalytics

Frequently 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

Google
Google
Google is the dominant provider of web analytics, advertising, and infrastructure tools. Scripts like Google Analytics, Tag Manager, Ads, and reCAPTCHA collect behavioral data, manage tag firing, serve targeted ads, and detect bots. Sets persistent cookies to track users and correlate activity across sites.
Google Analytics
Google Analytics
Google Analytics is the world's most widely deployed web analytics platform. Scripts track page views, sessions, user demographics, traffic sources, and conversion events. Drops cookies to identify returning visitors and attribute user journeys across sessions.
Firebase
Firebase
Firebase is Google's mobile and web application development platform offering authentication, real-time database, cloud functions, and analytics. Web SDK scripts initialize Firebase services and may track app events via Firebase Analytics, which is powered by Google Analytics 4. Widely used in single-page apps and PWAs for backend infrastructure and usage tracking.
Microsoft
Microsoft
Runs Clarity (session recording and heatmaps), the Microsoft Advertising UET tag (conversion tracking), and Bing's remarketing pixel. Clarity injects a recording script that captures mouse movements, clicks, and rage clicks. The UET tag fires conversion events to tie ad clicks to on-site actions across Microsoft's ad network.
Microsoft Dynamics 365
Microsoft Dynamics 365
Microsoft Dynamics 365 is a suite of CRM and ERP applications that integrates with websites through tracking scripts and embedded forms. Web tracking code captures visitor behavior, page views, and form submissions to build customer profiles and score leads. Sets cookies to identify returning visitors and attribute marketing touchpoints across sessions.
LinkedIn Insight Tag
LinkedIn Insight Tag
LinkedIn Insight Tag is a JavaScript tracking pixel for LinkedIn's advertising and analytics platform. The tag fires on every page view to collect URL, referrer, IP address, and device data for conversion tracking, website demographics reporting, and retargeting audience building. Sets cookies to identify LinkedIn members across advertiser websites.

Manage consent for Ahrefs

ConsentStack automatically detects and manages Ahrefs trackers so your site stays compliant with global privacy regulations.