1var Pa=Object.defineProperty;var Ua=(t,a,s)=>a in t?Pa(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;var T=(t,a,s)=>(Ua(t,typeof a!="symbol"?a+"":a,s),s);import{j as e,H as Ea,E as dt,r as o,T as Oa,u as Be,a as fe,b as Ie,c as gs,d as fs,N as Ze,z as ve,S as Da,e as qa,s as La,t as bs,f as ys,g as ht,h as Ma,i as js,C as Fa,k as vs,P as Ba,l as ws,I as Ns,m as Rs,n as Ts,o as Cs,R as Ss,D as Ha,L as ks,p as Is,q as $a,v as Ja,w as v,G as de,X as ee,M as Va,x as Wa,y as za,A as Ya,B as re,F as He,J as be,K as O,O as ut,Q as W,U as le,V as Ga,W as _s,Y as mt,Z as As,_ as $e,$ as Ps,a0 as Ka,a1 as Qa,a2 as Xa,a3 as Za,a4 as Us,a5 as Es,a6 as er,a7 as tr,a8 as et,a9 as tt,aa as ye,ab as me,ac as sr,ad as Os,ae as I,af as Je,ag as ar,ah as rr,ai as ir,aj as Ds,ak as Ce,al as qs,am as Le,an as xt,ao as nr,ap as Ls,aq as lr,ar as or,as as xe,at as pt,au as cr,av as gt,aw as ft,ax as st,ay as Ms,az as Fs,aA as Bs,aB as Hs,aC as dr,aD as $s,aE as hr,aF as ur,aG as Js,aH as mr,aI as Vs,aJ as xr,aK as pr,aL as Ws,aM as gr,aN as zs,aO as Ys,aP as fr,aQ as br,aR as Gs,aS as yr,aT as jr,aU as Ks,aV as Qs,aW as vr,aX as wr,aY as Xs,aZ as Zs,a_ as Nr,a$ as Rr,b0 as ea,b1 as ta,b2 as sa,b3 as aa,b4 as ra,b5 as ia,b6 as Tr,b7 as Cr,b8 as na,b9 as la,ba as oa,bb as _e,bc as at,bd as Lt,be as Mt,bf as Sr,bg as kr,bh as Ir,bi as ca,bj as da,bk as _r,bl as Ar,bm as Pr,bn as Ur,bo as Er,bp as Or,bq as Dr,br as qr,bs as Lr,bt as Mr,bu as Fr,bv as Br}from"./vendor-a4eab374.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const c of n.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function s(r){const n={};return r.integrity&&(n.integrity=r.integrity),r.referrerPolicy&&(n.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?n.credentials="include":r.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(r){if(r.ep)return;r.ep=!0;const n=s(r);fetch(r.href,n)}})();const Hr=["https://fonts.googleapis.com/css2?family=Manrope:[email protected]&display=swap"],$r=()=>e.jsx(Ea,{children:Hr.map(t=>e.jsx("link",{href:t,rel:"stylesheet"},t))}),Jr=({children:t})=>e.jsx(dt,{fallback:null,onError:a=>{console.error("Caught error in AppWrapper",a.message,a.stack)},children:t}),Vr={theme:"system",setTheme:()=>null},ha=o.createContext(Vr);function Wr({children:t,defaultTheme:a="system",storageKey:s="riff-wild-muted-chord-o2a0-ui-theme",...i}){const[r,n]=o.useState(()=>localStorage.getItem(s)||a);o.useEffect(()=>{const d=window.document.documentElement;if(d.classList.remove("light","dark"),r==="system"){const u=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";d.classList.add(u);return}d.classList.add(r)},[r]);const c={theme:r,setTheme:d=>{localStorage.setItem(s,d),n(d)}};return e.jsx(ha.Provider,{...i,value:c,children:t})}const zr=()=>{const t=o.useContext(ha);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};function Yr(){o.useEffect(()=>{document.querySelectorAll("link[rel*='icon']").forEach(n=>{var c;return(c=n.parentNode)==null?void 0:c.removeChild(n)});const a=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none"> 2 <rect width="32" height="32" rx="6" fill="#0a1628"/> 3 <rect x="5" y="18" width="5" height="9" rx="1.5" fill="#0077cc"/> 4 <rect x="12.5" y="12" width="5" height="15" rx="1.5" fill="#0077cc"/> 5 <rect x="20" y="6" width="5" height="21" rx="1.5" fill="#38bdf8"/> 6 <path d="M7.5 16 L15 10 L22.5 4" stroke="#38bdf8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/> 7 </svg>`,s=new Blob([a],{type:"image/svg+xml"}),i=URL.createObjectURL(s),r=document.createElement("link");return r.rel="icon",r.type="image/svg+xml",r.href=i,document.head.appendChild(r),document.title="usagemetrics.ai â COUNTER R5.1 Compliance, Automated",()=>URL.revokeObjectURL(i)},[])}function Gr(){const t=Be();fe(),Ie(),o.useEffect(()=>{t||localStorage.getItem("dtbn-login-next")||localStorage.setItem("dtbn-login-next","/publisher-dashboard")},[t])}const Kr=({children:t})=>{const{theme:a}=zr();return Yr(),Gr(),e.jsxs(e.Fragment,{children:[t,e.jsx(Oa,{theme:a,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}})]})};var bt=(t=>(t.DEV="development",t.PROD="production",t))(bt||{});const ua="production",G="/api",Se="https://www.usagemetrics.ai",ue="/",Qr={}.VITE_LOCAL==="true";function rt(t,a){if(t===null)return t;switch(typeof t){case"string":return t;case"number":return t;case"boolean":return t;case"undefined":return t;case"symbol":return t.toString();case"bigint":return t.toString();case"function":return`[Function: ${t.name||"anonymous"}]`}if(typeof t=="object"){if(a.has(t))return"[Circular]";if(a.add(t),t instanceof Error){const i=[];if(t.stack)for(const r of t.stack.split(` 8`)){if(/node_modules/.test(r))break;const n=r.replace(/(http:.*\/ui\/src\/)/,"");i.push(n)}return i.length>0?i.join(` 9`):`${t.name?t.name:"Error"}: ${t.message}`}if(t instanceof Response)return"[FetchResponse]";if(Promise.resolve(t)===t)return"[Promise]";if(Array.isArray(t))return t.map(i=>rt(i,a));const s={};for(const[i,r]of Object.entries(t))if(Object.hasOwn(t,i)){const n=rt(r,a);n!==void 0&&(s[i]=n)}return s}try{return structuredClone(t)}catch{return`[Non-Cloneable: ${typeof t}]`}}function Xr(t){return rt(t,new WeakSet)}const ma=t=>{if(Qr)console.log(t);else try{window.parent.postMessage(Xr(t),window.location.origin)}catch(a){console.error(a),gs(a)}},xa=({source:t})=>{const a=o.useCallback(()=>{ma({event:"app-beacon",payload:{source:t}})},[t]);o.useEffect(()=>{a();const s=setInterval(a,1e3);return()=>{clearInterval(s)}},[a])},Zr=()=>{const t=o.useRef(!1);o.useEffect(()=>{t.current||(t.current=!0)},[])},ei=t=>{ma({event:"app-pagechange",payload:{timestamp:new Date().getTime(),location:t}})},ti=()=>{const t=Ie();o.useEffect(()=>{ei({pathname:t.pathname,hash:t.hash,search:t.search})},[t])},si=({children:t})=>(xa({source:"message-emitter"}),Zr(),ti(),e.jsx(e.Fragment,{children:t})),pa=({text:t,canRefresh:a})=>(xa({source:"error-page"}),e.jsxs("div",{style:{display:"flex",flexFlow:"column",gap:"20px",padding:"20px"},children:[t,e.jsx("div",{style:{display:"flex",gap:"10px"},children:a&&e.jsx("button",{style:{color:"blue",width:"fit-content"},type:"button",onClick:()=>{window.location.reload()},children:"Reload page"})})]})),ai=t=>e.jsx(pa,{text:"Something went wrong. Please retry or contact support.",canRefresh:!1}),ri=(t,a)=>{gs(t)},ii=({children:t})=>e.jsx(dt,{fallbackRender:ai,onError:ri,children:t}),ni=t=>t instanceof Error?t.message.replaceAll(`${window.location.origin}/ui/src`,"").replaceAll(/\?t=\d*/g,""):"Something went wrong",li=t=>e.jsx(pa,{text:e.jsxs("div",{style:{display:"flex",flexFlow:"column"},children:[e.jsx("p",{style:{fontWeight:"bold"},children:"An error occured:"}),e.jsx("p",{children:ni(t.error)}),ua===bt.DEV&&e.jsx("p",{style:{marginTop:"40px",fontWeight:"bold"},children:"You can find more info in the console or by asking the agent to debug the error."})]}),canRefresh:!0}),oi=(t,a)=>{console.error(t.message)},ci=({children:t})=>e.jsx(dt,{fallbackRender:li,onError:oi,children:t});function Ft(t){console.error(t==null?void 0:t.reason)}const di=({children:t,shouldRender:a})=>(o.useEffect(()=>{if(a)return window.addEventListener("unhandledrejection",Ft),()=>{window.removeEventListener("unhandledrejection",Ft)}},[a]),a?e.jsx(ii,{children:e.jsx(ci,{children:e.jsx(si,{children:t})})}):e.jsx(e.Fragment,{children:t})),ga=({text:t,canRefresh:a})=>e.jsxs("div",{style:{display:"flex",flexFlow:"column",gap:"20px",padding:"20px"},children:[t,e.jsx("div",{style:{display:"flex",gap:"10px"},children:a&&e.jsx("button",{style:{color:"blue",width:"fit-content"},type:"button",onClick:()=>{window.location.reload()},children:"Reload page"})})]});function hi(){return e.jsx(ga,{text:"Page not found.",canRefresh:!1})}function ui(){return e.jsx(ga,{text:"Something went wrong.",canRefresh:!0})}const Ge=({children:t})=>e.jsx(o.Suspense,{children:t}),mi=(t,a)=>{},xi=t=>{if(typeof window<"u"&&window.localStorage){const a=localStorage.getItem(t);return localStorage.removeItem(t),a}return null},pi=()=>{const t=fs(),a=new URLSearchParams(window.location.search),s=t.useUser();s&&mi(s.id,{email:s.primaryEmail||void 0,name:s.displayName||void 0});const i=a.get("next")||xi("dtbn-login-next");return i?e.jsx(Ze,{to:i,replace:!0}):e.jsx(Ze,{to:"/",replace:!0})},gi=ve.object({projectId:ve.string().default(""),jwksUrl:ve.string().default(""),publishableClientKey:ve.string().default(""),handlerUrl:ve.string().default("auth")}),we=gi.parse(JSON.parse('{"projectId":"6586dcf6-153f-4be2-98d4-5fdb19b33090","publishableClientKey":"pck_mghzj8m3wc430g3gxa61v8bq6yjeg5pnwpt5cq2xftm2r","jwksUrl":"https://api.stack-auth.com/api/v1/projects/6586dcf6-153f-4be2-98d4-5fdb19b33090/.well-known/jwks.json","secretRefForSecretServerKey":{"env":"app","name":"STACK_SECRET_SERVER_KEY"}}'));function Re(...t){return`/${t.join("/")}`.replace(/\/{2,}/g,"/")}const ke=new Da({projectId:we.projectId,publishableClientKey:we.publishableClientKey,tokenStore:"cookie",redirectMethod:{useNavigate:fe},urls:{handler:Re(ue,we.handlerUrl),home:Re(ue,"/"),afterSignIn:Re(ue,we.handlerUrl,"redirect"),afterSignUp:Re(ue,we.handlerUrl,"redirect")}}),fi=()=>{const t=Ie();return e.jsx(qa,{children:e.jsx(La,{app:ke,location:Re(ue,t.pathname),fullPage:!0})})},bi=o.createContext(void 0),yi=(t,a)=>{typeof window<"u"&&window.localStorage&&localStorage.setItem(t,a)},ji=t=>{const a=fs(),s=Be(),{pathname:i}=Ie();
9if(!s){const r=new URLSearchParams(window.location.search);i!==a.urls.signOut&&(yi("dtbn-login-next",i),r.set("next",i));const n=r.toString();return e.jsx(Ze,{to:`${a.urls.signIn.replace(ue,"/").replace("//","/")}?${n}`,replace:!0})}return e.jsx(bi.Provider,{value:{user:s},children:t.children})},vi={getAuthHeaderValue:async()=>{const t=await ke.getUser();if(!t)return"";const{accessToken:a}=await t.getAuthJson();return`Bearer ${a}`},getAuthToken:async()=>{const t=await ke.getUser();if(!t)return"";const{accessToken:a}=await t.getAuthJson();return a??""}};var J=(t=>(t.Json="application/json",t.FormData="multipart/form-data",t.UrlEncoded="application/x-www-form-urlencoded",t.Text="text/plain",t))(J||{});class wi{constructor(a={}){T(this,"baseUrl","");T(this,"securityData",null);T(this,"securityWorker");T(this,"abortControllers",new Map);T(this,"customFetch",(...a)=>fetch(...a));T(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});T(this,"setSecurityData",a=>{this.securityData=a});T(this,"contentFormatters",{"application/json":a=>a!==null&&(typeof a=="object"||typeof a=="string")?JSON.stringify(a):a,"text/plain":a=>a!==null&&typeof a!="string"?JSON.stringify(a):a,"multipart/form-data":a=>Object.keys(a||{}).reduce((s,i)=>{const r=a[i];if(Array.isArray(r))for(const n of r)s.append(i,n instanceof Blob?n:typeof n=="object"&&n!==null?JSON.stringify(n):`${n}`);else s.append(i,r instanceof Blob?r:typeof r=="object"&&r!==null?JSON.stringify(r):`${r}`);return s},new FormData),"application/x-www-form-urlencoded":a=>this.toQueryString(a)});T(this,"createAbortSignal",a=>{if(this.abortControllers.has(a)){const i=this.abortControllers.get(a);return i?i.signal:void 0}const s=new AbortController;return this.abortControllers.set(a,s),s.signal});T(this,"abortRequest",a=>{const s=this.abortControllers.get(a);s&&(s.abort(),this.abortControllers.delete(a))});T(this,"request",async({body:a,secure:s,path:i,type:r,query:n,format:c,baseUrl:d,cancelToken:u,...b})=>{const m=(typeof s=="boolean"?s:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{}
9,l=this.mergeRequestParams(b,m),j=n&&this.toQueryString(n),y=this.contentFormatters[r||"application/json"],S=c||l.format;return this.customFetch(`${d||this.baseUrl||""}${i}${j?`?${j}`:""}`,{...l,headers:{...l.headers||{},...r&&r!=="multipart/form-data"?{"Content-Type":r}:{}},signal:(u?this.createAbortSignal(u):l.signal)||null,body:typeof a>"u"||a===null?null:y(a)}).then(async w=>{const _=w;_.data=null,_.error=null;const C=S?await w[S]().then(g=>(_.ok?_.data=g:_.error=g,_)).catch(g=>(_.error=g,_)):_;if(u&&this.abortControllers.delete(u),!w.ok)throw C;return C})});Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(r=>this.encodeQueryParam(s,r)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(r=>typeof s[r]<"u").map(r=>Array.isArray(s[r])?this.addArrayQueryParam(s,r):this.addQueryParam(s,r)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}
9mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}async*requestStream({body:a,secure:s,path:i,type:r,query:n,format:c,baseUrl:d,cancelToken:u,...b}){const m=(typeof s=="boolean"?s:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},l=this.mergeRequestParams(b,m),j=n&&this.toQueryString(n),y=this.contentFormatters[r||"application/json"];let S;try{if(S=await this.customFetch(`${d||this.baseUrl||""}${i}${j?`?${j}`:""}`,{...l,headers:{...l.headers||{},...r&&r!=="multipart/form-data"?{"Content-Type":r}:{}},signal:(u?this.createAbortSignal(u):l.signal)||null,body:typeof a>"u"||a===null?null:y(a)}),!S.ok)throw new Error("Response not OK");const w=S.body.getReader(),_=new TextDecoder,C=S.headers.get("Content-Type");for(;;){const{done:g,value:p}=await w.read();if(g)break;let k=_.decode(p,{stream:!0}),E;if(C==="application/json"){let f=_.decode(p,{stream:!0});try{E=JSON.parse(f)}catch(D){throw new Error(D)}}else C==="application/octet-stream"?E=new Uint8Array(p):E=_.decode(p,{stream:!0});yield E}}catch(w){throw new Error(w)}finally{u&&this.abortControllers.delete(u)}}}class Ni extends wi{constructor(){super(...arguments);T(this,"check_health",(s={})=>this.request({path:"/_healthz",method:"GET",...s}));T(this,"get_sample_report",(s={})=>this.request({path:"/routes/sample",method:"GET",...s}));T(this,"submit_waitlist",(s,i={})=>this.request({path:"/routes/submit",method:"POST",body:s,type:J.Json,...i}));T(this,"sushi_status",(s={})=>this.request({path:"/routes/sushi/r51/status",method:"GET",...s}));T(this,"sushi_members",(s,i={})=>this.request({path:"/routes/sushi/r51/members",method:"GET",query:s,...i}));T(this,"list_reports",(s,i={})=>this.request({path:"/routes/sushi/r51/reports",method:"GET",query:s,...i}));T(this,"get_report_tsv",({reportType:s,...i},r={})=>this.request({path:`/routes/sushi/r51/reports/${s}/tsv`,method:"GET",query:i,...r}));T(this,"get_report_json",({reportType:s,...i},r={})=>this.request({path:`/routes/sushi/r51/reports/${s}`,method:"GET",query:i,...r}));T(this,"get_sitemap_xml",(s={})=>this.request({path:"/routes/sitemap.xml",method:"GET",...s}));T(this,"get_my_account",(s={})=>this.request({path:"/routes/accounts/me",method:"GET",...s}));T(this,"get_or_create_account",(s={})=>this.request({path:"/routes/accounts/me",method:"POST",...s}));T(this,"update_my_account",(s,i={})=>this.request({path:"/routes/accounts/me",method:"PATCH",body:s,type:J.Json,...i}));T(this,"get_robots_txt",(s={})=>this.request({path:"/routes/robots.txt",method:"GET",...s}));T(this,"list_platforms",(s={})=>this.request({path:"/routes/platforms/",method:"GET",...s}));T(this,"create_platform",(s,i={})=>this.request({path:"/routes/platforms/",method:"POST",body:s,type:J.Json,...i}));T(this,"update_platform",({platformId:s,...i},r,n={})=>this.request({path:`/routes/platforms/${s}`,method:"PATCH",body:r,type:J.Json,...n}));T(this,"delete_platform",({platformId:s,...i},r={})=>this.request({path:`/routes/platforms/${s}`,method:"DELETE",...r}));T(this,"list_all_institutions",(s={})=>this.request({path:"/routes/platforms/institutions/all",method:"GET",...s}));T(this,"create_institution",(s,i={})=>this.request({path:"/routes/platforms/institutions",method:"POST",body:s,type:J.Json,...i}));T(this,"update_institution",({customerId:s,...i},r,n={})=>this.request({path:`/routes/platforms/institutions/${s}`,method:"PATCH",body:r,type:J.Json,...n}));T(this,"delete_institution",({customerId:s,...i},r={})=>this.request({path:`/routes/platforms/institutions/${s}`,method:"DELETE",...r}));T(this,"link_institution_to_platform",({platformId:s,customerId:i,...r},n={})=>this.request({path:`/routes/platforms/${s}/institutions/${i}`,method:"POST",...n}));T(this,"unlink_institution_from_platform",({platformId:s,customerId:i,...r},n={})=>this.request({path:`/routes/platforms/${s}/institutions/${i}`,method:"DELETE",...n}));T(this,"get_institution_usage",({customerId:s,...i},r={})=>this.request({path:`/routes/platforms/institutions/${s}/usage`,method:"GET",query:i,...r}));T(this,"ingestion_health",(s,i={})=>this.request({path:"/routes/api/usages/usages-health",method:"GET",query:s,...i}));T(this,"save_search_activity",(s,i,r={})=>this.request({path:"/routes/api/usages/search-activities",method:"POST",query:s,body:i,type:J.Json,...r}));T(this,"save_search_activities",(s,i,r={})=>this.request({path:"/routes/api/usages/search-activities/multiple",method:"POST",query:s,body:i,type:J.Json,...r}));T(this,"save_document_activity",(s,i,r={})=>this.request({path:"/routes/api/usages/document-activities",method:"POST",query:s,body:i,type:J.Json,...r}));T(this,"save_document_activities",(s,i,r={})=>this.request({path:"/routes/api/usages/document-activities/multiple",method:"POST",query:s,body:i,type:J.Json,...r}));T(this,"save_institutions",(s,i,r={})=>this.request({path:"/routes/api/usages/institutions/multiple",method:"POST",query:s,body:i,type:J.Json,...r}));T(this,"save_institution_associations",(s,i,r={})=>this.request({path:"/routes/api/usages/institutions-associations/multiple",method:"POST",query:s,body:i,type:J.Json,...r}));T(this,"get_llms_txt",(s={})=>this.request({path:"/routes/llms.txt",method:"GET",...s}));T(this,"get_llms_full_txt",(s={})=>this.request({path:"/routes/llms-full.txt",method:"GET",...s}))}}const Ri=()=>window.location.origin.includes("localhost")?`${window.location.origin}${G}`:`${Se}${G}`,Ti=()=>({credentials:"include",secure:!0}
9),Ci=()=>{const t=Ri(),a=Ti();return new Ni({baseUrl:t,baseApiParams:a,customFetch:(s,i)=>{const r=s.replace(G+"/routes",G);return fetch(r,i)},securityWorker:async()=>({headers:{Authorization:await vi.getAuthHeaderValue()}})})},F=Ci();function R(...t){return bs(ys(t))}const yt=ht("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),A=o.forwardRef(({className:t,variant:a,size:s,asChild:i=!1,...r},n)=>{const c=i?Ma:"button";return e.jsx(c,{className:R(yt({variant:a,size:s,className:t})),ref:n,...r})});A.displayName="Button";const Si=$a,ki=Ja,Ii=o.forwardRef(({className:t,inset:a,children:s,...i},r)=>e.jsxs(js,{ref:r,className:R("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",t),...i,children:[s,e.jsx(Fa,{className:"ml-auto h-4 w-4"})]}));Ii.displayName=js.displayName;const _i=o.forwardRef(({className:t,...a},s)=>e.jsx(vs,{ref:s,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...a}));_i.displayName=vs.displayName;const fa=o.forwardRef(({className:t,sideOffset:a=4,...s},i)=>e.jsx(Ba,{children:e.jsx(ws,{ref:i,sideOffset:a,className:R("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s})}));fa.displayName=ws.displayName;const qe=o.forwardRef(({className:t,inset:a,...s},i)=>e.jsx(Ns,{ref:i,className:R("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",t),...s}));qe.displayName=Ns.displayName;const Ai=o.forwardRef(({className:t,children:a,checked:s,...i},r)=>e.jsxs(Rs,{ref:r,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:s,...i,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Ts,{children:e.jsx(Cs,{className:"h-4 w-4"})})}),a]}));Ai.displayName=Rs.displayName;const Pi=o.forwardRef(({className:t,children:a,...s},i)=>e.jsxs(Ss,{ref:i,className:R("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...s,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(Ts,{children:e.jsx(Ha,{className:"h-4 w-4 fill-current"})})}),a]}));Pi.displayName=Ss.displayName;const Ui=o.forwardRef(({className:t,inset:a,...s},i)=>e.jsx(ks,{ref:i,className:R("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",t),...s}));Ui.displayName=ks.displayName;const Ei=o.forwardRef(({className:t,...a},s)=>e.jsx(Is,{ref:s,className:R("-mx-1 my-1 h-px bg-muted",t),...a}));Ei.displayName=Is.displayName;const B=()=>
9{const[t,a]=o.useState(!1),s=Ie(),i=fe(),r=Be(),n=s.pathname==="/"||s.pathname==="/fr"||s.pathname==="/es",c=b=>{if(!n){i(`/#${b}`);return}const m=document.getElementById(b);m&&m.scrollIntoView({behavior:"smooth"}),a(!1)},d="text-sm font-medium text-gray-600 hover:text-[#0a1628] transition-colors",u="text-sm font-medium text-[#0a1628] border-b-2 border-[#0a1628] pb-0.5";return e.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-md border-b border-gray-100",children:[e.jsxs("nav",{className:"container mx-auto px-6 h-20 flex items-center justify-between",children:[e.jsxs(v,{to:"/",className:"flex items-center gap-2.5 group",children:[e.jsx("div",{className:"relative w-9 h-9 flex items-center justify-center",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",className:"w-9 h-9",children:[e.jsx("rect",{width:"32",height:"32",rx:"7",fill:"#0a1628"}),e.jsx("rect",{x:"5",y:"18",width:"5",height:"9",rx:"1.5",fill:"#0077cc"}),e.jsx("rect",{x:"12.5",y:"12",width:"5",height:"15",rx:"1.5",fill:"#0077cc"}),e.jsx("rect",{x:"20",y:"6",width:"5",height:"21",rx:"1.5",fill:"#38bdf8"}),e.jsx("path",{d:"M7.5 16 L15 10 L22.5 4",stroke:"#38bdf8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}),e.jsx("div",{className:"leading-none",children:e.jsxs("span",{className:"text-[17px] font-black text-[#0a1628] tracking-tight group-hover:text-blue-600 transition-colors",children:["usagemetrics",e.jsx("span",{className:"text-blue-500",children:".ai"})]})})]}),e.jsxs("div",{className:"hidden lg:flex items-center gap-8",children:[e.jsx("button",{onClick:()=>c("features"),className:d,children:"Features"}),e.jsx("button",{onClick:()=>c("pricing"),className:d,children:"Pricing"}),e.jsx(v,{to:"/documentation",className:s.pathname==="/documentation"?u:d,children:"API Docs"}),e.jsx(v,{to:"/about",className:s.pathname==="/about"?u:d,children:"Case Study"})]}),e.jsxs("div",{className:"hidden lg:flex items-center gap-4",children:[e.jsxs(Si,{children:[e.jsx(ki,{asChild:!0,children:e.jsxs(A,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-gray-500",children:[e.jsx(de,{className:"w-4 h-4"}),e.jsx("span",{className:"uppercase text-[10px] font-bold",children:"Lang"})]})}),e.jsxs(fa,{align:"end",children:[e.jsx(qe,{onClick:()=>i("/"),children:"English"}),e.jsx(qe,{onClick:()=>i("/home-fr"),children:"Français"}),e.jsx(qe,{onClick:()=>i("/home-es"),children:"Español"})]})]}),r?e.jsx(A,{size:"sm",className:"bg-[#0a1628] text-white hover:bg-blue-700 font-bold px-5",asChild:!0,children:e.jsx(v,{to:"/publisher-dashboard",children:"Dashboard"})}):e.jsxs(e.Fragment,{children:[e.jsx(v,{to:"/auth/sign-in",className:"text-sm font-bold text-[#0a1628] hover:text-blue-600",children:"Sign in"}),e.jsx(A,{size:"sm",className:"bg-[#0a1628] text-white hover:bg-blue-700 font-bold px-5",asChild:!0,children:e.jsx(v,{to:"/auth/sign-up",children:"Start Free"})})]})]}),e.jsx("button",{className:"lg:hidden p-2 text-gray-600",onClick:()=>a(!t),children:t?e.jsx(ee,{className:"w-6 h-6"}):e.jsx(Va,{className:"w-6 h-6"})})]}),t&&e.jsxs("div",{className:"lg:hidden absolute top-20 left-0 right-0 bg-white border-b border-gray-100 shadow-xl p-6 space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("button",{onClick:()=>c("features"),className:"text-lg font-bold text-gray-800 text-left",children:"Features"}),e.jsx("button",{onClick:()=>c("pricing"),className:"text-lg font-bold text-gray-800 text-left",children:"Pricing"}),e.jsx(v,{to:"/documentation",className:"text-lg font-bold text-gray-800",children:"API Documentation"}),e.jsx(v,{to:"/about",className:"text-lg font-bold text-gray-800",children:"Case Study"})]}),e.jsxs("div",{className:"pt-6 border-t border-gray-100 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[e.jsx(v,{to:"/home-fr",className:"text-xs font-bold text-gray-400",children:"FR"}),e.jsx(v,{to:"/homees",className:"text-xs font-bold text-gray-400",children:"ES"}),e.jsx(v,{to:"/",className:"text-xs font-bold text-gray-400",children:"EN"})]}),r?e.jsx(A,{className:"bg-[#0a1628] text-white w-full font-bold",asChild:!0,children:e.jsx(v,{to:"/account/dashboard",children:"Go to Dashboard"})}):e.jsxs(e.Fragment,{children:[e.jsx(v,{to:"/auth/sign-in",className:"w-full text-center py-3 font-bold text-[#0a1628] border border-gray-200 rounded-lg",children:"Sign in"}),e.jsx(A,{className:"bg-[#0a1628] text-white w-full font-bold",asChild:!0,children:e.jsx(v,{to:"/auth/sign-up",children:"Start Free Trial"})})]})]})]})]})},H=()=>e.jsx("footer",{className:"bg-[#0a1628] text-white",children:e.jsxs("div",{className:"container mx-auto px-6 py-14",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-10 mb-12",children:[e.jsxs("div",{className:"md:col-span-1",children:[e.jsxs(v,{to:"/",className:"inline-flex items-center gap-2.5 group mb-4",children:[e.jsx("div",{className:"relative w-8 h-8 flex items-center justify-center",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",className:"w-8 h-8",children:[e.jsx("rect",{width:"32",height:"32",rx:"6",fill:"#1e3a5f"}),e.jsx("rect",{x:"5",y:"18",width:"5",height:"9",rx:"1.5",fill:"#0077cc"}),e.jsx("rect",{x:"12.5",y:"12",width:"5",height:"15",rx:"1.5",fill:"#0077cc"}
9),e.jsx("rect",{x:"20",y:"6",width:"5",height:"21",rx:"1.5",fill:"#38bdf8"}),e.jsx("path",{d:"M7.5 16 L15 10 L22.5 4",stroke:"#38bdf8",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}),e.jsxs("div",{className:"leading-none",children:[e.jsxs("span",{className:"text-[15px] font-black text-white tracking-tight",children:["usagemetrics",e.jsx("span",{className:"text-blue-400",children:".ai"})]}),e.jsx("div",{className:"text-[9px] font-bold text-blue-300/60 tracking-[0.15em] uppercase mt-0.5",children:"Automated R5.1 Reporting"})]})]}),e.jsx("p",{className:"text-sm text-blue-200/60 leading-relaxed",children:"Automated R5.1 reporting for academic publishers. AI-aware."}),e.jsxs("div",{className:"flex items-center gap-3 mt-5",children:[e.jsx("a",{href:"https://twitter.com",target:"_blank",rel:"noopener noreferrer",className:"text-blue-300/50 hover:text-blue-300 transition-colors",children:e.jsx(Wa,{className:"w-4 h-4"})}),e.jsx("a",{href:"https://www.linkedin.com/in/walid-charfi-08b71221/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-300/50 hover:text-blue-300 transition-colors",children:e.jsx(za,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-bold text-blue-400 uppercase tracking-widest mb-4",children:"Articles"}),e.jsxs("ul",{className:"space-y-2.5",children:[e.jsx("li",{children:e.jsx(v,{to:"/article-counter-audit-best-practices",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"Best Practices for a Successful COUNTER Audit"})}),e.jsx("li",{children:e.jsx(v,{to:"/article-counter-evolutions",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"Key Evolutions of Project COUNTER"})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-bold text-blue-400 uppercase tracking-widest mb-4",children:"White Papers"}),e.jsxs("ul",{className:"space-y-2.5",children:[e.jsx("li",{children:e.jsx(v,{to:"/whitepaper-ai-impact",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"The Impact of AI on Your Download Statistics"})}),e.jsx("li",{children:e.jsx(v,{to:"/whitepaper-r5migration",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"How to Migrate from COUNTER R5 to R5.1"})}),e.jsx("li",{children:e.jsx(v,{to:"/whitepaper-survival-guide",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"COUNTER Survival Guide for Independent Publishers"})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-bold text-blue-400 uppercase tracking-widest mb-4",children:"Tools"}),e.jsxs("ul",{className:"space-y-2.5",children:[e.jsx("li",{children:e.jsx(v,{to:"/counter-report-checker",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"COUNTER Report Checker"})}),e.jsx("li",{children:e.jsx(v,{to:"/counter-form-builder-page",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"HTML Form Builder"})}),e.jsx("li",{children:e.jsx(v,{to:"/counter-exception-lookup",className:"text-sm text-blue-100/60 hover:text-white transition-colors leading-snug block",children:"Exception Code Lookup"})})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-bold text-blue-400 uppercase tracking-widest mb-4",children:"Company"}),e.jsxs("ul",{className:"space-y-2.5",children:[e.jsx("li",{children:e.jsx(v,{to:"/benefits",className:"text-sm text-blue-100/60 hover:text-white transition-colors block",children:"Benefits"})}),e.jsx("li",{children:e.jsx(v,{to:"/resources",className:"text-sm text-blue-100/60 hover:text-white transition-colors block",children:"Resources"})}),e.jsx("li",{children:e.jsx(v,{to:"/#pilot",className:"text-sm text-blue-100/60 hover:text-white transition-colors block",children:"Request a Demo"})}),e.jsx("li",{className:"pt-3 border-t border-white/10",children:e.jsx(v,{to:"/privacy-policy",className:"text-sm text-blue-100/60 hover:text-white transition-colors block",children:"Privacy Policy"})}),e.jsx("li",{children:e.jsx(v,{to:"/terms-of-service",className:"text-sm text-blue-100/60 hover:text-white transition-colors block",children:"Terms of Service"})})]})]})]}),e.jsxs("div",{className:"mt-12 pt-8 border-t border-slate-800 text-center",children:[e.jsxs("p",{className:"text-slate-500 text-xs mb-4",children:["© ",new Date().getFullYear()," UsageMetrics.ai by Counterflow. All rights reserved."]}),e.jsx("p",{className:"text-slate-600 text-[9px] max-w-2xl mx-auto uppercase tracking-widest leading-relaxed font-medium",children:"Notice: usagemetrics.ai is currently in active development. Features and compliance tooling are being continuously refined during our pilot program."})]})]})}),h=({children:t,delay:a=0,direction:s="up",className:i="",duration:r=.5})=>{const n={up:{y:20,x:0},down:{y:-20,x:0}
9,left:{x:20,y:0},right:{x:-20,y:0}};return e.jsx(Ya.div,{initial:{opacity:0,...n[s]},whileInView:{opacity:1,x:0,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:r,delay:a,ease:"easeOut"},className:i,children:t})},Oi="https://registry.countermetrics.org/platform/723443c6-fee4-4aea-bdc8-0f9d2744b05c";function Di(){return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-100",children:[e.jsx("div",{className:"absolute top-[-80px] right-[-60px] w-[380px] h-[380px] bg-blue-100 rounded-full opacity-30 blur-3xl pointer-events-none"}),e.jsx("div",{className:"absolute bottom-[-40px] left-[-40px] w-[260px] h-[260px] bg-indigo-100 rounded-full opacity-20 blur-3xl pointer-events-none"}),e.jsx("div",{className:"relative container mx-auto px-6 py-20 md:py-28 max-w-5xl",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-start gap-12",children:[e.jsx(h,{direction:"left",children:e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-36 h-36 md:w-44 md:h-44 rounded-2xl bg-gradient-to-br from-[#0a1628] to-blue-700 flex items-center justify-center shadow-xl shadow-blue-900/20",children:e.jsx("span",{className:"text-5xl md:text-6xl font-black text-white tracking-tight select-none",children:"WC"})})})}),e.jsx(h,{direction:"right",children:e.jsxs("div",{children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-100 text-blue-700 text-xs font-semibold mb-4",children:"Founder & Builder"}),e.jsx("h1",{className:"text-4xl md:text-5xl font-black text-[#0a1628] mb-3 leading-tight",children:"Walid Charfi"}),e.jsx("p",{className:"text-lg text-blue-600 font-semibold mb-4",children:"Software Engineer · COUNTER & SUSHI Specialist"}),e.jsx("p",{className:"text-gray-600 leading-relaxed max-w-2xl",children:"I built usagemetrics.ai because I lived the pain of COUNTER compliance from the inside. After five years at LexisNexis France â designing, implementing, and auditing a production SUSHI API that serves real library customers â I know exactly what it takes to get it right."})]})})]})})]}),e.jsx("section",{className:"py-16 bg-white border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[e.jsx(h,{children:e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-blue-600 rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-blue-600",children:"Professional Background"})]})}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsx(h,{delay:.05,children:e.jsxs("div",{className:"rounded-2xl border border-gray-100 bg-[#f8fafc] p-8 h-full",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-5",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#0a1628] flex items-center justify-center flex-shrink-0",children:e.jsx(re,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-black text-[#0a1628] text-lg leading-tight",children:"LexisNexis France"}),e.jsx("div",{className:"text-blue-600 font-semibold text-sm",children:"Software Engineer · 5 years"})]})]}),e.jsxs("p",{className:"text-gray-600 leading-relaxed text-sm",children:["Designed and developed back-end services for"," ",e.jsx("span",{className:"font-semibold text-[#0a1628]",children:"Lexis 360 Intelligence"}),", a major French legal and regulatory intelligence platform. My core project was implementing the full COUNTER compliance stack â from raw access log ingestion to a production-ready SUSHI API â used daily by library institutions across France."]})]})}),e.jsx(h,{delay:.1,children:e.jsxs("div",{className:"rounded-2xl border border-gray-100 bg-[#f8fafc] p-8 h-full",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-5",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-600 flex items-center justify-center flex-shrink-0",children:e.jsx(He,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("div",{className:"font-black text-[#0a1628] text-lg leading-tight",children:"COUNTER · SUSHI · R5.1"}),e.jsx("div",{className:"text-blue-600 font-semibold text-sm",children:"Specification & Audit expertise"})]})]}),e.jsx("p",{className:"text-gray-600 leading-relaxed text-sm",children:"I have read the COUNTER Code of Practice end-to-e
9nd â multiple times â and translated it into production software. From double-click filtering and robot exclusion to SUSHI endpoint design and audit evidence packages, I understand exactly where implementations succeed and where they silently fail."})]})})]})]})}),e.jsx("section",{className:"py-20 bg-[#f8fafc] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-1 h-8 bg-indigo-600 rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-indigo-600",children:"The Implementation Story"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-black text-[#0a1628] mb-4 max-w-3xl leading-tight",children:"How I implemented COUNTER for LexisNexis France â and passed the audit"}),e.jsx("p",{className:"text-gray-500 text-lg mb-12 max-w-2xl leading-relaxed",children:"Building a compliant SUSHI API isn't just a software task. It's a precision exercise in understanding a specification written for librarians, translating it into deterministic engineering rules, and proving every step to an independent auditor."})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(h,{delay:.05,children:e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-100 p-8 flex flex-col md:flex-row gap-6",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-50 border border-blue-100 flex items-center justify-center",children:e.jsx("span",{className:"text-blue-700 font-black text-sm",children:"01"})})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-black text-[#0a1628] mb-2",children:"Dissecting the COUNTER Code of Practice"}),e.jsxs("p",{className:"text-gray-600 leading-relaxed",children:["The starting point was a deep reading of the COUNTER Code of Practice â not as a checklist, but as a specification. I mapped every processing rule (double-click filtering, session thresholds, robot and crawler exclusion using the official COUNTER robot list, access type classification) to concrete software requirements. Lexis 360 Intelligence hosts aggregated full-content legal resources, so I had to correctly classify usage against the ",e.jsx("span",{className:"font-semibold",children:"Database Report (DR)"}),","," ",e.jsx("span",{className:"font-semibold",children:"Title Report (TR)"}),", and"," ",e.jsx("span",{className:"font-semibold",children:"Platform Report (PR)"})," report families."]})]})]})}),e.jsx(h,{delay:.08,children:e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-100 p-8 flex flex-col md:flex-row gap-6",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-50 border border-indigo-100 flex items-center justify-center",children:e.jsx("span",{className:"text-indigo-700 font-black text-sm",children:"02"})})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-black text-[#0a1628] mb-2",children:"Building the processing pipeline"}),e.jsx("p",{className:"text-gray-600 leading-relaxed",children:"I designed the back-end pipeline that ingests raw platform access logs and applies the full COUNTER processing rule set: deduplication within the double-click window, session reconciliation across requests, robot identification against the COUNTER exclusion list, and metric aggregation by report type and data type. Every transformation was implemented as an auditable, testable step â because the auditor would later need to trace a sample of raw events all the way through to final report figures."})]})]})}),e.jsx(h,{delay:.11,children:e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-100 p-8 flex flex-col md:flex-row gap-6",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-10 h-10 rounded-xl bg-emerald-50 border border-emerald-100 flex items-center justify-center",children:e.jsx("span",{className:"text-emerald-700 font-black text-sm",children:"03"})})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-black text-[#0a1628] mb-2",children:"Implementing the SUSHI R5.1 API"}),e.jsxs("p",{className:"text-gray-600 leading-relaxed",children:["The SUSHI API is the delivery layer: a REST endpoint that library ERM systems and tools like CELUS harvest automatically to pull COUNTER reports on behalf of their institutions. I built the endpoint at"," ",e.jsx("code",{className:"text-xs bg-gray-100 px-1.5 py-0.5 rounded font-mono text-gray-700",children:"/api/counter-report/sushi/r51/"})," ","to serve JSON-formatted reports conforming to the official COUNTER OpenAPI specification, with API key authentication, correct Content-Type headers, exception handling (COUNTER error codes), and pagination for large datasets. The endpoint was validated against the official COUNTER SUSHI validator before submission for audit."]})]})]})}),e.jsx(h,{delay:.14,children:e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-100 p-8 flex flex-col md:flex-row gap-6",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-10 h-10 rounded-xl bg-amber-50 border border-amber-100 flex items-center justify-center",children:e.jsx("span",{className:"text-amber-700 font-black text-sm",children:"04"})})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-black text-[#0a1628] mb-2",children:"Preparing and passing the audit"}),e.jsxs("p",{className:"text-gray-600 leading-relaxed",children:["The COUNTER audit is conducted by an accredited third-party firm that cross-checks your processed reports against your raw log data, verifies your processing logic, and harvests your SUSHI endpoint directly. I prepared the evidence package: raw log samples, a complete technical documentation of the processing pipeline, schema validation outputs, and a data dictionary. The audit covered the full set of active report types â DR, TR, PR and their sub-reports â and the SUSHI endpoint was tested live by the auditor. The result: a"," ",e.jsx("span",{className:"font-semibold text-emerald-700",children:"clean pass"}),", with Lexis 360 Intelligence listed as a COUNTER-registered and audited platform."]})]})]})})]})]})}),e.jsx("section",{className:"py-16 bg-white border-b border-gray-100",children:e.jsx("div",{className:"container mx-auto px-6 max-w-5xl",children:e.jsx(h,{children:e.jsxs("div",{className:"rounded-2xl bg-gradient-to-br from-[#0a1628] to-blue-900 p-8 md:p-10 flex flex-col md:flex-row items-start md:items-center gap-8",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-white/10 border border-white/20 flex items-center justify-center",children:e.jsx(be,{className:"w-10 h-10 text-emerald-400"})})}),e.jsxs("div",{className:"flex-grow",children:[e.jsx("div",{className:"text-xs font-bold text-blue-300 uppercase tracking-widest mb-2",children:"COUNTER Registry · Audit Verified"}),e.jsx("h3",{className:"text-2xl font-black text-white mb-2 leading-tight",children:"Lexis 360 Intelligence â LexisNexis France"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6 mt-4",children:[{label:"Release",value:"COUNTER 5.1"},{label:"Last audit",value:"March 2026"},{label:"Host type",value:"Aggregated Full Content"},{label:"Status",value:"Active â"}].map(t=>e.jsxs("div",{className:"bg-white/10 rounded-xl px-4 py-3",children:[e.jsx("div",{className:"text-[10px] font-bold text-blue-300 uppercase tracking-widest mb-0.5",children:t.label}),e.jsx("div",{className:"text-white font-black text-sm",children:t.value})]},t.label))}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:["DR","DR_D1","TR","TR_J1","TR_J2","TR_J4","TR_B1","TR_B3","PR","PR_P1"].map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 bg-emerald-500/20 border border-emerald-400/30 text-emerald-300 rounded-lg text-xs font-semibold",children:[e.jsx(O,{className:"w-3 h-3"})," ",t]},t))}),e.jsxs("a",{href:Oi,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-2.5 bg-white text-[#0a1628] rounded-xl font-bold text-sm hover:bg-blue-50 transition-colors",children:["View on COUNTER Registry ",e.jsx(ut,{className:"w-4 h-4"})]})]})]})})})}),e.jsx("section",{className:"py-16 bg-[#f8fafc] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[e.jsx(h,{children:e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-1 h-8 bg-[#0a1628] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#0a1628]",children:"Why it matters for you"})]})}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{icon:"ð¬",title:"Built by someone who's done it",body:"usagemetrics.ai isn't designed by generalists who read the spec once. Every feature reflects hard-won production experience â including all the edge cases the spec doesn't spell out clearly."},{icon:"ðï¸",title:"Audit-first, not audit-after",body:"Having prepared and passed a COUNTER audit, I built usagemetrics.ai so that audit readiness is continuous and automatic â not a frantic preparation exercise every 12 months."},{icon:"ð¤",title:"A founder you can talk to",body:"When you have a question about your SUSHI endpoint, your processing logic, or your audit submission, you're talking to someone who has personally designed those systems."}].map((t,a)=>e.jsx(h,{delay:a*.07,children:e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-100 p-6 hover:border-blue-200 hover:shadow-md transition-all duration-300",children:[e.jsx("div",{className:"text-3xl mb-4",children:t.icon}),e.jsx("h3",{className:"font-black text-[#0a1628] mb-2",children:t.title}),e.jsx("p",{className:"text-gray-500 text-sm leading-relaxed",children:t.body})]})},t.title))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsx("div",{className:"container mx-auto px-6 max-w-3xl text-center",children:e.jsxs(h,{children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-black text-[#0a1628] mb-3",children:"Ready to work with someone who knows COUNTER inside out?"}),e.jsx("p",{className:"text-gray-500 mb-8",children:"Let's talk about your compliance challenge â whether it's a first R5.1 implementation or an upcoming audit."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsxs(v,{to:"/#pilot",className:"inline-flex items-center justify-center gap-2 px-8 py-3 bg-[#0a1628] text-white rounded-xl font-semibold hover:bg-blue-600 transition-all",children:["Request a Demo ",e.jsx(W,{className:"w-4 h-4"})]}),e.jsx(v,{to:"/resources",className:"inline-flex items-center justify-center gap-2 px-8 py-3 bg-white border border-gray-200 text-gray-700 rounded-xl font-semibold hover:bg-gray-50 transition-all",children:"Explore Resources"})]})]})})})]}),e.jsx(H,{})]})}function Bt(...t){return bs(ys(t))}const qi=()=>
9{const[t,a]=o.useState([]),[s,i]=o.useState(null),[r,n]=o.useState(!0),[c,d]=o.useState("chart");o.useEffect(()=>{(async()=>{try{const S=await(await F.get_sample_report()).json();i(S),a(Array.isArray(S.Report_Items)?S.Report_Items:[])}catch(y){console.error("Failed to fetch sample data",y)}finally{n(!1)}})()},[]);const u=le.useMemo(()=>{const j=new Map;for(const y of t)for(const S of y.Attribute_Performance??[])for(const[w,_]of Object.entries(S.Performance??{}))for(const[C,g]of Object.entries(_)){j.has(C)||j.set(C,{});const p=j.get(C);p[w]=(p[w]??0)+g}return Array.from(j.entries()).map(([y,S])=>({period:y,...S})).sort((y,S)=>y.period.localeCompare(S.period))},[t]),b=le.useMemo(()=>{const j=new Set;for(const y of t)for(const S of y.Attribute_Performance??[])Object.keys(S.Performance??{}).forEach(w=>j.add(w));return Array.from(j)},[t]),m=["hsl(var(--primary))","hsl(var(--secondary))","#0ea5e9","#10b981","#f59e0b","#ef4444"],l=j=>{const[y,S]=j.split("-");return!y||!S?j:new Date(Number(y),Number(S)-1).toLocaleDateString("en-US",{month:"short",year:"numeric"})};return e.jsxs("section",{id:"technical-deep-dive",className:"py-16 md:py-24 bg-background relative overflow-hidden",children:[e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-secondary/5 rounded-full blur-3xl -z-10"}),e.jsx("div",{className:"container mx-auto px-6 relative z-10",children:e.jsxs("div",{className:"flex flex-col md:flex-row gap-12 items-start",children:[e.jsxs("div",{className:"md:w-1/3",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 border border-primary/20 text-primary text-sm font-medium mb-6",children:[e.jsx(Ga,{className:"w-4 h-4"}),"Technical Deep Dive"]}),e.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"Transparent Data Handling"}),e.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"We believe in transparency. See exactly how usagemetrics.ai processes and normalizes complex COUNTER 5.1 reports into actionable insights."}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(O,{className:"w-5 h-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-foreground",children:"Live Data Ingestion"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"The data on the right is fetched live from our sample database."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(O,{className:"w-5 h-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-foreground",children:"Standardized JSON"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Switch to JSON view to see the raw SUSHI-compliant structure."})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(O,{className:"w-5 h-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-foreground",children:"Instant Visualization"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Raw metrics are automatically aggregated and visualized for clarity."})]})]})]})]}),e.jsxs("div",{className:"md:w-2/3 w-full bg-card/50 backdrop-blur-sm border border-border/60 rounded-2xl shadow-xl overflow-hidden group hover:border-primary/20 transition-all duration-300",children:[e.jsxs("div",{className:"border-b border-border/60 p-4 flex items-center justify-between bg-muted/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_s,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Sample Report: TR_J1 Journal Requests"})]}),e.jsxs("div",{className:"flex bg-background/50 backdrop-blur rounded-lg border border-border p-1",children:[e.jsxs("button",{onClick:()=>d("chart"),className:Bt("px-3 py-1.5 text-xs font-medium rounded-sm transition-colors flex items-center gap-2",c==="chart"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[e.jsx(mt,{className:"w-3.5 h-3.5"}),"Chart"]}),e.jsxs("button",{onClick:()=>d("json"),className:Bt("px-3 py-1.5 text-xs font-medium rounded-sm transition-colors flex items-center gap-2",c==="json"?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-muted"),children:[e.jsx(As,{className:"w-3.5 h-3.5"}),"JSON"]})]})]}),e.jsxs("div",{className:"h-[400px] p-6 relative",children:[r?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-card/80 backdrop-blur-sm z-10",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx($e,{className:"w-8 h-8 text-primary animate-spin"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Fetching live sample data..."})]})}):null,c==="chart"?e.jsx(Ps,{width:"100%",height:"100%",children:e.jsxs(Ka,{data:u,margin:{top:10,right:10,left:0,bottom:0},children:[e.jsx("defs",{children:b.map((j,y)=>e.jsxs("linearGradient",{id:`color-${y}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",
9stopColor:m[y%m.length],stopOpacity:.3}),e.jsx("stop",{offset:"95%",stopColor:m[y%m.length],stopOpacity:0})]},j))}),e.jsx(Qa,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))"}),e.jsx(Xa,{dataKey:"period",tickFormatter:l,stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,axisLine:!1,dy:10}),e.jsx(Za,{stroke:"hsl(var(--muted-foreground))",fontSize:12,tickLine:!1,axisLine:!1,dx:-10}),e.jsx(Us,{contentStyle:{backgroundColor:"hsl(var(--card))",borderColor:"hsl(var(--border))",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},itemStyle:{color:"hsl(var(--foreground))"},labelStyle:{color:"hsl(var(--muted-foreground))",marginBottom:"0.5rem"},formatter:j=>[j.toLocaleString(),""],labelFormatter:l}),e.jsx(Es,{iconType:"circle"}),b.length===0?e.jsx("text",{x:"50%",y:"50%",textAnchor:"middle",fill:"hsl(var(--muted-foreground))",fontSize:13,children:"No metrics data available"}):b.map((j,y)=>e.jsx(er,{type:"monotone",dataKey:j,name:j.replace(/_/g," "),stroke:m[y%m.length],fillOpacity:1,fill:`url(#color-${y})`,strokeWidth:2},j))]})}):e.jsx("div",{className:"h-full overflow-auto rounded-md bg-muted/50 p-4 border border-border font-mono text-xs text-foreground",children:e.jsx("pre",{children:JSON.stringify(s,null,2)})})]})]})]})})]})},Li=({title:t,value:a,trend:s})=>e.jsxs("div",{className:"flex items-center justify-between py-1.5 border-b border-gray-100 last:border-0",children:[e.jsx("span",{className:"text-xs text-gray-600 truncate mr-2",children:t}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-800",children:a}),e.jsx("span",{className:"text-[10px] text-emerald-600 font-medium",children:s})]})]}),Mi=()=>e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff]",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(#0a1628 1px, transparent 1px), linear-gradient(90deg, #0a1628 1px, transparent 1px)",backgroundSize:"40px 40px"}}),e.jsx("div",{className:"absolute top-[-120px] right-[-80px] w-[480px] h-[480px] bg-blue-200 rounded-full opacity-20 blur-3xl pointer-events-none"}),e.jsx("div",{className:"absolute bottom-[-60px] left-[-60px] w-[300px] h-[300px] bg-indigo-200 rounded-full opacity-15 blur-3xl pointer-events-none"}),e.jsx("div",{className:"relative container mx-auto px-6 py-10 md:py-16",children:e.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-12 lg:gap-16",children:[e.jsxs("div",{className:"lg:w-[52%]",children:[e.jsxs(h,{delay:.1,children:[e.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-[3.5rem] font-black text-[#0a1628] mb-5 leading-[1.1] tracking-tight",children:["COUNTER R5.1",e.jsx("br",{}),e.jsx("span",{className:"text-blue-500",children:"reporting"}),",",e.jsx("br",{}),"automated."]}),e.jsx("p",{className:"text-lg text-gray-500 mb-8 leading-relaxed max-w-xl",children:"usagemetrics.ai aims to ingest your raw usage logs, filter AI bot traffic, and deliver standards-based reports â so your team can focus on publishing."})]}),e.jsx(h,{delay:.2,children:e.jsxs("div",{className:"flex flex-col sm:flex-row flex-wrap gap-3 mb-10",children:[e.jsxs(v,{to:"/auth/sign-up",className:"inline-flex items-center justify-center gap-2 px-7 py-3 bg-[#0a1628] text-white rounded-xl font-semibold hover:bg-blue-600 transition-all shadow-lg shadow-blue-900/20",children:[e.jsx(tr,{className:"w-4 h-4"})," Create Publisher Account"]}),e.jsxs("a",{href:"#pilot",className:"inline-flex items-center justify-center gap-2 px-7 py-3 bg-white border border-gray-200 text-gray-700 rounded-xl font-semibold hover:bg-gray-50 hover:border-gray-300 transition-all",children:["Request Demo ",e.jsx(W,{className:"w-4 h-4"})]}),e.jsxs("a",{href:"https://cal.com/usagemetrics",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 px-7 py-3 text-gray-600 hover:text-blue-600 transition-all text-sm font-medium",children:[e.jsx(et,{className:"w-4 h-4 text-blue-500 mr-1"})," Book a Call"]})]})}),e.jsx(h,{delay:.25,children:e.jsxs("div",{className:"flex items-center gap-2 mb-10 group",children:[e.jsx("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest",children:"Don't know
9where to start?"}),e.jsxs("a",{href:"/checker",onClick:t=>{t.preventDefault();const a=document.getElementById("deep-dive");a==null||a.scrollIntoView({behavior:"smooth"})},className:"text-sm font-bold text-blue-600 hover:text-blue-700 flex items-center gap-1.5 transition-all",children:["Try the free COUNTER Report Checker ",e.jsx(W,{className:"w-3.5 h-3.5 group-hover:translate-x-1 transition-transform"})]})]})}),e.jsx(h,{delay:.3,children:e.jsx("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 text-sm text-gray-500",children:[{icon:O,label:"R5.1 Framework"},{icon:tt,label:"AI Bot Filtering"},{icon:ye,label:"Reporting Engine"},{icon:me,label:"< 4 Weeks Onboarding"}].map(({icon:t,label:a})=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(t,{className:"w-3.5 h-3.5 text-blue-500"}),e.jsx("span",{children:a})]},a))})})]}),e.jsx("div",{className:"lg:w-[48%] flex justify-center",children:e.jsx(h,{delay:.35,direction:"left",children:e.jsxs("div",{className:"relative w-full max-w-md",children:[e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl shadow-blue-900/10 border border-gray-100 overflow-hidden",children:[e.jsxs("div",{className:"bg-[#0a1628] px-5 py-3.5 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex gap-1.5",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-400/80"}),e.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-yellow-400/80"}),e.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-400/80"})]}),e.jsx("span",{className:"text-[11px] text-gray-400 font-mono ml-2",children:"usagemetrics.ai â TR_J1 · Dec 2024"})]}),e.jsx("span",{className:"text-[10px] text-blue-400 font-semibold uppercase tracking-wider",children:"Automated Reporting"})]}),e.jsx("div",{className:"grid grid-cols-3 divide-x divide-gray-100 border-b border-gray-100",children:[{label:"Total_Item_Requests",value:"184,302",color:"#3b82f6"},{label:"Unique_Items",value:"2,847",color:"#6366f1"},{label:"Bot Filtered",value:"23.4%",color:"#10b981"}].map(t=>e.jsxs("div",{className:"px-4 py-3 text-center",children:[e.jsx("div",{className:"text-base font-black",style:{color:t.color},children:t.value}),e.jsx("div",{className:"text-[9px] text-gray-400 font-mono mt-0.5 leading-tight",children:t.label})]},t.label))}),e.jsxs("div",{className:"px-5 py-4",children:[e.jsx("div",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Top Titles by Requests"}),[{title:"Journal of Library Science",value:"32,104",trend:"+12%"},{title:"Nature of Publishing",value:"28,891",trend:"+8%"},{title:"Academic Research Quarterly",value:"21,334",trend:"+5%"},{title:"Information Systems Review",value:"18,760",trend:"+3%"},{title:"Digital Humanities Journal",value:"15,201",trend:"+19%"}].map(t=>e.jsx(Li,{...t},t.title))]}),e.jsxs("div",{className:"bg-gray-50 px-5 py-2.5 flex items-center justify-between border-t border-gray-100",children:[e.jsx("span",{className:"text-[10px] text-gray-400 font-mono",children:"SUSHI API · COUNTER R5.1"}),e.jsx("span",{className:"text-[10px] text-gray-400",children:"Generated Jan 1, 2025"})]})]}),e.jsxs("div",{className:"absolute -bottom-4 -left-6 bg-white rounded-xl shadow-lg border border-gray-100 px-4 py-3 flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-emerald-50 flex items-center justify-center border border-emerald-100",children:e.jsx(tt,{className:"w-4 h-4 text-emerald-600"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-bold text-gray-800",children:"AI Bot Traffic Removed"}),e.jsx("div",{className:"text-[10px] text-gray-400",children:"43,218 requests filtered"})]})]}),e.jsxs("div",{className:"absolute -top-4 -right-4 bg-blue-600 text-white rounded-xl shadow-lg px-4 py-2.5 flex items-center gap-2",children:[e.jsx(O,{className:"w-4 h-4"}),e.jsx("span",{className:"text-xs font-bold",children:"R5.1 Framework"})]})]})})})]})})]}),Fi=[{icon:O,color:"#3b82f6",bg:"#eff6ff",title:"Automated COUNTER R5.1 Compliance",description:"Ensure your digital content usage reports meet all current standards without manual intervention. Focus on publishing, not compliance."},{icon:tt,color:"#6366f1",bg:"#eef2ff",title:"AI Traffic Detection & Filtering",description:"Our proprietary AI engine identifies and filters out non-human traffic from LLMs and bots, giving you true human engagement metrics."},{icon:sr,color:"#3b82f6",bg:"#eff6ff",title:"Audit-Ready Reports, Guaranteed",description:"Say goodbye to audit anxiety. usagemetrics.ai generates TR, DR, PR, and IR reports in JSON and Excel formats, pre-validated for your annual COUNTER audit."},{icon:me,color:"#8b5cf6",bg:"#f5f3ff",title:"Seamless SUSHI API Integration",description:"Provide your library customers with automated, real-time access to their usage data through a fully compliant SUSHI API endpoint."},{icon:mt,color:"#3b82f6",bg:"#eff6ff",title:"Intuitive Analytics Dashboard",description:"Visualize your usage data with modern, easy-to-understand dashboards. Track trends, identify popular content, and make data-driven decisions."},{icon:Os,color:"#6366f1",bg:"#eef2ff",title:"Rapid Onboarding",description:"Get up and running in weeks, not months. Our lightweight tracking script and API ensure quick integration with your existing platforms."}],Bi=()=>e.jsx("section",{id:"features",className:"py-24 bg-[#f8fafc]",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsx(h,{children:e.jsxs("div",{className:"mb-16 max-w-2xl",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-100 text-blue-700 text-xs font-semibold mb-5",children:"Key Capabilities"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-black text-[#0a1628] mb-4 leading-tight",children:"Automation for R5.1 Reporting"}),e.jsx("p",{className:"text-lg text-gray-500",children:"usagemetrics.ai aims to handle the reporting lifecycle â from raw log ingestion to standards-based delivery."})]})}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:Fi.map((t,a)=>e.jsx(h,{delay:a*.07,children:e.jsxs("div",{className:"group h-full bg-white border border-gray-100 rounded-2xl p-6 hover:border-blue-200 hover:shadow-lg hover:shadow-blue-900/5 transition-all duration-300",children:[e.jsx("div",{className:"w-11 h-11 rounded-xl flex items-center justify-center mb-5",style:{backgroundColor:t.bg},children:e.jsx(t.icon,{className:"w-5 h-5",style:{color:t.color}})}),e.jsx("h3",{className:"text-[15px] font-bold text-[#0a1628] mb-2 leading-snug",children:t.title}),e.jsx("p",{className:"text-gray-500 leading-relaxed text-sm",children:t.description})]})},t.title))})]})});
9function Hi(){const[t,a]=o.useState(""),[s,i]=o.useState(""),[r,n]=o.useState(""),[c,d]=o.useState(!1),[u,b]=o.useState(!1),m=async l=>{l.preventDefault(),d(!0);try{await F.submit_waitlist({email:t,organization:s,role:r,program_type:"pilot"}),b(!0),a(""),i(""),n(""),I.success("Application submitted! We'll be in touch shortly.")}catch{I.error("Failed to submit. Please try again.")}finally{d(!1)}};return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx(Mi,{}),e.jsx("div",{className:"bg-white py-8 border-b border-gray-100",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsx(h,{children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-center gap-4 md:gap-8 opacity-80",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-emerald-50 text-emerald-700 rounded-full border border-emerald-100 text-xs font-bold",children:[e.jsx(O,{className:"w-4 h-4"}),"All 4 COUNTER R5.1 reports validated by the official COUNTER Validator"]}),e.jsx("div",{className:"hidden md:block w-px h-6 bg-gray-200"}),e.jsx("div",{className:"text-xs text-gray-400 font-medium",children:"Trusted by Pilot Partners in Academic Publishing"})]})})})}),e.jsx("section",{className:"py-6 md:py-16 bg-[#f8fafc] border-b border-gray-200",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#9b2c8c] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#9b2c8c]",children:"The Challenge"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-[#1a2e5a] mb-4 max-w-3xl",children:"The R5.1 Reporting Burden is Weighing You Down"}),e.jsx("p",{className:"text-lg text-gray-600 mb-10 max-w-3xl leading-relaxed",children:"As a medium-sized academic publisher, you're dedicated to disseminating valuable scholarly content. Yet the ever-evolving Project COUNTER R5.1 standards present significant challenges:"})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{color:"#0077cc",title:"Manual Processing Errors",body:"Manual data processing is time-consuming, expensive, and prone to costly errors that can fail your COUNTER audit."},{color:"#9b2c8c",title:"AI Traffic Distorts Your Data",body:"The rise of LLMs and bots is inflating your usage statistics, making it impossible to assess the true value and human impact of your content."},{color:"#0077cc",title:"Audit Anxiety & Resource Drain",body:"The annual COUNTER audit diverts precious resources from your core publishing mission. Inconsistent formats and unreliable APIs compound the problem."}].map(l=>e.jsx(h,{children:e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-7 hover:shadow-md hover:border-[#0077cc] transition-all h-full",children:[e.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mb-4 border-2",style:{borderColor:l.color,backgroundColor:`${l.color}15`},children:e.jsx(ee,{className:"w-5 h-5",style:{color:l.color}})}),e.jsx("h3",{className:"text-base font-bold text-[#1a2e5a] mb-2",children:l.title}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:l.body})]})},l.title))})]})}),e.jsx("section",{className:"py-16 md:py-24 bg-white border-b border-gray-200",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#0077cc] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#0077cc]",children:"The Solution"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-[#1a2e5a] mb-4",children:"usagemetrics.ai â Automated Reporting, Real Insights"})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-10 items-center mt-8",children:[e.jsxs(h,{direction:"left",children:[e.jsx("p",{className:"text-gray-600 leading-relaxed mb-6",children:"usagemetrics.ai is a SaaS tool under development, designed to help academic publishers automate usage reporting according to COUNTER R5.1 standards."}),e.jsx("p",{className:"text-gray-600 leading-relaxed",children:"Our platform aims to ingest raw logs, process them via our reporting framework, and prepare data for eventual audit. Build confidence in your SUSHI delivery during your development phase."})]}),e.jsx(h,{direction:"right",children:e.jsx("div",{className:"bg-[#f0f7ff] rounded-2xl p-8 border border-[#b8d9f0]",children:[{step:"01",label:"Ingest raw usage logs"},{step:"02",label:"AI filters bot & LLM traffic"},{step:"03",label:"Process against R5.1 framework"},{step:"04",label:"Generate standards-based reports"},{step:"05",label:"Deliver via SUSHI API"}].map(l=>e.jsxs("div",{className:"flex items-center gap-4 py-3 border-b border-[#cce4f7] last:border-0",children:[e.jsx("span",{className:"w-8 h-8 rounded-full bg-[#0077cc] text-white flex items-center justify-center text-xs font-bold flex-shrink-0",children:l.step}),e.jsx("span",{className:"text-[#1a2e5a] font-semibold text-sm",children:l.label})]},l.step))})})]})]})}),e.jsx(Bi,{}),e.jsx("section",{className:"py-16 md:py-24 bg-[#f8fafc] border-b border-gray-200",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#9b2c8c] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#9b2c8c]",children:"Why usagemetrics.ai"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-[#1a2e5a] mb-10",children:"How it Compares"})]}),e.jsxs(h,{children:[e.jsx("div",{className:"overflow-x-auto rounded-xl border border-gray-200 shadow-sm",children:e.jsxs("table",{className:"w-full text-sm text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#1a2e5a] text-white",children:[e.jsx("th",{className:"px-6 py-4 font-semibold",children:"Feature"}),e.jsx("th",{className:"px-6 py-4 font-semibold text-gray-300",children:"Traditional Methods"}),e.jsx("th",{className:"px-6 py-4 font-semibold text-gray-300",children:"Competitors"}),e.jsx("th",{className:"px-6 py-4 font-semibold text-[#7dd3fc] bg-[#0c1f3e]",children:"usagemetrics.ai"})]})}),e.jsx("tbody",{children:[{feature:"R5.1 Implementation Time",traditional:"6â12 months",competitor:"3â4 months",cf:"< 4 weeks"},{feature:"Annual Audit Effort",traditional:"High (Publisher-led)",competitor:"Moderate (Partial support)",cf:"Streamlined (Preparation support)"},{feature:"AI Traffic Insights",traditional:"None",competitor:"Limited",cf:"Native LLM/Bot Detection & Filtering"},{feature:"Cost-Effectiveness",traditional:"High (Internal resources + fees)",competitor:"High (Setup fees + subscription)",cf:"Optimised (Subscription includes audit)"}].map((l,j)=>e.jsxs("tr",{className:j%2===0?"bg-white":"bg-[#f8fafc]",children:[e.jsx("td",{className:"px-6 py-4 font-semibold text-[#1a2e5a]",children:l.feature}),e.jsx("td",{className:"px-6 py-4 text-gray-500",children:l.traditional}),e.jsx("td",{className:"px-6 py-4 text-gray-500",children:l.competitor}),e.jsxs("td",{className:"px-6 py-4 font-bold text-[#0077cc] bg-[#f0f7ff]",children:[l.cf,"*"]})]},l.feature))})]})}),e.jsx("p",{className:"mt-4 text-[10px] text-gray-400 italic",children:"* Built on the Project COUNTER R5.1 framework."})]})]})}),e.jsx(h,{children:e.jsx(qi,{})}),e.jsx(h,{children:e.jsxs("div",{className:"mb-16 max-w-2xl",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-100 text-blue-700 text-xs font-semibold mb-5",children:"Key Capabilities"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-black text-[#0a1628] mb-4 leading-tight",children:"Automation for R5.1 Reporting"}),e.jsx("p",{className:"text-lg text-gray-500",children:"usagemetrics.ai aims to handle the reporting lifecycle â from raw log ingestion to standards-based delivery."})]})}),e.jsx("section",{id:"who",className:"py-16 md:py-24 bg-white border-b border-gray-200",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#0077cc] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#0077cc]",children:"Who It's For"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-[#1a2e5a] mb-4",children:"Built for Medium-Sized Academic Publishers"}),e.jsx("p",{className:"text-lg text-gray-600 mb-10 max-w-3xl leading-relaxed",children:"Managing journals or eBooks â using in-house platforms â and preparing for the complexities of COUNTER R5.1 reporting."})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{color:"#0077cc",role:"Digital Operations Managers",desc:"Automate the reporting workflow so your team focuses on growth, not manual report generation."},{color:"#9b2c8c",role:"Publication Directors",desc:"Get clear, accurate data on content performance and provide standards-based reporting to library partners."},{color:"#0077cc",role:"Usage Reporting Teams",desc:"Say goodbye to spreadsheet chaos. Automated reports delivered on schedule, every time."}].map(l=>e.jsx(h,{children:e.jsxs("div",{className:"bg-[#f8fafc] border border-gray-200 rounded-xl p-7 hover:shadow-md hover:border-[#0077cc] transition-all h-full",children:[e.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-5 border-2",style:{borderColor:l.color,backgroundColor:`${l.color}15`},children:e.jsx(O,{className:"w-6 h-6",style:{color:l.color}})}),e.jsx("h3",{className:"text-base font-bold text-[#1a2e5a] mb-2",children:l.role}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:l.desc})]})},l.role))})]})}),e.jsx("section",{className:"py-16 md:py-20 bg-white border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsx(h,{children:e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-emerald-50 border border-emerald-100 text-emerald-700 text-xs font-semibold mb-4",children:"Built by someone who passed the audit"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-black text-[#0a1628] mb-3 leading-tight",children:"Real-world COUNTER implementation"}),e.jsx("p",{className:"text-gray-500 max-w-2xl mx-auto",children:"usagemetrics.ai is built by the engineer who implemented the COUNTER 5.1 SUSHI API for LexisNexis France."})]})}),e.jsx(h,{delay:.05,children:e.jsxs("div",{className:"max-w-4xl mx-auto rounded-2xl bg-gradient-to-br from-[#0a1628] to-blue-900 p-8 md:p-10 flex flex-col md:flex-row items-start md:items-center gap-8 shadow-xl shadow-blue-900/20",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-white/10 border border-white/20 flex items-center justify-center",children:e.jsx(be,{className:"w-10 h-10 text-emerald-400"})})}),e.jsxs("div",{className:"flex-grow",children:[e.jsx("div",{className:"text-xs font-bold text-blue-300 uppercase tracking-widest mb-2",children:"COUNTER Registry · Reference Implementation"}),e.jsx("h3",{className:"text-2xl font-black text-white mb-4 leading-tight",children:"Lexis 360 Intelligence â LexisNexis France"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-5",children:[{label:"Release",value:"COUNTER 5.1"},{label:"Audit status",value:"Verified by 3rd party"},{label:"Host type",value:"Aggregated Full Content"},{label:"Status",value:"Active â"}].map(l=>e.jsxs("div",{className:"bg-white/10 rounded-xl px-4 py-3",children:[e.jsx("div",{className:"text-[10px] font-bold text-blue-300 uppercase tracking-widest mb-0.5",children:l.label}),e.jsx("div",{className:"text-white font-black text-sm",children:l.value})]},l.label))}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:["DR","DR_D1","TR","TR_J1","TR_J2","TR_J4","TR_B1","TR_B3","PR","PR_P1"].map(l=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-1 bg-emerald-500/20 border border-emerald-400/30 text-emerald-300 rounded-lg text-xs font-semibold",children:[e.jsx(O,{className:"w-3 h-3"})," ",l]},l))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("a",{href:"https://registry.countermetrics.org/platform/723443c6-fee4-4aea-bdc8-0f9d2744b05c",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-2.5 bg-white text-[#0a1628] rounded-xl font-bold text-sm hover:bg-blue-50 transition-colors",children:["View on COUNTER Registry ",e.jsx(ut,{className:"w-4 h-4"})]}),e.jsxs(v,{to:"/about",className:"inline-flex items-center gap-2 text-blue-300 hover:text-white text-sm font-semibold transition-colors",children:["Read the full story ",e.jsx(W,{className:"w-4 h-4"})]})]})]})]})})]})}),e.jsx("section",{id:"pricing",className:"py-16 md:py-24 bg-[#f8fafc] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsx(h,{children:e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-100 text-blue-700 text-xs font-semibold mb-4",children:"Simple, transparent pricing"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-black text-[#0a1628] mb-3 leading-tight",children:"The right plan for your catalogue size."}),e.jsx("p",{className:"text-gray-500 max-w-xl mx-auto",children:"No setup fees. No hidden audit costs. Cancel anytime."})]})}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6 max-w-5xl mx-auto items-stretch",children:[e.jsx(h,{delay:0,children:e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"px-7 pt-7 pb-5 border-b border-gray-100",children:[e.jsx("div",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Starter"}),e.jsxs("div",{className:"flex items-end gap-1 mb-1",children:[e.jsx("span",{className:"text-4xl font-black text-[#0a1628]",children:"$299"}),e.jsx("span",{className:"text-gray-400 font-medium text-base mb-1",children:"/month"})]}),e.jsx("p",{className:"text-gray-400 text-xs mb-3",children:"or $2,990/year â save 2 months"}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"For small publishers â fewer than 50 journals or 500 eBooks."})]}),e.jsx("div",{className:"px-7 py-6 flex-grow",children:e.jsx("ul",{className:"space-y-3 mb-8",children:["1 platform","Standard COUNTER R5.1 reports","SUSHI API included","Email support"].map(l=>e.jsxs("li",{className:"flex items-start gap-2.5",children:[e.jsx(O,{className:"w-4 h-4 text-emerald-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-gray-600 text-sm",children:l})]},l))})}),e.jsx("div",{className:"px-7 pb-7",children:e.jsx("button",{onClick:()=>{const l=document.getElementById("pilot");l&&l.scrollIntoView({behavior:"smooth"})},className:"w-full py-3 border-2 border-[#0a1628] text-[#0a1628] rounded-xl font-bold text-sm hover:bg-[#0a1628] hover:text-white transition-all",children:"Get started"})})]})}),e.jsx(h,{delay:.07,children:e.jsxs("div",{className:"bg-[#0a1628] rounded-2xl shadow-xl shadow-blue-900/25 overflow-hidden flex flex-col h-full relative",children:[e.jsxs("div",{className:"px-7 pt-7 pb-5 border-b border-white/10",children:[e.jsx("div",{className:"text-xs font-bold text-blue-400 uppercase tracking-widest mb-3",children:"Growth"}),e.jsxs("div",{className:"flex items-end gap-1 mb-1",children:[e.jsx("span",{className:"text-4xl font-black text-white",children:"$599"}),e.jsx("span",{className:"text-blue-300 font-medium text-base mb-1",children:"/month"})]}),e.jsx("p",{className:"text-blue-400/70 text-xs mb-3",children:"or $5,990
9/year â save 2 months"}),e.jsx("p",{className:"text-blue-200 text-sm leading-relaxed",children:"For mid-size publishers â 50â300 journals or 500â3,000 eBooks."})]}),e.jsx("div",{className:"px-7 py-6 flex-grow",children:e.jsx("ul",{className:"space-y-3 mb-8",children:["Multiple platforms","Advanced AI/LLM bot filtering","Analytics dashboard","DR, TR, PR + all sub-reports","Audit preparation package","Priority support"].map(l=>e.jsxs("li",{className:"flex items-start gap-2.5",children:[e.jsx(O,{className:"w-4 h-4 text-emerald-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-blue-100 text-sm",children:l})]},l))})}),e.jsxs("div",{className:"px-7 pb-7",children:[e.jsxs("button",{onClick:()=>{const l=document.getElementById("pilot");l&&l.scrollIntoView({behavior:"smooth"})},className:"w-full py-3 bg-white text-[#0a1628] rounded-xl font-bold text-sm hover:bg-blue-50 transition-all flex items-center justify-center gap-2",children:["Request a Demo ",e.jsx(W,{className:"w-4 h-4"})]}),e.jsxs("a",{href:"https://cal.com/usagemetrics",target:"_blank",rel:"noopener noreferrer",className:"mt-3 w-full py-2.5 flex items-center justify-center gap-2 text-blue-300 hover:text-white text-sm font-semibold transition-colors",children:[e.jsx(et,{className:"w-4 h-4"})," Book a call instead"]})]})]})}),e.jsx(h,{delay:.14,children:e.jsxs("div",{className:"bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"px-7 pt-7 pb-5 border-b border-gray-100",children:[e.jsx("div",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Enterprise"}),e.jsx("div",{className:"flex items-end gap-1 mb-1",children:e.jsx("span",{className:"text-4xl font-black text-[#0a1628]",children:"Custom"})}),e.jsx("p",{className:"text-gray-400 text-xs mb-3",children:"from $12,000/year â billed annually"}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:"For large publishers â 300+ journals, custom integrations, and guaranteed SLAs."})]}),e.jsx("div",{className:"px-7 py-6 flex-grow",children:e.jsx("ul",{className:"space-y-3 mb-8",children:["Unlimited platforms","Custom integrations","Guaranteed SLA","Dedicated account manager","Full audit management"].map(l=>e.jsxs("li",{className:"flex items-start gap-2.5",children:[e.jsx(O,{className:"w-4 h-4 text-emerald-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-gray-600 text-sm",children:l})]},l))})}),e.jsx("div",{className:"px-7 pb-7",children:e.jsx("button",{onClick:()=>{const l=document.getElementById("pilot");l&&l.scrollIntoView({behavior:"smooth"})},className:"w-full py-3 border-2 border-[#0a1628] text-[#0a1628] rounded-xl font-bold text-sm hover:bg-[#0a1628] hover:text-white transition-all",children:"Contact us"})})]})})]}),e.jsx(h,{delay:.18,children:e.jsxs("p",{className:"text-center text-gray-400 text-sm mt-8",children:["Not sure which plan fits? ",e.jsx("button",{onClick:()=>{const l=document.getElementById("pilot");l&&l.scrollIntoView({behavior:"smooth"})},className:"text-blue-600 font-semibold hover:underline",children:"Talk to us"})," â we'll size it together."]})})]})}),e.jsx("section",{id:"pilot",className:"py-16 md:py-24 bg-[#1a2e5a]",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx(h,{children:e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-white mb-4",children:"Ready to Simplify Your COUNTER R5.1 Reporting?"}),e.jsx("p",{className:"text-lg text-[#7dd3fc] leading-relaxed max-w-2xl mx-auto",children:"Built for publishers who are tired of spending months on manual reporting. Reclaim your time and prepare your data for the standards of tomorrow."})]})}),u?e.jsx(h,{children:e.jsxs("div",{className:"bg-white rounded-2xl p-10 text-center shadow-2xl",children:[e.jsx(O,{className:"w-16 h-16 text-[#0077cc] mx-auto mb-4"}),e.jsx("p",{className:"text-xl font-bold text-[#1a2e5a] mb-2",children:"Thank you!"}),e.jsx("p",{className:"text-gray-600",children:"We'll be in touch shortly to schedule your demo."})]})}):e.jsx(h,{children:e.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl p-8 md:p-10 shadow-2xl",children:[e.jsx("h3",{className:"text-xl font-bold text-[#1a2e5a] mb-6 text-center",children:"Request a Demo"}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"pilot-email",className:"block text-sm font-semibold text-[#1a2e5a] mb-1.5",children:"Email *"}),e.jsx("input",{type:"email",id:"pilot-email",value:t,onChange:l=>a(l.target.value),required:!0,className:"w-full px-4 py-2.5 bg-white border border-gray-300 rounded-md text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0077cc]",placeholder:"[email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"pilot-org",className:"block text-sm font-semibold text-[#1a2e5a] mb-1.5",children:"Organisation *"}),e.jsx("input",{type:"text",id:"pilot-org",value:s,onChange:l=>i(l.target.value),required:!0,className:"w-full px-4 py-2.5 bg-white border border-gray-300 rounded-md text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0077cc]",placeholder:"Publisher Name"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("label",{htmlFor:"pilot-role",className:"block text-sm font-semibold text-[#1a2e5a] mb-1.5",children:"Your Role *"}),e.jsxs("select",{id:"pilot-role",value:r,onChange:l=>n(l.target.value),required:!0,className:"w-full px-4 py-2.5 bg-white border border-gray-300 rounded-md text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0077cc]",children:[e.jsx("option",{value:"",children:"Select your role"}),e.jsx("option",{value:"publisher",children:"Digital Operations Manager"}),e.jsx("option",{value:"publisher",children:"Publication Director"}),e.jsx("option",{value:"publisher",children:"Usage Reporting Analyst"}),e.jsx("option",{value:"library",children:"Library"}),e.jsx("option",{value:"other",children:"Other"})]})]}
9),e.jsx("button",{type:"submit",disabled:c,className:"w-full px-6 py-3.5 bg-[#1a2e5a] text-white rounded-md font-bold hover:bg-[#0077cc] transition-colors flex items-center justify-center gap-2 text-base shadow-md",children:c?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"w-4 h-4 animate-spin"})," Submitting..."]}):"Request a Demo Today"}),e.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[e.jsx("div",{className:"flex-1 h-px bg-gray-200"}),e.jsx("span",{className:"text-gray-400 text-xs font-medium",children:"or"}),e.jsx("div",{className:"flex-1 h-px bg-gray-200"})]}),e.jsxs("a",{href:"https://cal.com/usagemetrics",target:"_blank",rel:"noopener noreferrer",className:"w-full px-6 py-3.5 border-2 border-[#1a2e5a] text-[#1a2e5a] rounded-md font-bold hover:bg-[#1a2e5a] hover:text-white transition-colors flex items-center justify-center gap-2 text-base",children:[e.jsx(et,{className:"w-4 h-4"})," Book a Call"]})]})})]})})})]}),e.jsx(H,{})]})}const Ve=({title:t,description:a,canonical:s,articleMeta:i})=>{if(typeof document<"u"){document.title=t;let r=document.querySelector("meta[name='description']");r||(r=document.createElement("meta"),r.name="description",document.head.appendChild(r)),r.content=a;const n=(c,d)=>{let u=document.querySelector(`meta[property='${c}']`);u||(u=document.createElement("meta"),u.setAttribute("property",c),document.head.appendChild(u)),u.setAttribute("content",d)};if(n("og:title",t),n("og:description",a),n("og:type",i?"article":"website"),s&&n("og:url",`https://www.usagemetrics.ai${s}`),s){let c=document.querySelector("link[rel='canonical']");c||(c=document.createElement("link"),c.rel="canonical",document.head.appendChild(c)),c.href=`https://www.usagemetrics.ai${s}`}if(i&&s){const c={"@context":"https://schema.org","@type":i.category==="whitepaper"?"TechArticle":"Article",headline:i.title,description:i.seoDescription??i.description,url:`https://www.usagemetrics.ai${s}`,datePublished:i.date,dateModified:i.date,author:{"@type":"Person",name:"Walid Charfi",url:"https://www.usagemetrics.ai/about"},publisher:{"@type":"Organization",name:"usagemetrics.ai",url:"https://www.usagemetrics.ai",logo:{"@type":"ImageObject",url:"https://static.riff.new/public/wild-muted-chord-o2a0/logo_um.png"}},keywords:i.tags.join(", "),articleSection:i.category==="whitepaper"?"White Paper":"Article",inLanguage:"en",isPartOf:{"@type":"WebSite",name:"usagemetrics.ai Resources",url:"https://www.usagemetrics.ai/resources"}},d=document.querySelector("script[data-type='article-jsonld']");d&&d.remove();const u=document.createElement("script");u.type="application/ld+json",u.setAttribute("data-type","article-jsonld"),u.textContent=JSON.stringify(c),document.head.appendChild(u)}}return null},te=({meta:t,children:a})=>{const s=fe(),i=t.category==="whitepaper"?"White Paper":"Article",r=t.category==="whitepaper"?"bg-indigo-50 text-indigo-700 border-indigo-100":"bg-blue-50 text-blue-700 border-blue-100";return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(Ve,{title:t.seoTitle??`${t.title} | usagemetrics.ai`,description:t.seoDescription??t.description,canonical:t.canonical,articleMeta:t}),e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("section",{className:"bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 py-16 md:py-20 max-w-4xl",children:[e.jsxs("button",{onClick:()=>s("/resources"),className:"inline-flex items-center gap-2 text-sm text-gray-500 hover:text-[#0a1628] transition-colors mb-8 group",children:[e.jsx(Je,{className:"w-4 h-4 group-hover:-translate-x-0.5 transition-transform"}),"All Resources"]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-5",children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full border text-xs font-semibold ${r}`,children:[e.jsx(ar,{className:"w-3 h-3"}),i]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-gray-400",children:[e.jsx(rr,{className:"w-3.5 h-3.5"}),t.date]}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-gray-400",children:[e.jsx(Os,{className:"w-3.5 h-3.5"}),t.readTime," read"]})]}),e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-black text-[#0a1628] mb-4 leading-tight",children:t.title}),t.subtitle&&e.jsx("p",{className:"text-xl text-blue-600 font-semibold mb-4 leading-snug",children:t.subtitle}),e.jsx("p",{className:"text-lg text-gray-500 leading-relaxed max-w-3xl",children:t.description}),e.jsx("div",{className:"flex flex-wrap gap-2 mt-6",children:t.tags.map(n=>e.jsx("span",{className:"px-2.5 py-1 bg-gray-100 text-gray-500 rounded-md text-xs font-medium",children:n},n))})]})}),e.jsx("section",{className:"container mx-auto px-6 py-14 max-w-4xl",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_280px] gap-12",children:[e.jsx("article",{className:`prose prose-lg prose-gray max-w-none 10 prose-headings:font-black prose-headings:text-[#0a1628] 11 prose-h2:text-2xl prose-h2:mt-12 prose-h2:mb-4 12 prose-h3:text-xl prose-h3:mt-8 prose-h3:mb-3 13 prose-p:text-gray-600 prose-p:leading-relaxed 14 prose-li:text-gray-600 15 prose-strong:text-[#0a1628] prose-strong:font-bold 16 prose-a:text-blue-600 prose-a:no-underline hover:prose-a:underline 17 prose-table:border-collapse 18 prose-th:bg-[#f8fafc] prose-th:text-[#0a1628] prose-th:font-bold prose-th:p-3 prose-th:border prose-th:border-gray-200 19 prose-td:p-3 prose-td:border prose-td:border-gray-200 prose-td:text-gray-600 20 `,children:a}),e.jsx("aside",{className:"hidden lg:block",children:e.jsxs("div",{className:"sticky top-24 space-y-4",children:[e.jsxs("div",{className:"bg-gradient-to-br from-[#0a1628] to-blue-900 rounded-2xl p-6 text-white",children:[e.jsx("div",{className:"text-xs font-bold text-blue-300 uppercase tracking-widest mb-2",children:"Get Started"}),e.jsx("h3",{className:"text-lg font-black mb-3 leading-tight",children:"Ready to automate your COUNTER R5.1 compliance?"}),e.jsx("p",{className:"text-blue-200 text-sm leading-relaxed mb-5",children:"Join publishers who trust usagemetrics.ai for accurate, audit-ready usage statistics."}),e.jsx(v,{to:"/#pilot",className:"block w-full text-center px-5 py-2.5 bg-blue-500 hover:bg-blue-400 text-white rounded-xl font-semibold text-sm transition-colors",children:"Request a Demo"}),e.jsx(v,{to:"/resources",className:"block w-full text-center px-5 py-2.5 bg-white/10 hover:bg-white/20 text-white rounded-xl font-semibold text-sm transition-colors mt-2",children:"More Resources"})]}),e.jsxs("div",{className:"bg-gray-50 rounded-2xl p-5 border border-gray-100",children:[e.jsx("div",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Key Takeaways"}),e.jsxs("ul",{className:"space-y-2",children:[e.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[e.jsx("span",{className:"mt-1 w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0"}),"COUNTER R5.1 mandatory since Jan 2025"]}),e.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[e.jsx("span",{className:"mt-1 w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0"}),"Annual audit required for certification"]}),e.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[e.jsx("span",{className:"mt-1 w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0"}),"AI bot traffic now distorts usage data"]}),e.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[e.jsx("span",{className:"mt-1 w-1.5 h-1.5 rounded-full bg-blue-500 shrink-0"}),"Automation reduces compliance cost by 80%"]})]})]})]})})]})}),e.jsx("section",{className:"bg-gradient-to-br from-[#f8fafc] to-[#eff6ff] border-t border-gray-100 py-16",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-3xl text-center",children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-black text-[#0a1628] mb-3",children:"Stop managing COUNTER manually."}),e.jsx("p",{className:"text-gray-500 mb-8 text-lg",children:"usagemetrics.ai handles R5.1 compliance end-to-e
20nd â so you can focus on publishing."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsxs(v,{to:"/#pilot",className:"inline-flex items-center justify-center gap-2 px-8 py-3 bg-[#0a1628] text-white rounded-xl font-semibold hover:bg-blue-600 transition-all",children:["Request a Demo ",e.jsx(W,{className:"w-4 h-4"})]}),e.jsx(v,{to:"/resources",className:"inline-flex items-center justify-center gap-2 px-8 py-3 bg-white border border-gray-200 text-gray-700 rounded-xl font-semibold hover:bg-gray-50 transition-all",children:"Explore More Resources"})]})]})})]}),e.jsx(H,{})]})},$i={title:"Best Practices for a Successful COUNTER Audit",subtitle:"Your comprehensive guide to passing the annual COUNTER compliance audit",description:"The annual Project COUNTER compliance audit is a critical milestone for academic publishers. This guide covers everything you need to know â from understanding auditor requirements to preparing data and systems â so you can pass with confidence.",category:"article",readTime:"8 min",date:"January 2025",tags:["COUNTER Audit","R5.1","Compliance","Best Practices","Academic Publishing"],seoTitle:"Best Practices for a Successful COUNTER Audit | usagemetrics.ai",seoDescription:"A comprehensive guide for academic publishers on how to prepare and pass the annual COUNTER R5.1 compliance audit. Covers auditor requirements, data documentation, and automation strategies.",canonical:"/resources/counter-audit-best-practices"};function Ht(){return e.jsxs(te,{meta:$i,children:[e.jsx("h2",{children:"1. Why the COUNTER Audit Matters"}),e.jsxs("p",{children:["For academic publishers, usage statistics are more than internal metrics â they are the currency of trust in the library market. Libraries rely on COUNTER-compliant data to make subscription renewal decisions, justify budgets to administrators, and evaluate cost-per-use (CPU). When your data is audited and certified, it sends a clear signal: ",e.jsx("strong",{children:"your numbers can be trusted"}),"."]}),e.jsx("p",{children:"The consequences of a failed audit or chronic non-compliance are severe. Beyond the formal loss of COUNTER certification, publishers risk:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Being de-listed from consolidated usage platforms used by libraries"}),e.jsx("li",{children:"Losing credibility in license negotiations"}),e.jsx("li",{children:"Receiving demands from library consortia for re-auditing at the publisher's cost"}),e.jsx("li",{children:"Damaging long-term commercial relationships that take years to rebuild"})]}),e.jsx("p",{children:"A proactive approach to audit preparation is not just a compliance checkbox â it is a strategic investment in your publisher brand."}),e.jsx("h2",{children:"2. Understanding the Auditor's Requirements"}),e.jsxs("p",{children:["COUNTER audits are conducted by accredited third-party auditors, currently including ",e.jsx("strong",{children:"ABC (Audit Bureau of Circulations)"})," and ",e.jsx("strong",{children:"BPA Worldwide"}),". Understanding what they look for is the first step to a stress-free audit."]}),e.jsx("h3",{children:"Who Are the Auditors?"}),e.jsx("p",{children:"ABC and BPA Worldwide are independent, internationally recognised auditing bodies. They have been authorised by Project COUNTER to verify that publishers' usage reporting systems conform to the COUNTER Code of Practice. Audits are typically conducted annually, and their findings are published in COUNTER's public register."}),e.jsx("h3",{children:"Scope of the Audit"}),e.jsx("p",{children:"The audit covers three interconnected areas:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Data integrity:"})," Are the raw access logs accurately captured and stored?"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Processing rules:"})," Are deduplication, double-click filtering, robot exclusion, and metric calculations applied correctly?"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Reporting output:"})," Do the generated COUNTER reports (TR, DR, PR, IR) match the processed data and conform to R5.1 schemas?"]})]}),e.jsx("h3",{children:"Key Documents the Auditor Will Request"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Raw access log samples for the audited period"}),e.jsx("li",{children:"Processing documentation explaining your data pipeline"}),e.jsx("li",{children:"Final COUNTER reports (TR_J1, TR_B1, DR_D1, etc.) for the audit period"}),e.jsx("li",{children:"SUSHI API endpoint documentation and test credentials"}),e.jsx("li",{children:"Evidence of robot exclusion lists applied"})]}),e.jsx("h2",{children:"3. Pre-Audit Preparation: The Critical Steps"}),e.jsx("p",{children:"Successful publishers treat audit preparation as a year-round discipline, not a last-minute scramble. Here are the four pillars of effective pre-audit preparation:"}),e.jsx("h3",{children:"Internal Verification"}),e.jsx("p",{children:"Run monthly or quarterly internal audits against a subset of your own data. Compare raw log counts against processed metric totals. Verify that the double-click threshold rules are applied correctly (10-second window for articles and chapters, 30 seconds for books per R5.1
20). Flag any discrepancies before the official auditor does."}),e.jsx("h3",{children:"Documentation"}),e.jsx("p",{children:"Maintain a living document â your âCOUNTER Data Processing Specificationâ â that describes: how your tracking script captures events, how logs are transmitted and stored, the order in which processing rules are applied, and how metrics are aggregated into the standard report columns. This document should be updated with every system change."}),e.jsx("h3",{children:"Data Quality and Log Integrity"}),e.jsx("p",{children:"Logs should be immutable and time-stamped at the point of capture. Common issues that trigger audit findings include:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Missing or malformed User-Agent strings"}),e.jsx("li",{children:"Timestamp drift between server and log entries"}),e.jsx("li",{children:"Duplicate log entries from load-balanced servers"}),e.jsx("li",{children:"Incomplete IP address capture for geolocation-based access analysis"})]}),e.jsx("p",{children:"Run automated data quality checks after each log ingestion cycle to detect and alert on these issues before they accumulate."}),e.jsx("h3",{children:"Report Testing"}),e.jsx("p",{children:"Generate test reports at least 30 days before the audit window. Validate them against the official COUNTER R5.1 JSON schema validators. Cross-reference report totals against alternative data sources (e.g., access control system logs) to spot anomalies. Test your SUSHI API with the official SUSHI Validator tool maintained by COUNTER."}),e.jsx("h2",{children:"4. The Role of Technology in Audit Readiness"}),e.jsxs("p",{children:["Many audit failures are not caused by data quality problems â they are caused by ",e.jsx("em",{children:"undocumented manual processes"})," and ",e.jsx("em",{children:"inconsistent application of processing rules"}),". This is precisely where technology earns its value."]}),e.jsxs("p",{children:["A platform like ",e.jsx("strong",{children:"usagemetrics.ai"})," transforms audit preparation from a periodic crisis into a continuous, automated background process:"]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Automated Rule Application:"})," Processing rules (double-click filtering, robot exclusion per the COUNTER robot list, session thresholds) are applied consistently on every log ingestion â not by hand, and not subject to staff turnover."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Immutable Audit Trail:"})," Every processing step is logged and version-controlled, giving auditors a transparent chain of custody from raw log to final report."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Pre-Validated Reports:"})," Reports are schema-validated before delivery, so you never present a malformed COUNTER file to an auditor."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"One-Click SUSHI:"})," Your SUSHI R5.1 endpoint is maintained and tested continuously â ready for auditor inspection at any moment."]})]}),e.jsx("p",{children:"Critically, usagemetrics.ai itself undergoes COUNTER auditing as a platform provider. This means a significant portion of the technical compliance burden is verified at the platform level â not the publisher level. Your audit becomes a verification exercise, not a discovery exercise."}),e.jsx("h2",{children:"5. During the Audit: Collaboration and Transparency"}),e.jsx("p",{children:"The audit process typically runs over two to six weeks. Here is how to make it as smooth as possible:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Assign a single point of contact"})," within your team who coordinates all auditor communications. Avoid having auditors chase multiple departments."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Respond to requests within 48 hours."})," Delays in providing requested data are the most common cause of extended audits and adverse findings."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Be transparent about known issues."})," If you identified and corrected a processing bug mid-year, disclose it proactively with a clear explanation of the correction. Auditors respect honesty; they do not respect discovered cover-ups."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provide a data dictionary"})," with your report submissions, explaining any non-standard field values or platform-specific access patterns."]})]}),e.jsx("h2",{children:"6. Post-Audit: Maintaining Continuous Compliance"}),e.jsx("p",{children:"Passing the audit is not the finish line â it's the starting gun for the next annual cycle. Sustainable compliance requires:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Implementing auditor recommendations"})," within the documented timeframe, and retesting affected report sections."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Monitoring COUNTER standard updates"})," via the official Project COUNTER mailing list and the COUNTER Metrics website. R5.1 itself was a significant evolution from R5, and future updates are inevitable."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Scheduling quarterly internal
20compliance reviews"})," covering data quality, report schema validation, and SUSHI endpoint health checks."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Keeping your robot exclusion list current."})," COUNTER publishes updates to the known robot/crawler list. Stale lists mean inflated metrics â a finding auditors look for specifically."]})]}),e.jsx("h2",{children:"7. Conclusion: A Successful Audit Builds Lasting Credibility"}),e.jsx("p",{children:"The annual COUNTER audit need not be a source of stress. Publishers who invest in systematic, automated compliance infrastructure approach audit day as a routine confirmation of what they already know: their data is accurate, their processes are sound, and their library partners can trust their usage statistics."}),e.jsx("p",{children:"With usagemetrics.ai, the audit transforms from an annual ordeal into a standard operating procedure. Our platform continuously validates your data pipeline, maintains your SUSHI endpoint, and provides the documentation trail that auditors need â so you spend your energy on publishing, not on compliance firefighting."}),e.jsx("p",{children:e.jsx("strong",{children:"The goal is not just to pass the audit. The goal is to never have a reason to fail it."})})]})}const Ji={title:"How Long Should You Keep COUNTER Data? A Practical Guide for Libraries",subtitle:"Three years, forever, or somewhere in between â the community weighs in",description:"How long should libraries retain COUNTER usage data? A community discussion reveals two camps, the risk of restated data, and how the R5 to R5.1 transition complicates long-term trend analysis.",category:"article",readTime:"5 min",date:"March 2025",tags:["Data Retention","COUNTER R5.1","Libraries","Usage Data","SUSHI","R5 Migration"],seoTitle:"How Long Should You Keep COUNTER Data? A Guide for Libraries | usagemetrics.ai",seoDescription:"Discover best practices for COUNTER usage data retention: the 3-year operational standard, risks of restated data, and how to handle R5 vs R5.1 data in long-term trend analysis.",canonical:"/resources/counter-data-retention"};function $t(){return e.jsxs(te,{meta:Ji,children:[e.jsx("p",{children:"A recent thread on the COUNTER Community Listserv surfaced a question that most libraries quietly wrestle with but rarely discuss openly: how long should you actually keep your COUNTER usage data?"}),e.jsx("p",{children:"The conversation revealed that there is no universal answer â and that the choice has real consequences for collection decisions, research integrity, and data management."}),e.jsx("p",{children:"Here is what the community shared, and what it means for your institution."}),e.jsx("h2",{children:"The trigger: when archived data disagrees with current data"}),e.jsx("p",{children:"The question arose from a concrete problem. A collection librarian was working with a third-party archive covering COUNTER 5 reports going back to 2019 â an unusually long timeline â and discovered discrepancies between data archived in 2023 and the data currently available from the same vendor."}),e.jsx("p",{children:"The culprit? Restated data."}),e.jsx("p",{children:"Publishers occasionally correct and resubmit past reports. If your archive captured the original version and the vendor has since corrected it, your historical data and the vendor's current data will not match. This is not a bug â it is a documented feature of the COUNTER standard, which gives publishers up to three months to correct and restate data."}),e.jsx("p",{children:"The practical implication: the longer your archive, the more likely it contains data that has since been corrected at the source."}),e.jsx("h2",{children:"What the community actually does"}),e.jsx("p",{children:"Responses from the Listserv revealed two distinct camps."}),e.jsx("h3",{children:"Camp 1 â Keep everything, forever"}),e.jsx("p",{children:"Some librarians keep COUNTER reports going back to COUNTER 3. Their rationale is not just operational â they use long-term data for scholarship, specifically to analyze trends in ebook usage across different acquisition models: librarian-selected, demand-driven acquisition (DDA), and evidence-based acquisition (EBA)."}),e.jsx("p",{children:"Others take a similar approach, retaining usage data as far back as they have received it, with variation by platform. The motivation is the same: research into long-term usage patterns. The growing size of the data, however, may force archival decisions in the near future."}),e.jsx("h3",{children:"Camp 2 â Restrict to a practical trend line"}),e.jsx("p",{children:"After surfacing discrepancies in a long archive, some librarians concluded they would restrict reporting to the more standard three-year trend line. The complexity of managing data across two COUNTER releases (R5 and R5.1) and the risk of using uncorrected historical data outweigh the benefit of the longer timeline."}),e.jsx("h2",{children:"The R5 to R5.1 migration adds a new layer of complexity"}),e.jsx("p",{children:"One dimension that makes historical COUNTER data particularly tricky right now is the transition from Release 5 to Release 5.1, which became the required standard in January 2025."}),e.jsxs("p",{children:["While COUNTER has stated that R5.1 reports are broadly comparable to R5 reports, there are important caveats â particularly around book usage metrics, ",e.jsx("strong",{children:"Data_Type"})," classifications, and"," ",e.jsx("strong",{children:"Access_Type"})," mappings. If you are combining pre-2025 R5 data with post-2025 R5.1 data in the same analysis, you need to apply careful normalization."]}),e.jsx("p",{children:"Failing to do so can produce trend lines that appear to show usage changes that are actually just artifacts of the release migration."}),e.jsx("h2",{children:"A practical framework for data retention decisions"}),e.jsx("p",{children:"Based on the community discussion and COUNTER's own guid
20ance, here is a practical framework."}),e.jsx("h3",{children:"For operational decisions â subscription renewals, cancellations, value justification"}),e.jsx("p",{children:"Three years is the standard and sufficient window. It covers the current year plus the prior 24 months that COUNTER requires compliant providers to maintain. It avoids the noise of older, potentially restated data. And it aligns with most library budget cycles."}),e.jsx("h3",{children:"For research and longitudinal analysis"}),e.jsx("p",{children:"Retain as much as you have â but document it carefully. Note the COUNTER release version for each year of data. Flag any known restatements. And be explicit in any analysis about the limitations of cross-release comparisons."}),e.jsx("h3",{children:"For data that predates your current vendor relationship"}),e.jsx("p",{children:"Be cautious. If you are using archived data from a period when a different platform or third-party provider generated the reports, the processing rules may differ from what the current vendor applies. Subtle differences in session handling, bot exclusion, or metric calculation can produce incomparable figures."}),e.jsx("h2",{children:"What this means for publishers"}),e.jsx("p",{children:"The Listserv discussion was library-side, but there is an important mirror conversation on the publisher side."}),e.jsx("p",{children:"Libraries are making subscription and renewal decisions based on your COUNTER data. If your historical reports contain errors â bot inflation, session miscounts, incorrect metric mappings â and you have since corrected them, libraries with old archives may be making decisions based on inaccurate figures."}),e.jsx("p",{children:"This is one of the strongest arguments for ensuring your COUNTER implementation is accurate from the start, rather than relying on corrections after the fact. Every restatement you issue creates a discrepancy in some library's archive that may never be resolved."}),e.jsx("p",{children:e.jsx("strong",{children:"Clean data from day one is not just a compliance matter. It is a trust matter."})}),e.jsx("h2",{children:"Key takeaways"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Three years of COUNTER data is the practical standard for most operational purposes."}),e.jsx("li",{children:"Longer archives are valuable for research but require careful management and documentation across release versions."}),e.jsx("li",{children:"The R5 to R5.1 transition means that pre-2025 and post-2025 data require normalization before being combined in trend analysis."}),e.jsx("li",{children:"Restated data is a real risk in long archives â always cross-check critical historical figures against current vendor data before using them in decisions."}),e.jsx("li",{children:"For publishers, accuracy from the first report is the only reliable way to protect the integrity of your libraries' archives."})]})]})}const Vi={title:"Key Evolutions of Project COUNTER and Their Implications for Publishers",subtitle:"From R1 to R5.1 â understanding why COUNTER changes and how to stay ahead",description:"Project COUNTER is in constant evolution to match the dynamics of digital academic publishing. This article explores the major milestones in COUNTER's history, the transformative changes introduced in R5.1, and how publishers can anticipate and adapt to future developments.",category:"article",readTime:"7 min",date:"January 2025",tags:["COUNTER R5.1","Standards Evolution","Open Access","SUSHI API","Digital Publishing"],seoTitle:"Key Evolutions of Project COUNTER: R5.1 and Beyond | usagemetrics.ai",seoDescription:"Understand the history and evolution of COUNTER standards, what changed in R5.1, and how academic publishers can prepare for future COUNTER developments including AI usage reporting.",canonical:"/resources/counter-evolutions"};function Jt(){return e.jsxs(te,{meta:Vi,children:[e.jsx("h2",{children:"1. A Standard in Motion"}),e.jsxs("p",{children:["Since its inception in 2002, ",e.jsx("strong",{children:"Project COUNTER"})," (Counting Online Usage of Networked Electronic Resources) has grown from a modest initiative to the global gold standard for usage statistics in academic publishing. It provides a common framework that allows libraries to compare usage data across publishers, platforms, and content types â an essential function in a market where subscription decisions involve millions of dollars annually."]}),e.jsx("p",{children:"But the academic publishing landscape is not static. New content formats, new access models (Open Access, hybrid), new technology platforms, and entirely new categories of âreaderâ (including AI agents) are continuously reshaping how scholarly content is consumed. COUNTER must evolve with these changes or risk becoming irrelevant."}),e.jsxs("p",{children:["Understanding ",e.jsx("em",{children:"why"})," COUNTER evolves â not just ",e.jsx("em",{children:"what"})," changed â is the key to building systems that age well and require minimal rework with each new release."]}),e.jsx("h2",{children:"2. The R5.1 Revolution: What Changed and Why"}),e.jsxs("p",{children:["Released as the mandatory standard from ",e.jsx("strong",{children:"January 2025"}),", COUNTER Release 5.1 introduced the most substantive changes to the framework since Release 5 in 2017. The changes are not cosmetic â they reflect a fundamental rethinking of granularity, transparency, and interoperability."]}),e.jsx("h3",{children:"From Title to Item: A Deeper Level of Granularity"}),e.jsxs("p",{children:["One of the most impactful shifts in R5.1 is the increased emphasis on ",e.jsx("strong",{children:"item-level reporting"}),". While R5 focused primarily on the title (a journal or a book), R5.1 pushes reporting down to the component level: individual articles, chapters, and book sections."]}),e.jsxs("p",{children:["Why does this matter? Libraries increasingly w
20ant to understand which ",e.jsx("em",{children:"parts"})," of a resource are being used â not just whether the journal as a whole is accessed. Item-level data enables more nuanced cost-per-use calculations and better supports decisions about Open Access publishing or article-level licensing models."]}),e.jsx("p",{children:"For publishers, this means tracking infrastructure must capture usage events with greater precision. A system built on title-level aggregation cannot be retrofitted for item-level R5.1 reporting without architectural changes."}),e.jsx("h3",{children:"New Data Types and Access Types"}),e.jsxs("p",{children:["R5.1 introduced new and refined ",e.jsx("strong",{children:"Data Types"})," (e.g., distinguishing Articles from Chapters from Book Sections) and ",e.jsx("strong",{children:"Access Types"})," with greater specificity for Open Access content:"]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Gold OA:"})," Content published under a fully open licence from the outset"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Bronze OA:"})," Content made freely available by the publisher without a formal OA licence (e.g., time-delayed or selected articles)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Green OA:"})," Content available through a repository as a permitted manuscript version"]})]}),e.jsx("p",{children:"These distinctions are increasingly important to funders such as the Wellcome Trust, Research England, and the Bill & Melinda Gates Foundation, who mandate Open Access as a condition of funding. Accurate OA Access Type reporting allows libraries and funders to measure the real-world uptake of their OA policies."}),e.jsx("h3",{children:"SUSHI API Enhancements"}),e.jsx("p",{children:"The SUSHI protocol â which enables automated harvesting of usage statistics from publisher endpoints â was substantially revised for R5.1. Key improvements include:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Stricter API response schemas for better interoperability with library ERM systems"}),e.jsx("li",{children:"New error-reporting codes for more diagnostic harvesting failures"}),e.jsx("li",{children:"Improved handling of report filters and attributes to support item-level queries"})]}),e.jsx("p",{children:"Publishers who had a working SUSHI R5 endpoint cannot assume backward compatibility. SUSHI R5.1 requires deliberate implementation and testing."}),e.jsx("h2",{children:"3. Impacts and Challenges for Publishers"}),e.jsx("h3",{children:"Technical Challenges"}),e.jsx("p",{children:"The technical demands of R5.1 are significant for publishers relying on legacy systems or in-house developed solutions:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Tracking scripts must capture item-level identifiers (DOI, ISBN, ISSN at the article/chapter level)"}),e.jsx("li",{children:"Processing pipelines must distinguish and apply correct rules across a wider range of Data Types and Access Types"}),e.jsx("li",{children:"SUSHI endpoints must be rewritten or upgraded to serve R5.1 JSON schemas"}),e.jsx("li",{children:"Report generation logic must handle new report column structures and filter parameters"})]}),e.jsx("h3",{children:"Operational Challenges"}),e.jsx("p",{children:"Beyond the technical layer, R5.1 creates operational challenges:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Teams responsible for compliance must be retrained on new data definitions and report interpretations"}),e.jsx("li",{children:"Library customers will begin requesting R5.1 data and expect SUSHI R5.1 endpoints â publishers who are slow to transition risk damaging customer trust"}),e.jsx("li",{children:"Audit firms (ABC, BPA Worldwide) are now auditing against R5.1 criteria; prior years' audit passes do not automatically carry over"})]}),e.jsx("h3",{children:"Strategic Implications"}),e.jsx("p",{children:"R5.1's richer data also creates strategic opportunities. Item-level granularity enables:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"More compelling evidence for article-level licensing and pay-per-view models"}),e.jsx("li",{children:"Better understanding of which content types drive the most engagement"}),e.jsx("li",{children:"Differentiated value propositions in consortium negotiations â showing exactly which titles and content types drove usage in specific library sectors"})]}),e.jsx("h2",{children:"4. Beyond R5.1: The Next Frontiers of COUNTER"}),e.jsx("p",{children:"The transition to R5.1 is recent, but Project COUNTER's Technical Advisory Group (TAG) is already exploring the next evolution of the standard. Three areas are particularly active:"}),e.jsx("h3",{children:"AI Usage Reporting"}),e.jsxs("p",{children:["The explosion of Large Language Models (LLMs) and AI agents accessing scholarly content raises a profou
20nd question: should AI-generated access be reported separately, and if so, how? Current COUNTER guidance focuses on ",e.jsx("em",{children:"excluding"})," known robots from usage counts. But as AI tools become licensed data consumers (e.g., publishers offering API access to LLMs for training), a reporting framework for machine usage may become necessary."]}),e.jsx("p",{children:"Publishers who invest now in infrastructure that can distinguish human from AI traffic â like usagemetrics.ai's detection engine â will be well-positioned to adopt whatever reporting framework COUNTER ultimately introduces."}),e.jsx("h3",{children:"Evolving Library and Funder Needs"}),e.jsx("p",{children:"Libraries are becoming more sophisticated data consumers. They increasingly want usage data cross-referenced with institutional affiliation data, subject classifications, and OA uptake. Funders want evidence that their mandates are being adopted. Future COUNTER releases will likely reflect these demands with new report types or supplementary data fields."}),e.jsx("h3",{children:"Open Science Measurement"}),e.jsx("p",{children:"As Open Science becomes mainstream policy across Europe and North America, COUNTER will play a growing role in measuring the impact of open content. Future versions may introduce usage metrics specifically designed for preprint servers, data repositories, and other non-traditional scholarly outputs."}),e.jsx("h2",{children:"5. Best Practices for Staying Ahead of COUNTER Changes"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Follow COUNTER communications closely."})," Subscribe to the Project COUNTER newsletter and monitor announcements on the COUNTER Metrics website. The standard's evolution is well-signalled in advance."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Participate in the community."})," COUNTER runs working groups and webinars that allow publishers to shape the direction of the standard. Engagement now can prevent unwelcome surprises later."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Invest in flexible infrastructure."})," Systems hardcoded to specific report schemas are expensive to update. Architectures built on configurable data pipelines â like usagemetrics.ai â can adapt to new releases with configuration updates rather than full rebuilds."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Build test environments."})," Maintain a parallel test environment where you can validate your implementation against new COUNTER schema versions before they become mandatory."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Document everything."})," A well-documented data pipeline is far easier to update when requirements change than an undocumented one."]})]}),e.jsx("h2",{children:"6. Conclusion: Anticipate to Manage"}),e.jsx("p",{children:"The evolution of Project COUNTER is not a burden to endure â it is a signal that the academic publishing ecosystem is maturing. Each release makes usage data more reliable, more granular, and more meaningful for the libraries and funders who depend on it."}),e.jsx("p",{children:"Publishers who treat COUNTER compliance as a strategic capability â investing in adaptable infrastructure, staying engaged with the standard's evolution, and leveraging automation to reduce the marginal cost of each new release â will consistently outperform peers who scramble to catch up after each transition."}),e.jsx("p",{children:"usagemetrics.ai is built on exactly this philosophy: a platform designed not just for R5.1, but for whatever comes next."})]})}const Wi={title:"COUNTER's Pathway to Compliance: A Lifeline for Small Publishers",subtitle:"Published in April 2026, COUNTER's new Pathway to Compliance gives smaller publishers a structured, incremental route to credible usage reporting â without requiring full R5.1 compliance from day one.",description:"COUNTER's Pathway to Compliance (April 2026) offers small publishers a structured, audit-free route to R5.1 usage reporting. This article breaks down the eligibility criteria, required reports, metrics, delivery methods, and the transparency checks that govern Pathway publishers.",category:"article",readTime:"9 min",date:"April 2026",tags:["COUNTER R5.1","Pathway to Compliance","Small Publishers","SUSHI","Registry"],seoTitle:"COUNTER Pathway to Compliance: What Small Publishers Need to Know | usagemetrics.ai",seoDescription:"COUNTER's April 2026 Pathway to Compliance lets small publishers achieve credible R5.1 usage reporting without a full audit. Learn the eligibility rules, required reports, metrics, and delivery requirements.",canonical:"/article-counter-pathway-compliance"};function Vt(){return e.jsxs(te,{meta:Wi,children:[e.jsx("p",{children:"Full COUNTER R5.1 compliance is a significant engineering undertaking. For a large commercial publisher with a dedicated platform team, it is achievable â expensive and time-consuming, but achievable. For a small scholarly society running a single-platform journal portfolio, or a small academic press with a modest eBook catalogue, it has historically been an all-or-nothing proposition: either you implement everything the Code of Practice requires, or you are listed in the COUNTER Registry as non-compliant, and your library customers must harvest your usage data manually."}),e.jsxs("p",{children:["COUNTER's new ",e.jsx("strong",{children:"Pathway to Compliance"}),", published on 22 April 2026, changes that. It creates a formal intermediate status â a structured set of requirements that are meaningfully less demanding than full compliance, while still ensuring that library customers receive accurate, standardised, machine-readable usage data. This article explains who is eligible, what the Pathway requires, and what it does not require."]}),e.jsx("h2",{children:"What Problem Does the Pathway Solve?"}),e.jsx("p",{children:"The COUNTER community has known for years that a significant tail of publishers cannot achieve full compliance. The reasons are consistently technical: no developer resource to build a SUSHI API, no data pipeline capable of applying double-click filtering correctly, no capacity to generate monthly reports in JSON format. These publishers are not uninterested in usage reporting â they simply cannot afford the engineering investment that full compliance demands."}),e.jsx("p",{children:"The consequence for libraries is a patchy landscape: some publishers in their portfolio deliver rich, automated COUNTER data via SUSHI; others provide a spreadsheet once a year, inconsistently formatted, requiring manual cleaning before it can be loaded into an ERM system. The Pathway is designed to shrink that second group and raise the floor of usage data quality across the sector."}),e.jsx("blockquote",{children:"The Pathway is not a lower standard â it is a scoped standard. It covers less ground than full compliance, but what it does cover must be done correctly."}),e.jsx("h2",{children:"Who Is Eligible?"}),e.jsxs("p",{children:["The Pathway is available to ",e.jsx("strong",{children:"small publishers"})," who are not currently compliant with R5.1 and were not previously compliant with R5. Publishers who were already compliant with R5 are not eligible â the Pathway is an on-ramp, not a downgrade path."]}),e.jsxs("p",{children:["COUNTER defines a small publisher for this purpose as one operating"," ",e.jsx("em",{children:'"a single platform, where that platform includes up to 150 books OR 15 journals OR one database."'})," ","This definition aligns with the existing definition used to determine eligibility for alternate-year audits under Section 9.3 of the Code of Practice, so it is already well understood within the sector."]}),e.jsx("p",{children:"Publishers joining the Pathway must meet three baseline conditions:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Be members of COUNTER."}),e.jsx("li",{children:"Comply with all requirements defined in the Pathway guidance."}),e.jsx("li",{children:"Commit to reaching full R5.1 compliance when COUNTER migrates to a future Release 5.2 â a transition that COUNTER has
20indicated will not begin before January 2030."})]}),e.jsx("p",{children:"That last point is significant: the Pathway is explicitly time-limited. It is a bridge to full compliance, not a permanent alternative."}),e.jsx("h2",{children:"Data Processing: No Shortcuts Here"}),e.jsxs("p",{children:["One area where the Pathway makes no concessions is ",e.jsx("strong",{children:"data processing"}),". Publishers on the Pathway must process their raw usage data in full compliance with Section 7 of the Code of Practice â the section that defines double-click filtering, robot and crawler exclusion, and the rules for counting investigations versus requests."]}),e.jsx("p",{children:"This is the right call. The value of COUNTER data to libraries depends entirely on the consistency of the underlying counting methodology. A publisher that delivers JSON reports via a polished SUSHI endpoint but applies incorrect double-click filtering is less useful to a library than one that delivers a TSV once a year but counts correctly. The Pathway gets the priority right."}),e.jsx("h2",{children:"Which Reports Are Required?"}),e.jsx("p",{children:"This is where the Pathway makes its most significant concession to small publishers. Under full R5.1, a publisher's required reports depend on their Host_Type and can include combinations of the PR, DR, TR, and IR. Standard Views derived from master reports are also mandatory."}),e.jsx("p",{children:"Under the Pathway, the requirements are simplified:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["The ",e.jsx("strong",{children:"Platform Report (PR)"})," is required for all Pathway publishers."]}),e.jsxs("li",{children:["The ",e.jsx("strong",{children:"Database Report (DR)"}),", ",e.jsx("strong",{children:"Title Report (TR)"}),", and/or"," ",e.jsx("strong",{children:"Item Report (IR)"})," are required as relevant to the publisher's content type."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Standard Views are optional."})," A Pathway publisher that provides a valid PR and TR is not required to also produce TR_J1, TR_B1, and the other Standard Views."]})]}),e.jsx("p",{children:"COUNTER's Executive Director is available to help individual publishers determine which reports apply to their Host_Type â a useful safety net for publishers who are new to the compliance landscape."}),e.jsx("h2",{children:"Report Filters and Attributes"}),e.jsx("p",{children:"The Pathway creates a two-tier approach to report filtering:"}),e.jsxs("p",{children:["Publishers who ",e.jsx("em",{children:"are"})," technically able to support the full COUNTER filter options"," ",e.jsx("strong",{children:"should"})," do so. That means supporting filtering by Data_Type, Access_Method, Metric_Type, Exclude_Monthly_Details (and additionally YOP, Access_Type, Include_Parent_Details, Include_Component_Details for the TR and IR). Where a publisher supports full filtering, they must declare which attributes are available via Attributes_To_Show in the report header."]}),e.jsxs("p",{children:["Publishers who ",e.jsx("em",{children:"cannot"})," support full filtering must instead include all attributes in all reports by default. The Pathway specifies exactly which attributes must appear for each report type:"]}),e.jsx("div",{className:"overflow-x-auto my-6",children:e.jsxs("table",{className:"w-full text-sm border-collapse border border-gray-200 rounded",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#0a1628] text-white",children:[e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"Report"}),e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"Mandatory attributes (if no filtering supported)"})]})}),e.jsxs("tbody",{className:"divide-y divide-gray-100",children:[e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Platform Report (PR)"}),e.jsxs("td",{className:"px-4 py-3 text-gray-600",children:[e.jsx("code",{children:"Data_Type"}),", ",e.jsx("code",{children:"Access_Method"}),", ",e.jsx("code",{children:"Metric_Type"})]})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Database Report (DR)"}),e.jsxs("td",{className:"px-4 py-3 text-gray-600",children:[e.jsx("code",{children:"Data_Type"}),", ",e.jsx("code",{children:"Access_Method"}),", ",e.jsx("code",{children:"Metric_Type"})]})]}),e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Title Report (TR)"}),e.jsxs("td",{className:"px-4 py-3 text-gray-600",children:[e.jsx("code",{children:"Data_Type"}),", ",e.jsx("code",{children:"YOP"}),", ",e.jsx("code",{children:"Access_Type"}),","," ",e.jsx("code",{children:"Access_Method"}),", ",e.jsx("code",{children:"Metric_Type"})]})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Item Report (IR)"}),e.jsxs("td",{className:"px-4 py-3 text-gray-600",children:[e.jsx("code",{children:"Data_Type"}),", ",e.jsx("code",{children:"YOP"}),", ",e.jsx("code",{children:"Access_Type"}),","," ",e.jsx("code",{children:"Access_Method"}),", ",e.jsx("code",{children:"Metric_Type"}),","," ",e.jsx("code",{children:"Include_Parent_Details = True"})]})]})]})]})}),e.jsx("p",{children:"In practice, this means a publisher with no filtering capability simply produces maximally detailed reports: every combination of Data_Type, Access_Method, Access_Type, and YOP appears as a separate row. Libraries can then filter locally in their ERM systems. It is more data than they strictly need, but it is accurate and standardised."}),e.jsx("h2",{children:"Report Format"}),e.jsx("p",{children:"Pathway publishers must use the standard COUNTER report format as defined in Section 3.2 of the Code of Practice. On format preference, the guidance is explicit:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Delivery of both tabular and JSON formats is preferred."}),e.jsxs("li",{children:["Where only one format is available,"," ",e.jsx("strong",{children:"JSON is the recommended single format"}),"."]}),e.jsxs("li",{children:["Where JSON is not technically feasible, tabular reports in"," ",e.jsx("code",{children:".tsv"})," or ",e.jsx("code",{children:".xlsx"})," are acceptable."]})]}),e.jsx("p",{children:"The preference for JSON over tabular formats reflects where the sector is heading: ERM systems and SUSHI harvesting tools are increasingly optimised for JSON ingestion, and JSON reports carry more metadata than their tabular equivalents."}),e.jsx("h2",{children:"Report Frequency and Granularity"}),e.jsx("p",{children:"The Pathway makes a meaningful concession on reporting frequency. Full R5.1 compliance implies monthly report availability â libraries expect to be able to harvest usage data for each calendar month via SUSHI. For many small publishers, generating monthly reports is technically impractical."}),e.jsx("p",{children:"Under the Pathway:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Publishers must provide ",e.jsx("strong",{children:"at least one set of reports per year"}
vendor: 4,155 bytes, line 20
20),", showing the Reporting_Period_Total for the full calendar year (January to December)."]}),e.jsx("li",{children:"More frequent reporting (quarterly or monthly) is preferred but acknowledged as not always viable for the smallest publishers."}),e.jsxs("li",{children:["Publishers must offer ",e.jsx("strong",{children:"month-by-month breakdowns"})," within their reports, in line with Section 3.2 of the Code of Practice. Annual-only totals without monthly granularity are not sufficient."]})]}),e.jsx("p",{children:"The practical implication: a small press could produce one annual TSV file per institution, with monthly columns for January through December, and meet the minimum requirement. That is a manageable target even without a SUSHI API."}),e.jsx("h2",{children:"Report Delivery: SUSHI or Structured Email"}),e.jsx("p",{children:"This is perhaps the most important concession in the Pathway. Full COUNTER compliance requires a functioning SUSHI API â a JSON-over-HTTPS service that responds to standardised harvest requests from library ERM systems. Building and maintaining a SUSHI API requires ongoing developer time that many small publishers simply do not have."}),e.jsx("p",{children:"Under the Pathway:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Publishers ",e.jsx("strong",{children:"should"})," implement the COUNTER API (SUSHI) if technically feasible."]}),e.jsxs("li",{children:["Publishers who cannot implement SUSHI ",e.jsx("strong",{children:"must"})," make it possible for librarians to set up an ",e.jsx("strong",{children:"alternative automated delivery"})," system. The minimum requirement is to allow librarians to register once and receive regular report delivery via"," ",e.jsx("strong",{children:"email"}),"."]})]}),e.jsx("p",{children:"A once-registered email delivery system is meaningfully better than asking librarians to download reports manually from a website each month. It removes the human dependency from the harvesting workflow, even if it cannot match the full automation of a SUSHI endpoint."}),e.jsx("blockquote",{children:"For most small publishers, the practical target is: correct data, in TSV or XLSX format, delivered annually to each registered librarian by email. That is genuinely achievable without any custom software development."}),e.jsx("h2",{children:"Required Metrics"}),e.jsx("p",{children:"The metric requirements under the Pathway are a subset of full R5.1, with a clear hierarchy between mandatory and recommended."}),e.jsx("h3",{children:"Usage metrics (mandatory)"}),e.jsx("p",{children:"All Pathway publishers must provide:"}),e.jsxs("ul",{children:[e.jsx("li",{children:e.jsx("code",{children:"Total_Item_Investigations"})}),e.jsx("li",{children:e.jsx("code",{children:"Unique_Item_Investigations"})}),e.jsx("li",{children:e.jsx("code",{children:"Total_Item_Requests"})}),e.jsx("li",{children:e.jsx("code",{children:"Unique_Item_Requests"})}),e.jsxs("li",{children:[e.jsx("code",{children:"Unique_Title_Investigations"})," (for platforms including Books and/or Reference_Works)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Unique_Title_Requests"})," (for platforms including Books and/or Reference_Works)"]})]}),e.jsx("h3",{children:"Denial metrics (recommended)"}),e.jsxs("p",{children:["Pathway publishers should provide ",e.jsx("code",{children:"No_License"})," and ",e.jsx("code",{children:"Limit_Exceeded"})," ","where these are relevant to their access model. Open access publishers, for whom denials do not apply, are explicitly excluded from this requirement."]}),e.jsx("h3",{children:"Search metrics (recommended for database Host_Types)"}),e.jsxs("p",{children:["Publishers with a database Host_Type â A&I_Database, Aggregated_Full_Content, Discovery_Service, eBook_Collection, Full_Content_Database, Multimedia_Collection â should provide ",e.jsx("code",{children:"Searches_Regular"})," in the Database Report. Since Pathway publishers will have only one database on their platform, ",e.jsx("code",{children:"Searches_Platform"})," will always equal"," ",e.jsx("code",{children:"Searches_Regular"})," and should also be provided in the Platform Report."]}
20),e.jsx("p",{children:"Search metrics are optional for eJournal and eBook Host_Types on the Pathway."}),e.jsx("h3",{children:"Non-COUNTER metrics"}),e.jsx("p",{children:"Pathway publishers must not include non-COUNTER metrics in their COUNTER reports except as allowed under Section 11 of the Code of Practice â which permits custom metrics only if they are identified by a namespace and delivered only when explicitly requested. This rule is identical to the requirement for fully compliant publishers."}),e.jsx("h2",{children:"Transparency and Verification"}),e.jsx("p",{children:"The Pathway replaces the formal audit process with a lighter-touch transparency regime. It has three components."}),e.jsx("h3",{children:"Technical Validity via the COUNTER Validator"}),e.jsxs("p",{children:["All Pathway publishers are recommended to use the free"," ",e.jsx("a",{href:"https://validator.countermetrics.org/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"COUNTER Validator"})," ","regularly. Beyond that recommendation, there are hard requirements:"]}),e.jsxs("ul",{children:[e.jsx("li",{children:"Tabular reports must pass the Validator's checks (where tabular reports are provided)."}),e.jsx("li",{children:"JSON reports must pass the Validator's checks (where JSON is provided)."}),e.jsx("li",{children:"SUSHI endpoints must pass the Validator's checks (where a SUSHI API exists)."}),e.jsxs("li",{children:["Publishers must share a ",e.jsx("strong",{children:"complete set of Validator results with COUNTER annually"}),". A complete set means at least two report instances per report type, in each format provided, plus API endpoint tests where applicable."]})]}),e.jsx("p",{children:"This annual Validator submission replaces the formal audit. It is a meaningful accountability mechanism: publishers cannot simply declare compliance â they must produce evidence of it."}),e.jsx("h3",{children:"Complaint-triggered investigation"}),e.jsx("p",{children:"COUNTER will trigger a manual assessment if complaints exceed specific thresholds:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"More than three report consumers report errors in a single calendar month, or"}),e.jsx("li",{children:"More than six report consumers report errors over a rolling three-month period."})]}),e.jsx("p",{children:"When triggered, the investigation includes canvassing the wider library community via the COUNTER listserv and requiring the publisher to repeat the Technical Validity checks described above."}),e.jsx("h3",{children:"Fix period and delisting"}),e.jsxs("p",{children:["Where issues are identified â whether through the annual Validator submission or a complaint-triggered investigation â publishers have ",e.jsx("strong",{children:"six months to fix the problem"}),". This mirrors the maximum fix period allowed under a formal audit. If the publisher fails to pass re-testing after that period, they will be delisted from the COUNTER Registry."]}),e.jsx("p",{children:"Delisting is a meaningful consequence. The COUNTER Registry is the authoritative source libraries use to configure their ERM systems for SUSHI harvesting. A publisher delisted from the Registry becomes effectively invisible to automated harvesting workflows."}),e.jsx("h2",{children:"Registry Listing: Differentiated but Present"}),e.jsxs("p",{children:["Publishers on the Pathway will appear in the COUNTER Registry, subject to passing the Technical Validity checks and maintaining COUNTER membership. Critically, their listing will be ",e.jsx("strong",{children:"clearly distinguished"})," from that of fully audited publishers."]}),e.jsx("p",{children:"The Pathway Registry listing will display more granular information than a standard listing:"}),e.jsx("div",{className:"overflow-x-auto my-6",children:e.jsxs("table",{className:"w-full text-sm border-collapse border border-gray-200 rounded",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#0a1628] text-white",children:[e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"Field"}),e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"Description"})]})}),e.jsxs("tbody",{className:"divide-y divide-gray-100",children:[e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Compliance status"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Pathway status, including the date of the last Technical Validity check"})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Report formats"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Which of TSV, XLSX, and/or JSON the publisher provides"})]}),e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Report filtering"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Whether the publisher supports filtering by attribute, or delivers all attributes by default"})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Metrics availability"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Whether denial metrics and search metrics are available"})]})]})]})}
20),e.jsx("p",{children:"COUNTER has indicated it will invest in Registry development in late 2026 to make this additional information displayable. Until those developments land, Pathway publishers will appear in the Registry but the differentiated fields may not yet be visible to end users."}),e.jsx("h2",{children:"The Commitment to Full Compliance"}),e.jsx("p",{children:"The Pathway is designed as a temporary status. All publishers joining it commit to reaching full R5.1 compliance â or more precisely, full compliance with whatever release is current at the time â when COUNTER transitions to Release 5.2. That transition is not expected before January 2030, giving Pathway publishers at minimum three and a half years to build the technical infrastructure required for full compliance."}),e.jsx("p",{children:"For a small publisher joining the Pathway today, this is a credible planning horizon. The technical requirements for full compliance are not going to change dramatically before 2030; the investment case for building a SUSHI API and full report pipeline can be evaluated and scheduled with confidence."}),e.jsx("h2",{children:"What the Pathway Means in Practice"}
20),e.jsx("p",{children:"For a small eJournal publisher with 10â15 titles and no dedicated developer, the Pathway creates a realistic compliance path:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Apply standard double-click filtering and robot exclusion to raw usage logs (Section 7 compliance â non-negotiable)."}),e.jsx("li",{children:"Generate a PR and TR annually, with monthly columns, in TSV format."}),e.jsx("li",{children:"Include all attributes (Data_Type, YOP, Access_Type, Access_Method, Metric_Type) in the TR since filtering is not supported."}),e.jsx("li",{children:"Build a simple email registration form so librarians can sign up to receive their annual reports automatically."}),e.jsx("li",{children:"Run reports through the COUNTER Validator and submit results to COUNTER annually."})]}),e.jsx("p",{children:"That workflow is achievable with modest technical resource. It does not require a SUSHI API, JSON generation, or monthly reporting cycles. It does require getting the data processing right â which is the part that matters most to library customers."}),e.jsx("h2",{children:"Conclusion"}),e.jsx("p",{children:"The COUNTER Pathway to Compliance is a well-designed piece of policy. It makes the right concessions (report frequency, SUSHI API, Standard Views) while holding firm on the things that actually determine data quality (processing methodology, attribute completeness, annual Validator verification). It gives small publishers a route into the Registry that was previously closed to them, and it gives libraries better data from publishers who were previously invisible to their ERM systems."}),e.jsx("p",{children:"The Pathway is not a permanent destination. It is, as the name says, a pathway â and it has a clear endpoint in the R5.2 transition. Publishers who join the Pathway and use the time well will arrive at that endpoint with the data infrastructure they need to step into full compliance. Those who treat the Pathway as a permanent exemption will find themselves facing the same engineering challenge in 2030, with less time to solve it."}),e.jsxs("p",{children:["If you are a small publisher evaluating whether the Pathway applies to you, the first step is to check whether your raw usage processing already meets Section 7 of the Code of Practice. If it does not, that is where to start â everything else in the Pathway depends on counting correctly."," ",e.jsx("a",{href:"/#waitlist",className:"text-blue-600 hover:underline",children:"usagemetrics.ai can automate that entire processing pipeline"}),", from raw log ingestion through to COUNTER-compliant report generation."]})]})}const zi={title:"PR, DR, TR, IR: Understanding the Four COUNTER R5.1 Report Types",subtitle:"A detailed guide to the Platform, Database, Title, and Item Reports â their scope, metrics, attributes, standard views, and when to use each.",description:"COUNTER R5.1 defines four master report types: PR, DR, TR, and IR. Each covers a different granularity of content usage. This article explains the exact differences â metrics, Data_Types, required attributes, standard views, and which Host_Types must provide each report.",category:"article",readTime:"12 min",date:"April 2025",tags:["COUNTER R5.1","PR","DR","TR","IR","Report Types","SUSHI","Metrics"],seoTitle:"PR vs DR vs TR vs IR: COUNTER R5.1 Report Types Explained | usagemetrics.ai",seoDescription:"What are the differences between PR, DR, TR and IR in COUNTER R5.1? This detailed guide covers metrics, attributes, Data_Types, standard views, and which publishers must provide each report type.",canonical:"/article-counter-report-types"};function Wt(){return e.jsxs(te,{meta:zi,children:[e.jsxs("p",{children:["COUNTER R5.1 defines four master report types: the ",e.jsx("strong",{children:"Platform Report (PR)"}),", the"," ",e.jsx("strong",{children:"Database Report (DR)"}),", the ",e.jsx("strong",{children:"Title Report (TR)"}),", and the"," ",e.jsx("strong",{children:"Item Report (IR)"}),". They are not four views of the same data â they are four"," ","fundamentally different lenses on content usage, each operating at a different level of granularity and serving different analytical purposes."]}),e.jsx("p",{children:"Understanding the precise differences between them is essential for any publisher implementing COUNTER compliance: the wrong report type at audit time will fail validation, and the wrong metric in the wrong report will create misleading usage data for your library customers."}),e.jsx("h2",{children:"The Hierarchy: From Platform Down to Item"}),e.jsx("p",{children:"The four report types map directly onto a content hierarchy. Think of it as four zoom levels:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"PR (Platform Report)"})," â the widest view. All usage across everything on your platform, aggregated together."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DR (Database Report)"})," â usage grouped by database (e.g. a specific subscription package or collection)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR (Title Report)"}
20)," â usage broken down per journal, book, or other titled work."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"IR (Item Report)"})," â the most granular level: usage per individual article, chapter, or multimedia file."]})]}),e.jsxs("p",{children:["Each report type is a ",e.jsx("em",{children:"master report"}),": a maximally detailed dataset that can be filtered and sliced into pre-defined ",e.jsx("em",{children:"Standard Views"})," (e.g. TR_J1 for journal requests, TR_B1 for book requests). The master report is always richer than any Standard View."]}),e.jsx("blockquote",{children:"A key R5.1 rule: if your Host_Type requires the TR, you must also report at title level in the PR. If you also provide the IR, usage must be reported at item level across the PR and, where required, the DR. The hierarchy is enforced by the Code of Practice."}),e.jsx("h2",{children:"Platform Report (PR)"}),e.jsx("h3",{children:"What it measures"}),e.jsx("p",{children:"The PR aggregates all usage activity across the entire platform. It does not distinguish between individual titles, databases, or items. Its purpose is to give a bird's-eye view of how the platform as a whole is being used."}),e.jsxs("p",{children:["The PR is ",e.jsx("strong",{children:"mandatory for all Host_Types"})," without exception. Every COUNTER compliant publisher must provide it."]}),e.jsx("h3",{children:"Unique metric: Searches_Platform"}),e.jsxs("p",{children:["The PR is the only report that includes ",e.jsx("code",{children:"Searches_Platform"})," â the count of user-initiated searches conducted at the platform level. This metric cannot appear in the DR, TR, or IR because searches are captured once at the platform level regardless of how many databases are searched simultaneously. It uses the special"," ",e.jsx("code",{children:"Data_Type = Platform"}),", which exists exclusively for this metric."]}),e.jsx("h3",{children:"Metrics available in the PR"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"Searches_Platform"})," â platform-level searches (Data_Type: Platform)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Total_Item_Investigations"})," â all content item views/accesses"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Total_Item_Requests"})," â all full-text downloads/views"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Unique_Item_Investigations"})," â unique items viewed per user session"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Unique_Item_Requests"})," â unique items downloaded per user session"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Unique_Title_Investigations"})," â unique titles viewed per session (Books and Reference_Works only)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Unique_Title_Requests"})," â unique titles downloaded per session (Books and Reference_Works only)"]})]}),e.jsxs("p",{children:["Note: Denial metrics (",e.jsx("code",{children:"No_License"}),", ",e.jsx("code",{children:"Limit_Exceeded"}),") do"," ",e.jsx("strong",{children:"not"})," appear in the PR. They are restricted to the DR, TR, and IR."]}),e.jsx("h3",{children:"Access_Type and Access_Method in the PR"}),e.jsxs("p",{children:["The PR does ",e.jsx("strong",{children:"not"})," include the ",e.jsx("code",{children:"Access_Type"})," attribute (no distinction between Controlled/Open/Free_To_Read at the platform level). It does support"," ",e.jsx("code",{children:"Access_Method"})," (Regular vs TDM), allowing platforms to separate text-mining traffic from normal usage."]}),e.jsx("h3",{children:"Standard Views of the PR"}),e.jsx("p",{children:"There is a single Standard View:"}),e.jsx("ul",{children:e.jsxs("li",{children:[e.jsx("strong",{children:"PR_P1"}),": Filters to ",e.jsx("code",{children:"Access_Method = Regular"})," only. Reports all Data_Types except the platform-level one, plus Searches_Platform. This is the view most used for cross-platform comparisons."]})}),e.jsx("h2",{children:"Database Report (DR)"}),e.jsx("h3",{children:"What it measures"}),e.jsx("p",{children:'The DR reports usage broken down by database. In COUNTER terms, a "database" is a named collection or aggregated resource â not necessarily a relational database. This could be a journal package (e.g. "Science Direct Journals"), an eBook collection, an A&I database like PsycINFO, or a multimedia collection.'}),e.jsxs("p",{children:["The DR is required for Host_Types:"," ",e.jsx("code",{children:"A&I_Database"}),", ",e.jsx("code",{children:"Aggregated_Full_Content"}),","," ",e.jsx("code",{children:"Discovery_Service"}),", ",e.jsx("code",{children:"eBook_Collection"}),","," ",e.jsx("code",{children:"Full_Content_Database"}),", and ",e.jsx("code",{children:"Multimedia_Collection"}),"."]}),e.jsx("h3",{children:"Database-specific Data_Types"}),e.jsxs("p",{children:["The DR introduces three Data_Types that exist ",e.jsx("strong",{children:"only"})," in the DR and apply exclusively to Search and Denial metrics (never to Investigations or Requests, which are always reported at title or item level):"]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"Database_Aggregated"})," â for activity within an aggregated full-text database (e.g. EBSCOhost). Used only for Searches_Regular, Searches_Automated, Searches_Federated, No_License, and Limit_Exceeded."]}),e.jsxs("li",{children:[e.jsx("code",{children:"Database_AI"})," â for activity within an A&I or discovery service database. Same metric restriction applies."]}),e.jsxs("li",{children:[e.jsx("code",{children:"Database_Full"})," â for non-title-aggregated content databases (e.g. Cochrane). Same restriction."]})]}),e.jsxs("blockquote",{children:["Critical distinction: Investigation and Request metrics in the DR must use the"," ",e.jsx("em",{children:"actual"})," content Data_Type (Journal, Book, Article, etc.), not a Database_* Data_Type. A Database_Aggregated row can only carry search and denial counts."]}),e.jsx("h3",{children:"Search metrics in the DR"}),e.jsx("p",{children:"Unlike the PR (which only knows about platform-wide searches), the DR tracks three types of database-level searches:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"Searches_Regular"}),": User-initiated search against a single database, or a multi-database search where the user chooses which databases to include."]}),e.jsxs("li",{children:[e.jsx("code",{children:"Searches_Automated"}),": Multi-database searches where the user has no choice of which databases are searched (e.g. a discovery layer that always searches everything)."]}),e.jsxs("li",{children:[e.jsx("code",{children:"Searches_Federated"}),": Searches performed remotely by a federated search engine via client-server technology."]})]}),e.jsx("p",{children:"These three metrics do not appear in the PR (collapsed into Searches_Platform there) and do not appear in the TR or IR at all."}),e.jsx("h3",{children:"No Access_Type in the DR"}),e.jsxs("p",{children:["The DR does ",e.jsx("strong",{children:"not"})," include the ",e.jsx("code",{children:"Access_Type"})," attribute â unlike the TR and IR which can distinguish between Controlled, Open, and Free_To_Read content. This is by design: database-level reporting is inherently coarser and cannot reliably attribute access type at the database level for mixed collections."]}),e.jsx("h3",{children:"Standard Views of the DR"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"DR_D1"}),": Regular searches and content requests at database level."," ","Metrics: ",e.jsx("code",{children:"Searches_Automated"}),", ",e.jsx("code",{children:"Searches_Federated"}),","," ",e.jsx("code",{children:"Searches_Regular"}),", ",e.jsx("code",{children:"Total_Item_Investigations"}),","," ",e.jsx("code",{children:"Total_Item_Requests"}
20),". Access_Method = Regular."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DR_D2"}),": Access denials at database level. Metrics:"," ",e.jsx("code",{children:"No_License"}),", ",e.jsx("code",{children:"Limit_Exceeded"}),". Access_Method = Regular."]})]}),e.jsx("h2",{children:"Title Report (TR)"}),e.jsx("h3",{children:"What it measures"}),e.jsx("p",{children:"The TR is the workhorse of COUNTER compliance for most journal and eBook publishers. It reports usage broken down per title â meaning one row (or group of rows in JSON) per journal or book title, further split by Data_Type, Access_Type, Access_Method, and YOP."}),e.jsxs("p",{children:["The TR is required for Host_Types: ",e.jsx("code",{children:"A&I_Database"}),","," ",e.jsx("code",{children:"Aggregated_Full_Content"}),", ",e.jsx("code",{children:"Discovery_Service"}),", ",e.jsx("code",{children:"eBook"}),","," ",e.jsx("code",{children:"eBook_Collection"}),", ",e.jsx("code",{children:"eJournal"}),"."]}),e.jsx("h3",{children:"Data_Types in the TR"}),e.jsx("p",{children:"The TR covers titled works. Valid Data_Types in the TR are:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"Book"})," â monographs, edited volumes, textbooks"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Reference_Work"})," â encyclopedias, dictionaries"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Journal"})," â serials with continually growing article collections"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Conference"})," â collections of conference papers (new in R5.1)"]}),e.jsx("li",{children:e.jsx("code",{children:"Newspaper_or_Newsletter"})}),e.jsxs("li",{children:[e.jsx("code",{children:"Patent"}),", ",e.jsx("code",{children:"Report"}),", ",e.jsx("code",{children:"Standard"}),","," ",e.jsx("code",{children:"Thesis_or_Dissertation"}),", ",e.jsx("code",{children:"Other"}),", ",e.jsx("code",{children:"Unspecified"})]})]}),e.jsxs("p",{children:["Notably absent: ",e.jsx("code",{children:"Article"})," and ",e.jsx("code",{children:"Book_Segment"})," do not appear in the TR. They are item-level Data_Types and belong in the IR."]}),e.jsx("h3",{children:"The three Access_Types"}),e.jsxs("p",{children:["The TR is where ",e.jsx("code",{children:"Access_Type"})," first becomes mandatory. Every row must be attributed to one of:"]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"Controlled"}),": Content restricted to authorized (paying) users on this platform."]}),e.jsxs("li",{children:[e.jsx("code",{children:"Open"}),": Content freely available under an open access model, intended to remain open permanently."]}),e.jsxs("li",{children:[e.jsx("code",{children:"Free_To_Read"}),": Freely available at time of access, but not necessarily Open (may have been or may become paywalled â e.g. promotional access, archival freemium)."]})]}),e.jsxs("p",{children:["This is a significant R5.1 change from R5: the old ",e.jsx("code",{children:"OA_Gold"})," and"," ",e.jsx("code",{children:"Other_Free_To_Read"})," values have been replaced with the clearer"," ","Controlled/Open/Free_To_Read taxonomy."]}),e.jsx("h3",{children:"YOP: Year of Publication"}),e.jsxs("p",{children:["The TR (and IR) require tracking by ",e.jsx("strong",{children:"Year of Publication (YOP)"}),". This enables libraries to analyze the age of the content they are using â crucial for subscription negotiations. Special values:"]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"9999"})," â articles in press (not yet assigned to an issue)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"0001"})," â year of publication unknown"]})]}),e.jsx("p",{children:"YOP does not appear in the PR or DR."}),e.jsx("h3",{children:"Unique_Title metrics: books-specific"}),e.jsxs("p",{children:["The TR is where ",e.jsx("code",{children:"Unique_Title_Investigations"})," and"," ",e.jsx("code",{children:"Unique_Title_Requests"})," are most important. These metrics count how many unique"," ",e.jsx("em",{children:"titles"})," (not chapters or segments) were accessed per user session. They are only meaningful for ",e.jsx("code",{children:"Book"})," and ",e.jsx("code",{children:"Reference_Work"})," Data_Types and must not be used for other types."]}),e.jsx("p",{children:"These metrics remain stable across R5 and R5.1 (unlike item-level book metrics which changed significantly), making them the recommended basis for R5-to-R5.1 trend comparisons."}),e.jsx("h3",{children:"Section_Type has been removed"}),e.jsxs("p",{children:["R5 had a ",e.jsx("code",{children:"Section_Type"})," attribute in the TR (Article, Book, Chapter, Section, Other). This has been completely removed in R5.1. The granularity it provided has been moved to the IR via Data_Type (Article, Book_Segment, Reference_Item, etc.)."]}),e.jsx("h3",{children:"Standard Views of the TR"}),e.jsx("p",{children:"The TR has four Standard Views, split by content type and metric type:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"TR_B1"})," (Book Requests, Controlled access): Data_Type = Book or Reference_Work, Access_Type = Controlled only. Metrics:"," ",e.jsx("code",{children:"Total_Item_Requests"}),", ",e.jsx("code",{children:"Unique_Title_Requests"}),". No YOP column. This is the primary KPI view for eBook publishers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_B2"})," (Book Access Denied): Data_Type = Book or Reference_Work. Metrics:"," ",e.jsx("code",{children:"No_License"}),", ",e.jsx("code",{children:"Limit_Exceeded"}),". Shows where library users are being turned away."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_B3"})," (Book Usage by Access Type): The most complete book view. All Access_Types. Metrics: all six Investigation/Request types including both Unique_Item and Unique_Title variants. With YOP."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J1"})," (Journal Requests, Controlled access): Data_Type = Journal, Access_Type = Controlled only. Metrics: ",e.jsx("code",{children:"Total_Item_Requests"}),","," ",e.jsx("code",{children:"Unique_Item_Requests"}),". The standard view most used by libraries for journal cost-per-use analysis. Note: Open and Free_To_Read usage is intentionally excluded here."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J2"}
vendor: 5,496 bytes, line 20
20)," (Journal Access Denied): Data_Type = Journal. Metrics:"," ",e.jsx("code",{children:"No_License"}),", ",e.jsx("code",{children:"Limit_Exceeded"}),". Useful for identifying high-demand content not yet licensed."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J3"})," (Journal Usage by Access Type): All Access_Types. Full set of Investigation and Request metrics. With YOP."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J4"})," (Journal Requests by YOP, Controlled): Like TR_J1 but with YOP breakdown. Controlled access only. Enables libraries to evaluate the value of back-file vs. current content."]})]}),e.jsx("blockquote",{children:"Library procurement teams rely on TR_J1 and TR_B1 for cost-per-use calculations. If your platform reports TDM or Open access usage in these views, your numbers will be inflated and libraries will challenge them. The Access_Type filter in these Standard Views is not cosmetic â it is the mechanism that keeps the data clean."}),e.jsx("h2",{children:"Item Report (IR)"}),e.jsx("h3",{children:"What it measures"}),e.jsx("p",{children:'The IR is the most granular COUNTER report. It tracks usage at the level of individual content items: a specific article, a specific book chapter, a specific podcast episode, a specific dataset file. Where the TR says "Journal X received 452 requests this month", the IR says "Article DOI:10.xxxx/yyy was requested 12 times".'}),e.jsxs("p",{children:["The IR is required for Host_Types that are fundamentally item-oriented:"," ",e.jsx("code",{children:"Data_Repository"}),", ",e.jsx("code",{children:"Repository"}),","," ",e.jsx("code",{children:"Scholarly_Collaboration_Network"}),". It is optional but recommended for eJournal and eBook platforms that can provide it."]}),e.jsx("h3",{children:"Item-level Data_Types"}),e.jsx("p",{children:"The IR uses item-level Data_Types that do not appear in the TR:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"Article"})," â journal articles (Parent_Data_Type: Journal)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Book_Segment"})," â book chapters, sections, ToC entries, or a whole book where segments cannot be individually identified (Parent_Data_Type: Book)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Conference_Item"})," â a single conference paper or poster (Parent_Data_Type: Conference)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Dataset"}),", ",e.jsx("code",{children:"Software"}),", ",e.jsx("code",{children:"Thesis_or_Dissertation"})," â repository content types"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Audiovisual"}),", ",e.jsx("code",{children:"Image"}),", ",e.jsx("code",{children:"Sound"}),","," ",e.jsx("code",{children:"Interactive_Resource"}),", ",e.jsx("code",{children:"Multimedia"})," â granular multimedia types (new or refined in R5.1)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Database_Full_Item"})," â items from a full-content database where no more specific Data_Type applies (Parent_Data_Type: Database_Full)"]})]}),e.jsx("h3",{children:"Parent_Data_Type: linking items to titles"}),e.jsxs("p",{children:["A key IR attribute is ",e.jsx("code",{children:"Parent_Data_Type"})," â it links each item to its parent work. An article links to its parent journal; a chapter links to its parent book. This allows the IR to serve as the foundation from which TR-level data can theoretically be reconstructed by aggregation."]}),e.jsx("p",{children:"When providing the IR, publishers should also include the parent's title, publisher, identifiers (ISSN, ISBN, DOI), and platform, making the IR self-contained for downstream analysis."}),e.jsx("h3",{children:"The R5.1 change to book counting"}),e.jsx("p",{children:"R5.1 fundamentally changed how books are counted in the IR. In R5, a whole-book download counted as a single item regardless of chapter structure. In R5.1:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Each ",e.jsx("code",{children:"Book_Segment"})," accessed must generate a separate"," ",e.jsx("code",{children:"Unique_Item_Investigation"})," or ",e.jsx("code",{children:"Unique_Item_Request"}),"."]}),e.jsx("li",{children:"If a user downloads the whole book as a single file and individual chapters can be identified, each chapter counts as one Book_Segment."}),e.jsx("li",{children:"If chapters cannot be identified, the whole book counts as one Book_Segment."})]}),e.jsxs("p",{children:["This means R5.1 IR data for books will show higher Unique_Item numbers than R5 data for the same content. This is intentional and by design â use"," ",e.jsx("code",{children:"Unique_Title_Requests"})," in the TR for cross-release comparisons."]}),e.jsx("h3",{children:"Component details"}),e.jsxs("p",{children:["The IR is the only report that supports ",e.jsx("strong",{children:"component-level"})," usage tracking via the ",e.jsx("code",{children:"Include_Component_Details"})," attribute. Components are sub-items: supplementary materials, figures, tables, or other attachments to a main item. This is optional and relatively rare, but the IR is the only place in COUNTER where this level of granularity can be expressed."]}),e.jsx("h3",{children:"Standard Views of the IR"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"IR_A1"})," (Journal Article Requests): Data_Type = Article, Access_Method = Regular. Metrics: ",e.jsx("code",{children:"Total_Item_Requests"}),", ",e.jsx("code",{children:"Unique_Item_Requests"}
20),". Access_Type included (Controlled and Open). This is the primary view for repositories and publishers that provide article-level data."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"IR_M1"})," (Multimedia Item Requests): Data_Type = Audiovisual, Image, Sound, Interactive_Resource, or Multimedia. Metrics: ",e.jsx("code",{children:"Total_Item_Requests"}),". For multimedia platforms only."]})]}),e.jsx("h2",{children:"Side-by-Side Comparison"}),e.jsx("p",{children:"The table below summarises the most important differences across the four report types:"}),e.jsx("div",{className:"overflow-x-auto my-6",children:e.jsxs("table",{className:"w-full text-sm border-collapse border border-gray-200 rounded",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#0a1628] text-white",children:[e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"Attribute"}),e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"PR"}),e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"DR"}),e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"TR"}),e.jsx("th",{className:"px-4 py-3 text-left font-semibold",children:"IR"})]})}),e.jsxs("tbody",{className:"divide-y divide-gray-100",children:[e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Granularity"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Platform-wide"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Per database"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Per title"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Per item"})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Mandatory for"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"All Host_Types"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"A&I, Aggregated, Discovery, eBook_Collection, Full_Content_DB, Multimedia_Collection"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"A&I, Aggregated, Discovery, eBook, eBook_Collection, eJournal"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Data_Repository, Repository, Scholarly_Collaboration_Network"})]}),e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Access_Type"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Not present"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Not present"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Controlled, Open, Free_To_Read"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Controlled, Open, Free_To_Read"})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"YOP"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Not present"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Not present"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Required"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Required"})]}),e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Denial metrics"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Not present"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No_License, Limit_Exceeded"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No_License, Limit_Exceeded"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No_License, Limit_Exceeded"})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Search metrics"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Searches_Platform only"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Searches_Regular, _Automated, _Federated"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"None"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"None"})]}),e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Unique_Title metrics"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Yes (Books only)"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Yes (Books only)"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Yes (Books only)"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Not present"})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Parent_Data_Type"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Yes (e.g. Article â Journal)"})]}),e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Item identifiers (DOI, etc.)"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Title-level only (ISSN, ISBN)"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Full (DOI, proprietary ID, URI)"})]}),e.jsxs("tr",{className:"bg-gray-50",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Component tracking"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"No"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"Yes (optional)"})]}),e.jsxs("tr",{className:"bg-white",children:[e.jsx("td",{className:"px-4 py-3 font-medium text-gray-700",children:"Standard Views"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"PR_P1"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"DR_D1, DR_D2"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"TR_B1, TR_B2, TR_B3, TR_J1, TR_J2, TR_J3, TR_J4"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:"IR_A1, IR_M1"})]})]})]})}),e.jsx("h2",{children:"Which Reports Do You Need?"}),e.jsxs("p",{children:["Your obligations depend on your ",e.jsx("strong",{children:"Host_Type"}),". Here are the most common publisher profiles:"]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"eJourn
20al publisher"})," (e.g. a society publisher running its own platform): Required to provide PR and TR. The IR is optional but strongly recommended for libraries that want article-level download data."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"eBook publisher"}),": Required to provide PR and TR. The DR may also be required if you sell content via collection packages."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Aggregator"})," (e.g. EBSCOhost, ProQuest): Must provide PR, DR, and TR. The IR is required if the platform provides item-level access."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Institutional repository"})," (e.g. DSpace, Figshare): Must provide PR and IR. The TR and DR are not required (repositories do not organize content into titled subscriptions)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Discovery service"}),": Must provide PR and DR. The TR is required if the service provides access to titled full-text content."]})]}),e.jsx("h2",{children:"Common Mistakes"}),e.jsx("h3",{children:"1. Reporting article-level metrics in the TR"}),e.jsx("p",{children:"The TR works at title level. Reporting individual article DOIs or chapter-level data in a TR row is incorrect. That data belongs in the IR. If you do not have an IR, title-level metrics in the TR should be the aggregate of all item-level activity for that title."}),e.jsx("h3",{children:"2. Using Database_Aggregated Data_Type for Investigation counts"}),e.jsxs("p",{children:[e.jsx("code",{children:"Database_Aggregated"}),", ",e.jsx("code",{children:"Database_AI"}),", and ",e.jsx("code",{children:"Database_Full"}),"are exclusively for Search and Denial metrics. If you put Investigation or Request counts against these Data_Types, the COUNTER Validation Tool will reject the report."]}),e.jsx("h3",{children:"3. Omitting Access_Type from TR and IR"}),e.jsx("p",{children:"In R5.1, every Controlled/Open/Free_To_Read split must be explicit in the TR and IR. If a title has both controlled and open content (e.g. a hybrid journal), you must report usage for each Access_Type as a separate row. Merging them into one row will fail validation."}),e.jsx("h3",{children:"4. Omitting YOP from TR and IR"}),e.jsxs("p",{children:["YOP is mandatory in the TR and IR. Every row must carry a year of publication. This cannot be left blank or set to a generic value. Use ",e.jsx("code",{children:"0001"})," only when the YOP is genuinely unknown."]}),e.jsx("h3",{children:"5. Confusing Searches_Platform with database-level searches"}),e.jsxs("p",{children:[e.jsx("code",{children:"Searches_Platform"})," appears only in the PR and uses"," ",e.jsx("code",{children:"Data_Type = Platform"}),". Database-level searches go in the DR as"," ",e.jsx("code",{children:"Searches_Regular"})," / ",e.jsx("code",{children:"Searches_Automated"})," /"," ",e.jsx("code",{children:"Searches_Federated"}),". These are separate metrics in separate reports â never merge them."]}),e.jsx("h2",{children:"Standard Views vs. Master Reports"}),e.jsx("p",{children:"Every Standard View (TR_J1, TR_B1, IR_A1, etc.) is a pre-filtered subset of its master report (TR, IR). Libraries and their ERM systems often harvest only Standard Views via SUSHI because they are standardised and easier to process. But Standard Views necessarily omit data:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"TR_J1 excludes Open and Free_To_Read usage â only Controlled"}),e.jsx("li",{children:"TR_B1 excludes Open access book usage"}),e.jsx("li",{children:"TR_J4 is TR_J1 plus YOP â but still Controlled only"}),e.jsx("li",{children:"PR_P1 excludes TDM access"})]}),e.jsx("p",{children:"For a complete picture of platform usage, always provide access to the full master reports (PR, DR, TR, IR) via SUSHI, even if libraries mostly harvest the Standard Views. Some sophisticated library consortia and analytics platforms will harvest the master reports directly."}),e.jsx("h2",{children:"Practical Implementation Notes"}),e.jsx("p",{children:"For publishers implementing COUNTER compliance from scratch or migrating from R5:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Start with the TR"})," if you are a journal or eBook publisher. It is the hardest to get right (Access_Type splits, YOP tracking, double-click filtering) and is the report auditors scrutinize most carefully."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Build the PR from your TR data"}),". Platform totals should be the sum of title-level totals â any discrepancy between your PR and TR will be flagged in an audit."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Add the IR incrementally"}),". Start with IR_A1 (article requests) if you publish journals. This is increasingly requested by library customers for article-level analytics."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Use the COUNTER Validator"})," (validator.countermetrics.org) throughout development. It will flag missing YOP, incorrect Access_Type combinations, wrong Data_Types in the wrong report, and many other issues before they become audit failures."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Test each report type and each Standard View"})," independently against the validator. A valid TR master report does not guarantee valid TR_J1 â Standard View filters may expose issues not visible in the full dataset."]})]}),e.jsx("h2",{children:"Conclusion"}),e.jsx("p",{children:"The PR, DR, TR, and IR are not interchangeable â each represents a distinct level of the content hierarchy and carries different metrics, attributes, and compliance obligations. The PR gives a platform-wide aggregate; the DR adds database context and search metrics; the TR delivers the title-level detail most used by libraries for subscriptions and renewals; the IR goes all the way to individual items, enabling article-level analytics."}),e.jsx("p",{children:"Getting the boundaries between these reports right â which Data_Types belong where, which metrics can appear in which report, and how Access_Type and YOP apply â is the foundation of correct COUNTER R5.1 implementation. Errors at this layer will cascade through every Standard View and every SUSHI response you deliver to library customers."}),e.jsxs("p",{children:["If you are building your COUNTER implementation from the ground up,"," ",e.jsx("a",{href:"/whitepaper-code-of-practice",className:"text-blue-600 hover:underline",children:"our complete implementation guide"})," ","covers every report type in full detail, including worked examples and SUSHI payload structures. And if you want to skip the complexity entirely,"," ",e.jsx("a",{href:"/#waitlist",className:"text-blue-600 hover:underline",children:"usagemetrics.ai automates the whole pipeline"}),"."]})]})}const Yi={title:"Counting Usage for Tables of Contents",subtitle:"How ToC views are counted â and why they don't trigger chapter usage metrics",description:"Release 5.1 brought usage tracking for books and reference works into line with other data types, but Tables of Contents still have specific rules. This article explains exactly how ToC views should be counted and what metrics publishers must report.",category:"article",readTime:"5 min",date:"December 2024",tags:["COUNTER R5.1","Books","Tables of Contents","Book_Segment","Usage Metrics"],seoTitle:"Counting Usage for Tables of Contents under COUNTER R5.1 | usagemetrics.ai",seoDescription:"How should publishers count Table of Contents views under COUNTER R5.1? This guide explains the Book_Segment rules, worked examples, and the metrics that apply when users navigate from a ToC.",canonical:"/article-counter-toc-usage"};function zt(){return e.jsxs(te,{meta:Yi,children:[e.jsx("p",{children:"Release 5.1 brought usage tracking for books and reference works into line with that for other data types like journals and multimedia, but there are still some complexities. This post explains how usage of Tables of Contents (ToCs) should be counted."}),e.jsxs("blockquote",{children:[e.jsx("strong",{children:"Important:"})," Only ToCs for ",e.jsx("strong",{children:"books and reference works"})," can accrue usage metrics under the terms of Release 5.1. Viewing a journal issue's table of contents, for instance, does not generate any countable usage."]}),e.jsx("h2",{children:"Why ToC Views Don't Trigger Usage Counts for Chapters"}),e.jsxs("p",{children:["Under Release 5.1, most metrics are only counted when a user interacts with an ",e.jsx("strong",{children:"Item"})," â in the case of a book, that's the chapter (",e.jsx("code",{children:"Data_Type=Book_Segment"}),"). A ToC counts as a ",e.jsx("code",{children:"Book_Segment"}),": a user landing on the ToC means the publisher may count ",e.jsx("strong",{children:"1 Total_Item_Investigation"})," against the ToC's unique identifier."]}),e.jsx("p",{children:"Simply viewing the ToC does not create usage counts for any of the listed chapters. Chapter-level metrics are only triggered by explicit user actions taken from the ToC, not by the ToC page view itself."}),e.jsx("h2",{children:"What Happens When a User Navigates From the ToC"}),e.jsx("p",{children:"If the user tries to access other chapters from the ToC â for example by clicking on a link â they are either:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Successfully able to access the chapter"})," â count ",e.jsx("strong",{children:"1 Total_Item_Investigation"}),", and possibly ",e.jsx("strong",{children:"1 Total_Item_Request"})," if the chapter is delivered immediately as full-text."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Denied access to the chapter"})," â count ",e.jsx("strong",{children:"1 No_License"})," or ",e.jsx("strong",{children:"Limit_Exceeded"}),", depending on the reason for the denial."]})]}),e.jsx("h3",{children:"Whole-Book Downloads From the ToC"}),e.jsxs("p",{children:["If a user has the option to download the whole book as an EPUB or PDF directly from the ToC, the publisher should ",e.jsx("strong",{children:"only count usage or denials if the user actively clicks the download button"}),". The mere availability of the download link on the ToC page is not sufficient to trigger a metric."]}),e.jsx("h2",{children:"A Worked Example"}),e.jsxs("p",{children:["A user lands on the ToC for a book with ",e.jsx("strong",{children:"10 book segments"}),". A whole-book download is also available. The sequence of events:"]}),e.jsxs("ol",{children:[e.jsxs("li",{children:["User views the ToC page (ToC = ",e.jsx("code",{children:"Book_Segment"})," #1)."]}),e.jsxs("li",{children:["User clicks through to the ",e.jsx("strong",{children:"Foreword"}),", which is free to read (",e.jsx("code",{children:"Book_Segment"})," #2)."]}),e.jsxs("li",{children:["User returns to the ToC (second view of ",e.jsx("code",{children:"Book_Segment"})," #1)."]}),e.jsx("li",{children:"User attempts to download the whole book EPUB but is denied â their institution does not subscribe."})]}),e.jsx("p",{children:"The correct metric counts are:"}),e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Count"}),e.jsx("th",{children:"Reason"})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"Total_Item_Investigations"})}),e.jsx("td",{children:e.jsx("strong",{children:"3"})}),e.jsx("td",{children:"2 visits to the ToC + 1 visit to the Foreword"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"Unique_Item_Investigations"})}),e.jsx("td",{children:e.jsx("strong",{children:"2"})}),e.jsx("td",{children:"ToC and Foreword are 2 distinct items"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"Total_Item_Requests"})}),e.jsx("td",{children:e.jsx("strong",{children:"1"})}),e.jsx("td",{children:"Foreword delivered as full-text"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"Unique_Item_Requests"})}),e.jsx("td",{children:e.jsx("strong",{children:"1"})}),e.jsx("td",{children:"Only the Foreword was successfully delivered"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"No_License"})}),e.jsx("td",{children:e.jsx("strong",{children:"9"})}),e.jsx("td",{children:"User denied access to the 9 remaining book segments (via the whole-book EPUB download)"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"Unique_Title_Investigations"})}),e.jsx("td",{children:e.jsx("strong",{children:"1"})}),e.jsx("td",{children:"All segments belong to a single title"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("code",{children:"Unique_Title_Requests"})}),e.jsx("td",{children:e.jsx("strong",{children:"1"})}),e.jsx("td",{children:"At least one segment was successfully delivered"})]})]})]}),e.jsx("h2",{children:"Key Rules to Remember"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["ToC usage counting only applies to ",e.jsx("strong",{children:"books and reference works"}),", not journals or other data types."]}),e.jsxs("li",{children:["The ToC itself is a ",e.jsx("code",{children:"Book_Segment"})," â landing on it counts as ",e.jsx("strong",{children:"1 Total_Item_Investigation"})," against the ToC's unique identifier."]}),e.jsxs("li",{children:["Viewing the ToC does ",e.jsx("strong",{children:"not"})," count any metrics for the individual chapters listed within it."]}),e.jsxs("li",{children:["Chapter-level metrics only accrue when a user ",e.jsx("strong",{children:"actively navigates to or downloads"})," a chapter."]}),e.jsxs("li",{children:["For whole-book downloads available from the ToC, only count metrics if the user ",e.jsx("strong",{children:"actively clicks the download button"}),"."]}),e.jsxs("li",{children:["A denied whole-book download triggers a ",e.jsx("code",{children:"No_License"})," (or ",e.jsx("code",{children:"Limit_Exceeded"}),") for each segment in the book, not just one."]})]}),e.jsx("h2",{children:"Why This Matters for COUNTER Compliance"}),e.jsx("p",{children:"Mishandling ToC metrics is one of the more frequent causes of audit findings for book publishers. Over-counting â by attributing chapter-level investigations to every ToC view â inflates Total_Item_Investigation figures and will immediately flag during an audit. Under-counting â by ignoring the ToC as a Book_Segment â produces incomplete data."}),e.jsx("p",{children:"The correct implementation requires your analytics pipeline to:"}),e.jsxs("ol",{children:[e.jsxs("li",{children:["Identify the ToC page as a distinct ",e.jsx("code",{children:"Book_Segment"})," with its own persistent identifier."]}),e.jsx("li",{children:"Track user click events on chapter links separately from page load events."}),e.jsx("li",{children:"Correctly attribute access denials to each underlying segment when a bundled download is rejected."})]}),e.jsx("p",{children:"Automated COUNTER compliance platforms â like usagemetrics.ai â handle these rules programmatically, eliminating the risk of manual mis-classification and providing audit-ready reports from day one."})]})}function Gi(){return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsxs("section",{className:"relative overflow-hidden bg-background py-20 md:py-32",children:[e.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 right-1/4 w-96 h-96 bg-primary/10 rounded-full blur-3xl -translate-y-1/2 translate-x-1/2 opacity-50"}),e.jsx("div",{className:"absolute bottom-0 left-1/4 w-[500px] h-[500px] bg-secondary/10 rounded-full blur-3xl translate-y-1/3 -translate-x-1/3 opacity-30"})]}),e.jsx("div",{className:"container mx-auto px-6 relative z-10",children:e.jsx(h,{children:e.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[e.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-foreground mb-6",children:["Why ",e.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-primary to-blue-600",children:"Compliance"})," Matters"]}),e.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"COUNTER 5.1 isn't just a standardâit's the foundation of trust between libraries and publishers. Discover how compl
20iant reporting drives better decisions and stronger partnerships."}),e.jsx("div",{className:"flex justify-center gap-4",children:e.jsxs(v,{to:"/#waitlist",className:"px-6 py-3 bg-primary text-primary-foreground rounded-md font-medium hover:bg-primary/90 transition-colors flex items-center gap-2",children:["Get Started ",e.jsx(W,{className:"w-4 h-4"})]})})]})})})]}),e.jsx("section",{className:"py-16 bg-muted/30 border-y border-border",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsx(h,{children:e.jsxs("div",{className:"max-w-4xl mx-auto flex flex-col md:flex-row gap-12 items-center",children:[e.jsxs("div",{className:"md:w-1/2",children:[e.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",children:"What is COUNTER?"}),e.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:"The Project COUNTER standard ensures that usage statistics for electronic resources are consistent, comparable, and credible."}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Without it, every publisher would report data differently, making it impossible for libraries to understand the true value of their subscriptions."})]}),e.jsxs("div",{className:"md:w-1/2 grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-card border border-border p-6 rounded-lg text-center",children:[e.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx(mt,{className:"w-5 h-5 text-primary"})}),e.jsx("h3",{className:"font-semibold text-foreground",children:"Consistent"})]}),e.jsxs("div",{className:"bg-card border border-border p-6 rounded-lg text-center",children:[e.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx(be,{className:"w-5 h-5 text-primary"})}),e.jsx("h3",{className:"font-semibold text-foreground",children:"Credible"})]}),e.jsxs("div",{className:"bg-card border border-border p-6 rounded-lg text-center col-span-2",children:[e.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx(ir,{className:"w-5 h-5 text-primary"})}),e.jsx("h3",{className:"font-semibold text-foreground",children:"Comparable"})]})]})]})})})}),e.jsx("section",{className:"py-20 md:py-32 bg-background",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-16",children:[e.jsx(h,{direction:"left",children:e.jsxs("div",{children:[e.jsx("div",{className:"inline-block px-3 py-1 rounded-full bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400 text-sm font-medium mb-6",children:"For Publishers"}),e.jsx("h2",{className:"text-3xl font-bold text-foreground mb-6",children:"Build Trust & Reduce Friction"}),e.jsxs("ul",{className:"space-y-6",children:[e.jsxs("li",{className:"flex gap-4",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center flex-shrink-0 mt-1",children:e.jsx(O,{className:"w-4 h-4 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Library Trust"}),e.jsx("p",{className:"text-muted-foreground",children:"Libraries prioritize content from publishers who provide transparent, standardized usage data."})]})]}),e.jsxs("li",{className:"flex gap-4",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center flex-shrink-0 mt-1",children:e.jsx(O,{className:"w-4 h-4 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Streamlined Renewals"}),e.jsx("p",{className:"text-muted-foreground",children:"When librarians have the data they need, subscription renewals happen faster and with less back-and-forth."})]})]}),e.jsxs("li",{className:"flex gap-4",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center flex-shrink-0 mt-1",children:e.jsx(O,{className:"w-4 h-4 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Competitive Advantage"}),e.jsx("p",{className:"text-muted-foreground",children:"Stand out against competitors who lack compliant reporting or have unreliable data delivery."})]})]})]})]})}),e.jsx(h,{direction:"right",children:e.jsxs("div",{children:[e.jsx("div",{className:"inline-block px-3 py-1 rounded-full bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-400 text-sm font-medium mb-6",children:"For Libraries"}),e.jsx("h2",{className:"text-3xl font-bold text-foreground mb-6",children:"Maximize ROI & Decisions"}),e.jsxs("ul",{className:"space-y-6",children:[e.jsxs("li",{className:"flex gap-4",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center flex-shrink-0 mt-1",children:e.jsx(O,{className:"w-4 h-4 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Accurate Cost-Per-Use"}),e.jsx("p",{className:"text-muted-foreground",children:"Calculate the true value of your subscriptions by comparing usage against cost with standardized metrics."})]})]}),e.jsxs("li",{className:"flex gap-4",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center flex-shrink-0 mt-1",children:e.jsx(O,{className:"w-4 h-4 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Automated Harvesting"}),e.jsx("p",{className:"text-muted-foreground",children:"Stop downloading spreadsheets manually. Use SUSHI to automatically pull data into your library management system."})]})]}),e.jsxs("li",{className:"flex gap-4",children:[e.jsx("div",{className:"w-6 h-6 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center flex-shrink-0 mt-1",children:e.jsx(O,{className:"w-4 h-4 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"Apples-to-Apples Comparison"}),e.jsx("p",{className:"text-muted-foreground",children:"Compare usage across different platforms and publishers without needing to normalize data yourself."})]})]})]})]})})]})})}),e.jsx("section",{className:"py-20 bg-muted/30 border-t border-border",children:e.jsx("div",{className:"container mx-auto px-6 text-center",children:e.jsxs(h,{children:[e.jsx("h2",{className:"text-3xl font-bold text-foreground mb-6",children:"Ready to simplify compliance?"}),e.jsx("p",{className:"text-lg text-muted-foreground mb-8 max-w-2xl mx-auto",children:"Join the usagemetrics.ai pilot program today and see how easy automated COUNTER reporting can be."}),e.jsx(v,{to:"/#pilot",className:"inline-flex px-8 py-4 bg-primary text-primary-foreground rounded-md font-medium hover:bg-primary/90 transition-colors",children:"Apply for Pilot Program"})]})})})]}),e.jsx(H,{})]})}const ba=[{title:"COUNTER R5.1 Compliance",rows:[{feature:"COUNTER R5.1 certified",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"All 4 COUNTER Reports (PR / DR / TR / IR)",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"All Standard Views (TR_J1âJ4, TR_B1âB3, IR_A1â¦)",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"partial"},{feature:"Item Report (IR) with book-segment granularity",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"Global Item Report for open access",usagemetrics:"yes",scholarlyiq:"no",liblynx:"partial"},{feature:"Automated pre-audit validation (COUNTER Validator)",usagemetrics:"yes",scholarlyiq:"no",liblynx:"no"},{feature:"COUNTER audit support included",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"}]},{title:"SUSHI / COUNTER API",rows:[{feature:"COUNTER API R5.1 endpoints (/r51/â¦)",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"API key + Customer_ID authentication (no IP auth)",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"Consortium /members endpoint",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"Standardised exception codes (3030, 3031, 2000â¦)",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"Public /status endpoint (no auth required)",usagemetrics:"yes",scholarlyiq:"no",liblynx:"yes"}]},{title:"Data Processing & Quality",rows:[{feature:"Double-click filtering (30-second window)",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"COUNTER robot exclusion list (auto-updated)",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"AI / LLM traffic detection & exclusion",usagemetrics:"yes",scholarlyiq:"no",liblynx:"no"},{feature:"Session-based unique counting (surrogate session IDs)",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"TDM (Text & Data Mining) traffic isolation",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"partial"},{feature:"Automated abnormal-spike detection",usagemetrics:"yes",scholarlyiq:"no",liblynx:"no"},{feature:"Data restatement workflow",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"partial"}]},{title:"Report Delivery & Access",rows:[{feature:"JSON report delivery",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"Tabular (Excel / TSV) delivery",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"Branded library-facing portal",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"Embeddable COUNTER widget",usagemetrics:"yes",scholarlyiq:"no",liblynx:"yes"},{feature:"Real-time / on-demand report generation",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"24+ months historical data",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"Multi-platform aggregation",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"partial"}]}
20,{title:"Open Access & Consortia",rows:[{feature:"Open / Free_To_Read Access_Type distinction",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"Subscribe-to-open model support",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"Consortium usage reporting",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"OA usage attributed to library consortia",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"}]},{title:"Integration & Setup",rows:[{feature:"Self-service onboarding",usagemetrics:"yes",scholarlyiq:"no",liblynx:"partial"},{feature:"Lightweight tracking script (browser-side)",usagemetrics:"yes",scholarlyiq:"no",liblynx:"yes"},{feature:"Server-side event ingestion API",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"},{feature:"Open-source components",usagemetrics:"yes",scholarlyiq:"no",liblynx:"no"},{feature:"Usage-based / transparent pricing",usagemetrics:"yes",scholarlyiq:"no",liblynx:"partial"},{feature:"Enterprise managed-service option",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"yes"}]},{title:"Analytics & Intelligence",rows:[{feature:"Publisher-facing analytics dashboard",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"partial"},{feature:"Article-level performance insights",usagemetrics:"yes",scholarlyiq:"yes",liblynx:"partial"},{feature:"AI-powered usage anomaly detection",usagemetrics:"yes",scholarlyiq:"no",liblynx:"no"},{feature:"Custom metrics alongside COUNTER",usagemetrics:"yes",scholarlyiq:"partial",liblynx:"yes"},{feature:"Business intelligence / BI tool integration",usagemetrics:"partial",scholarlyiq:"yes",liblynx:"no"}]}],Ke=({value:t,highlight:a=!1})=>{const s="flex items-center justify-center py-3 px-4";return t==="yes"?e.jsx("div",{className:`${s} ${a?"bg-blue-50":""}`,children:e.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center ${a?"bg-blue-600":"bg-emerald-100"}`,children:e.jsx(Ce,{className:`w-3.5 h-3.5 ${a?"text-white":"text-emerald-600"}`,strokeWidth:2.5})})}):t==="no"?e.jsx("div",{className:s,children:e.jsx("div",{className:"w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center",children:e.jsx(ee,{className:"w-3.5 h-3.5 text-gray-400",strokeWidth:2.5})})}):t==="partial"?e.jsx("div",{className:s,children:e.jsx("div",{className:"w-6 h-6 rounded-full bg-amber-50 flex items-center justify-center",children:e.jsx(qs,{className:"w-3.5 h-3.5 text-amber-500",strokeWidth:2.5})})}):e.jsx("div",{className:`${s} ${a?"bg-blue-50":""}`,children:e.jsx("span",{className:`text-xs font-medium ${a?"text-blue-700":"text-gray-500"}`,children:t})})},Qe=t=>{let a=0,s=0,i=0;return ba.forEach(r=>r.rows.forEach(n=>{i++,n[t]==="yes"?a++:n[t]==="partial"&&s++})),{yes:a,partial:s,total:i}};function Ki(){const t=fe(),a={usagemetrics:Qe("usagemetrics"),scholarlyiq:Qe("scholarlyiq"),liblynx:Qe("liblynx")};return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsx("section",{className:"bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 py-16 max-w-5xl",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"text-xs font-bold tracking-widest uppercase text-blue-600",children:"Comparison"}),e.jsx(Ds,{className:"w-3 h-3 text-blue-400"}),e.jsx("span",{className:"text-xs text-gray-400",children:"COUNTER Compliance Features"})]}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-black text-[#0a1628] leading-tight mb-4",children:["usagemetrics.ai vs ",e.jsx("span",{className:"text-blue-600",children:"Scholarly iQ"})," & ",e.jsx("span",{className:"text-blue-600",children:"LibLynx"})]}),e.jsx("p",{className:"text-lg text-gray-600 max-w-2xl leading-relaxed mb-8",children:"A transparent, feature-by-feature comparison of COUNTER R5.1 compliance capabilities â from SUSHI API coverage and data processing rules to open access reporting, audit support, and AI traffic detection."}),e.jsxs("div",{className:"flex flex-wrap items-center gap-5 text-sm text-gray-500",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-emerald-100 flex items-center justify-center",children:e.jsx(Ce,{className:"w-3 h-3 text-emerald-600",strokeWidth:2.5})}),e.jsx("span",{children:"Full support"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-amber-50 flex items-center justify-center",children:e.jsx(qs,{className:"w-3 h-3 text-amber-500",strokeWidth:2.5})}),e.jsx("span",{children:"Partial / add-on"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-gray-100 flex items-center justify-center",children:e.jsx(ee,{className:"w-3 h-3 text-gray-400",strokeWidth:2.5})}),e.jsx("span",{children:"Not available"})]})]})]})}),e.jsx("section",{className:"bg-white border-b border-gray-100",children:e.jsx("div",{className:"container mx-auto px-6 py-10 max-w-5xl",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"rounded-2xl border-2 border-blue-600 bg-blue-50/40 p-6 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx("span",{className:"text-[10px] font-bold tracking-widest uppercase bg-blue-600 text-white px-2 py-1 rounded-full",children:"This platform"})}),e.jsx("p",{className:"text-xs font-bold tracking-widest uppercase text-blue-600 mb-1",children:"usagemetrics.ai"}),e.jsxs("p",{className:"text-4xl font-black text-[#0a1628]",children:[a.usagemetrics.yes,e.jsxs("span",{className:"text-lg font-semibold text-gray-400",children:["/",a.usagemetrics.total]})]}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"features fully supported"}),e.jsx("div",{className:"mt-4 h-2 rounded-full bg-blue-100 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-blue-600",style:{width:`${a.usagemetrics.yes/a.usagemetrics.total*100}%`}})}),e.jsxs("p",{className:"text-xs text-blue-600 font-semibold mt-1",children:[Math.round(a.usagemetrics.yes/a.usagemetrics.total*100),"% full coverage"]})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-gray-50/50 p-6",children:[e.jsx("p",{className:"text-xs font-bold tracking-widest uppercase text-gray-500 mb-1",children:"Scholarly iQ"}),e.jsxs("p",{className:"text-4xl font-black text-[#0a1628]",children:[a.scholarlyiq.yes,e.jsxs("span",{className:"text-lg font-semibold text-gray-400",children:["/",a.scholarlyiq.total]})]}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"features fully supported"}),e.jsx("div",{className:"mt-4 h-2 rounded-full bg-gray-200 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gray-500",style:{width:`${a.scholarlyiq.yes/a.scholarlyiq.total*100}%`}})}),e.jsxs("p",{className:"text-xs text-gray-500 font-semibold mt-1",children:[Math.round(a.scholarlyiq.yes/a.scholarlyiq.total*100),"% full coverage"]})]}),e.jsxs("div",{className:"rounded-2xl border border-gray-200 bg-gray-50/50 p-6",children:[e.jsx("p",{className:"text-xs font-bold tracking-widest uppercase text-gray-500 mb-1",children:"LibLynx"}),e.jsxs("p",{className:"text-4xl font-black text-[#0a1628]",children:[a.liblynx.yes,e.jsxs("span",{className:"text-lg font-semibold text-gray-400",children:["/",a.liblynx.total]})]}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"features fully supported"}),e.jsx("div",{className:"mt-4 h-2 rounded-full bg-gray-200 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-gray-500",style:{width:`${a.liblynx.yes/a.liblynx.total*100}%`}})}),e.jsxs("p",{className:"text-xs text-gray-500 font-semibold mt-1",children:[Math.round(a.liblynx.yes/a.liblynx.total*100),"% full coverage"]})]})]})})}),e.jsx("section",{className:"py-12",children:e.jsx("div",{className:"container mx-auto px-4 max-w-5xl",children:ba.map(s=>e.jsxs("div",{className:"mb-10",children:[e.jsxs("div",{className:"grid grid-cols-[1fr_120px_120px_120px] mb-0",children:[e.jsx("div",{className:"py-3 px-4",children:e.jsx("h2",{className:"text-sm font-black tracking-widest uppercase text-[#0a1628]",children:s.title})}),e.jsx("div",{className:"py-3 px-2 text-center bg-blue-50 border-x border-blue-100 rounded-tl-lg rounded-tr-none",children:e.jsx("span",{className:"text-xs font-bold text-blue-700",children:"usagemetrics.ai"})}),e.jsx("div",{className:"py-3 px-2 text-center bg-gray-50 border-r border-gray-100",children:e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"Scholarly iQ"})}),e.jsx("div",{className:"py-3 px-2 text-center bg-gray-50 border-r border-gray-100 rounded-tr-lg",children:e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"LibLynx"})})]}),e.jsx("div",{className:"rounded-xl border border-gray-200 overflow-hidden shadow-sm",children:s.rows.map((i,r)=>e.jsxs("div",{className:`grid grid-cols-[1fr_120px_120px_120px] ${r%2===0?"bg-white":"bg-gray-50/50"} border-b border-gray-100 last:border-0 group hover:bg-blue-50/20 transition-colors`,children:[e.jsx("div",{className:"py-3 px-4 flex items-center",children:e.jsx("span",{className:"text-sm text-gray-700 font-medium",children:i.feature})}),e.jsx(Ke,{value:i.usagemetrics,highlight:!0}),e.jsx(Ke,{value:i.scholarlyiq}),e.jsx(Ke,{value:i.liblynx})]},i.feature))})]},s.title))})}),e.jsx("section",{className:"bg-gradient-to-br from-[#0a1628] to-[#1e3a5f] text-white py-16",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[e.jsx("h2",{className:"text-2xl font-black mb-8 text-center",children:"Where usagemetrics.ai stands apart"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[{icon:"ð¤",title:"AI & LLM traffic detection",body:"The only platform in this comparison that detects and excludes AI-generated and LLM-agent traffic before it distorts your COUNTER metrics â critical as AI tools access academic content at scale."},{icon:"â
",title:"Built-in pre-audit validation",body:"Automated continuous validation against the COUNTER Validator on every report generation cycle â not just before audits. Reports are gated until they pass, eliminating surprise failures."},{icon:"ð",title:"Fully open & transparent",body:"Self-service onboarding, usage-based pricing, and open-source components mean no black-box lock-in. You see exactly how your data is processed and why."}].map(s=>e.jsxs("div",{className:"bg-white/10 rounded-2xl p-6 border border-white/10",children:[e.jsx("div",{className:"text-3xl mb-3",children:s.icon}),e.jsx("h3",{className:"font-bold text-white mb-2",children:s.title}),e.jsx("p",{className:"text-sm text-blue-200/80 leading-relaxed",children:s.body})]},s.title))})]})}),e.jsx("section",{className:"bg-gray-50 border-t border-gray-100 py-8",children:e.jsx("div",{className:"container mx-auto px-6 max-w-5xl",children:e.jsxs("p",{className:"text-xs text-gray-400 leading-relaxed text-center",children:["This comparison is based on publicly available information from Scholarly iQ and LibLynx websites, documentation, and press releases as of March 2025. Feature coverage may vary depending on contract tier, configuration, or product updates. We strive for accuracy â if you spot an error,"," ",e.jsx("a",{href:"mailto:[email protected]",className:"underline hover:text-gray-600",children:"please let us know"}),"."]})})}),e.jsx("section",{className:"bg-white border-t border-gray-100 py-16",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-2xl text-center",children:[e.jsx("h2",{className:"text-3xl font-black text-[#0a1628] mb-4",children:"Ready to see it in action?"}),e.jsx("p",{className:"text-gray-500 mb-8",children:"Book a 30-minute demo and we'll walk through your specific compliance scenario â from SUSHI endpoint setup to your next audit."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[e.jsxs("a",{href:"https://cal.com/usagemetrics/demo",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-7 py-3 bg-[#0a1628] text-white rounded-xl font-semibold text-sm hover:bg-blue-700 transition-all shadow-sm",children:["Book a Demo ",e.jsx(W,{className:"w-4 h-4"})]}),e.jsx("button",{onClick:()=>t("/resources"),className:"inline-flex items-center gap-2 px-7 py-3 border border-gray-200 text-[#0a1628] rounded-xl font-semibold text-sm hover:bg-gray-50 transition-all",children:"Read our White Papers"})]})]})}),e.jsx(H,{})]})}const ne=[{code:0,codeLabel:"0",httpStatus:200,message:"{Info or Debug Message}",category:"Informational",severity:"info",invocationConditions:"Any. These Messages will never be standardized and service providers can design them as they see fit. Used for informational or debug-level responses that do not indicate an error or warning condition.",keywords:["info","debug","custom","informational"]},{code:1,codeLabel:"1â999",httpStatus:200,message:"{Warning Message}",category:"Custom Warning",severity:"warning",invocationConditions:"Any. This range (1â999) is reserved for the use of service providers to supply their own custom warnings. Report providers may define their own warning messages within this range.",keywords:["w
20arning","custom","provider","vendor"]},{code:1e3,codeLabel:"1000",httpStatus:503,message:"Service Not Available",category:"Service Error",severity:"error",invocationConditions:"The service is executing a request, but due to internal errors cannot complete the request. If possible, the server should provide an explanation in the additional Data element. Returned when the COUNTER API server experiences an internal failure preventing report generation.",keywords:["service","unavailable","down","internal","error","503"]},{code:1010,codeLabel:"1010",httpStatus:503,message:"Service Busy",category:"Service Error",severity:"error",invocationConditions:"The service is too busy to execute the incoming request. The client should retry the request after some reasonable time. This exception indicates that the server is temporarily overloaded and cannot handle additional requests at this moment.",keywords:["busy","overloaded","retry","capacity","throttle","503"]},{code:1011,codeLabel:"1011",httpStatus:202,message:"Report Queued for Processing",category:"Processing",severity:"info",invocationConditions:"Services queueing incoming report requests must return a response with this Exception and no payload to inform the client about the processing status. The client should retry the request after some reasonable time. Used by COUNTER API servers that process reports asynchronously.",keywords:["queued","async","processing","retry","202","pending"]},{code:1020,codeLabel:"1020",httpStatus:429,message:"Client has made too many requests",category:"Rate Limiting",severity:"warning",invocationConditions:"If the service sets a limit on the number of requests a client can make within a given timeframe, the server will return this Exception when the client exceeds that limit. The server would provide an explanation of the limit in the additional Data element (e.g. 'Client has made too many requests. This server allows only 500 requests per day per requestor_id and customer_id.').",keywords:["rate","limit","too many","429","throttle","quota","requests"]},{code:1030,codeLabel:"1030",httpStatus:400,message:"Insufficient Information to Process Request",category:"Request Error",severity:"error",invocationConditions:"There is insufficient data in the request to begin processing (e.g. missing requestor_id, no customer_id, etc.). Returned when required parameters are absent from the COUNTER API call. This is a client-side error meaning the request must be corrected before retrying.",keywords:["missing","requestor_id","customer_id","insufficient","parameter","required","400"]},{code:2e3,codeLabel:"2000",httpStatus:401,message:"Requestor Not Authorized to Access Service",category:"Authorization",severity:"error",invocationConditions:"If requestor_id is not recognized or not authorized by the service. Returned when the requesting system's credentials are invalid or unknown to the COUNTER API server. The client must provide valid credentials.",keywords:["auth","unauthorized","401","requestor","credentials","not authorized","access denied"]},{code:2010,codeLabel:"2010",httpStatus:403,message:"Requestor is Not Authorized to Access Usage for Institution",category:"Authorization",severity:"error",invocationConditions:"If requestor_id has not been authorized to harvest usage for the institution identified by the customer_id, or if the customer_id is not recognized. The requesting system does not have permission to retrieve statistics for the specified institution.",keywords:["institution","customer_id","403","forbidden","unauthorized","harvest"]},{code:2011,codeLabel:"2011",httpStatus:403,message:"Global Reports Not Supported",category:"Authorization",severity:"error",invocationConditions:"Reporting to 'The World', customer_id 0000000000000000, is not supported by this platform. Returned when a client requests a global report using the reserved customer_id for 'The World' but the service does not support global reporting.",keywords:["global","world","0000000000000000","403","not supported"]},{code:2020,codeLabel:"2020",httpStatus:401,message:"APIKey Invalid",category:"Authorization",severity:"error",invocationConditions:"The service requires a valid APIKey to access usage data and the key provided was not val
20id or not authorized for the data being requested. Returned when API key authentication is in use and the supplied key is missing, expired, or incorrectly formed.",keywords:["api key","apikey","invalid","401","authentication","token"]},{code:3020,codeLabel:"3020",httpStatus:400,message:"Invalid Date Arguments",category:"Request Error",severity:"error",invocationConditions:"Any format or logic errors involving date computations (e.g., end_date cannot be less than begin_date). Returned when the date parameters in the request are malformed, out of logical order, or use an unsupported date format. Also used when begin_date is the current or a future month.",keywords:["date","begin_date","end_date","invalid","format","400","future"]},{code:3030,codeLabel:"3030",httpStatus:200,message:"No Usage Available for Requested Dates",category:"No Data",severity:"info",invocationConditions:"The service did not find any data for the specified date range and other filters (if any). Note: If the usage for a requested month either hasn't been processed yet or is no longer available, only Exception 3031 or 3032 must be returned for that month instead.",keywords:["no usage","no data","empty","dates","not found","zero"]},{code:3031,codeLabel:"3031",httpStatus:200,message:"Usage Not Ready for Requested Dates",category:"Partial Data",severity:"warning",invocationConditions:"The service has not yet processed the usage for one or more of the requested months. If some months are available that data should be returned. The Exception should include the months not yet processed in the additional Data element. Note: If the requested begin_date is the current or a future month, the server should return Exception 3020. If the requested end_date is the current or future month, the server may include Exception 3031 and set End_Date to the previous month.",keywords:["not ready","pending","processing","months","partial","current month"]},{code:3032,codeLabel:"3032",httpStatus:200,message:"Usage No Longer Available for Requested Dates",category:"Partial Data",severity:"warning",invocationConditions:"The service does not have the usage for one or more of the requested months because the requested begin_date is earlier than the first month for which data has been processed and is available. If some months are available that data should be returned. The Exception should include the information about the months processed and available in the additional Data element. Platforms are required to hold 24 months of usage plus the current year.",keywords:["no longer available","expired","archive","begin_date","historical","retention"]},{code:3040,codeLabel:"3040",httpStatus:200,message:"Partial Data Returned",category:"Partial Data",severity:"warning",invocationConditions:"The request could not be fulfilled in its entirety, since some of the requested data is missing. The server should return the available data and provide an explanation in the additional Data element. Note: This Exception is not intended for the conditions already covered by Exceptions 3030, 3031 and 3032. A typical use case would be that usage data is missing because logging failed. Usually this Exception indicates a permanent error.",keywords:["partial","missing data","incomplete","logging failure","permanent"]},{code:3050,codeLabel:"3050",httpStatus:200,message:"Parameter Not Recognized in this Context",category:"Request Warning",severity:"warning",invocationConditions:"The request contained one or more parameters that are not recognized by the server in the context of the report being serviced. The server should list the names of unsupported parameters in the additional Data element. The server is expected to ignore unsupported parameters and continue to process the request, returning data that is available without the parameter being applied. Note: This Exception is only applicable for report requests, not for report list, member list or server status requests.",keywords:["parameter","unrecognized","unknown","context","ignored"]},{code:3060,codeLabel:"3060",httpStatus:200,message:"Invalid ReportFilter Value",category:"Request Warning",severity:"warning",invocationConditions:"The request contained one or more filter values that are not supported by the server. The server should list the names of unsupported filter values in the additional Data element. The server is expected to ignore unsupported filters and continue to process the request, returning data that is available without the filter being applied. Note: If the begin_date or end_date value is invali
20d, the server must return Exception 3020. If the service requires a platform parameter and the platform value is invalid, the server should return Exception 1030.",keywords:["filter","invalid","unsupported","report_filter","value"]},{code:3061,codeLabel:"3061",httpStatus:200,message:"Incongruous ReportFilter Value",category:"Request Warning",severity:"warning",invocationConditions:"A filter element includes multiple values in a pipe-delimited list; however, the supplied values are not all of the same scope (e.g., item_id filter includes article level DOIs and journal level DOIs or ISSNs). The server is expected to ignore the invalid filters and continue to process the request, returning data that is available without the filter being applied.",keywords:["incongruous","mixed scope","pipe","item_id","filter","doi","issn"]},{code:3062,codeLabel:"3062",httpStatus:200,message:"Invalid ReportAttribute Value",category:"Request Warning",severity:"warning",invocationConditions:"The request contained one or more report attribute values that are not supported by the server. The server should list the names of unsupported report attribute values in the additional Data element. The server is expected to ignore unsupported report attributes and continue to process the request, returning data that is available without the report attribute being applied.",keywords:["attribute","invalid","unsupported","report_attribute","value"]},{code:3063,codeLabel:"3063",httpStatus:200,message:"Components Not Supported",category:"Request Warning",severity:"warning",invocationConditions:"The request contained include_component_details=True, but reporting on component usage is not supported by this server. The server is expected to ignore this unsupported report attribute and continue to process the request, returning data that is available without the component details.",keywords:["components","component_details","include_component_details","not supported"]},{code:3070,codeLabel:"3070",httpStatus:200,message:"Required ReportFilter Missing",category:"Request Error",severity:"error",invocationConditions:"A required filter was not included in the request. Which filters are required will depend on the report and the service being called. The server should list the names of the missing filters in the additional Data element. Note: If begin_date or end_date is missing, the server must return Exception 1030. If the service requires a platform parameter and platform is missing, the server should also return Exception 1030. Currently there are no other required report filters, so this Exception should rarely occur.",keywords:["required","missing filter","report_filter","mandatory","begin_date","end_date"]}],Qi={info:{label:"Informational",color:"text-blue-700",bg:"bg-blue-50",border:"border-blue-200",icon:e.jsx(nr,{className:"w-4 h-4"})},success:{label:"OK",color:"text-emerald-700",bg:"bg-emerald-50",border:"border-emerald-200",icon:e.jsx(Ls,{className:"w-4 h-4"})},warning:{label:"Warning",color:"text-amber-700",bg:"bg-amber-50",border:"border-amber-200",icon:e.jsx(lr,{className:"w-4 h-4"})},error:{label:"Error",color:"text-red-700",bg:"bg-red-50",border:"border-red-200",icon:e.jsx(Le,{className:"w-4 h-4"})}},Xi={200:"text-emerald-700 bg-emerald-50 border-emerald-200",202:"text-blue-700 bg-blue-50 border-blue-200",400:"text-red-700 bg-red-50 border-red-200",401:"text-red-700 bg-red-50 border-red-200",403:"text-red-700 bg-red-50 border-red-200",429:"text-amber-700 bg-amber-50 border-amber-200",503:"text-red-700 bg-red-50 border-red-200"},Yt=Array.from(new Set(ne.map(t=>t.category))).sort(),Zi=({ex:t,query:a})=>{const s=Qi[t.severity],i=Xi[t.httpStatus]??"text-gray-600 bg-gray-50 border-gray-200",r=n=>{if(!a.trim())return e.jsx("span",{children:n});const c=new RegExp(`(${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),d=n.split(c);return e.jsx("span",{children:d.map((u,b)=>c.test(u)?e.jsx("mark",{className:"bg-yellow-200 text-yellow-900 rounded px-0.5",children:u},b):e.jsx("span",{children:u},b))})};return e.jsxs("div",{className:`border rounded-xl overflow-hidden bg-white shadow-sm hover:shadow-md transition-shadow ${s.border}`,children:[e.jsxs("div",{className:`px-5 py-4 flex flex-wrap items-center gap-3 ${s.bg} border-b ${s.border}`,children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:`font-mono text-xl font-black ${s.color}`,children:t.codeLabel})}),e.jsxs("span",{className:`font-mono text-xs font-bold border rounded-full px-3 py-1 ${i}`,children:["HTTP ",t.httpStatus]}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-gray-500 border border-gray-200 rounded-full px-3 py-1 bg-white",children:t.category}),e.jsxs("div",{className:`ml-auto flex items-center gap-1.5 text-xs font-semibold ${s.color}`,children:[s.icon,s.label]})]}),e.jsxs("div",{className:"px-5 py-4",children:[e.jsx("h3",{className:"text-base font-bold text-[#1a2e5a] mb-3 leading-snug",children:r(t.message)}),e.jsx("p",{className:"text-sm text-gray-600 leading-relaxed",children:r(t.invocationConditions)})]})]})};
20function Gt(){const[t,a]=o.useState(""),[s,i]=o.useState(null),r=o.useMemo(()=>{const n=t.trim().toLowerCase();return ne.filter(c=>!s||c.category===s?n?c.codeLabel.includes(n)||String(c.code).includes(n)||c.message.toLowerCase().includes(n)||c.invocationConditions.toLowerCase().includes(n)||c.keywords.some(u=>u.includes(n))||c.category.toLowerCase().includes(n)||String(c.httpStatus).includes(n):!0:!1)},[t,s]);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#fdf4ff] border-b border-gray-200",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(#0a1628 1px, transparent 1px), linear-gradient(90deg, #0a1628 1px, transparent 1px)",backgroundSize:"40px 40px"}}),e.jsx("div",{className:"absolute top-[-80px] right-[-60px] w-[380px] h-[380px] bg-purple-200 rounded-full opacity-20 blur-3xl pointer-events-none"}),e.jsx("div",{className:"relative container mx-auto px-6 py-12 md:py-16",children:e.jsxs(h,{children:[e.jsxs(v,{to:"/tools",className:"inline-flex items-center gap-1.5 text-xs text-gray-400 hover:text-[#7c3aed] transition-colors mb-6",children:[e.jsx(Je,{className:"w-3.5 h-3.5"})," Back to Tools"]}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-purple-50 border border-purple-100 text-[#7c3aed] text-xs font-semibold mb-5 ml-3",children:[e.jsx(Le,{className:"w-3.5 h-3.5"})," Free Tool"]}),e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#7c3aed] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#7c3aed]",children:"COUNTER R5.1 · Appendix D"})]}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-black text-[#1a2e5a] mb-4 leading-tight",children:["Exception Code ",e.jsx("span",{className:"text-[#7c3aed]",children:"Lookup"})]}),e.jsxs("p",{className:"text-lg text-gray-500 max-w-2xl leading-relaxed",children:["Search all ",ne.length," COUNTER R5.1 exception codes by code number, message, or keyword. Understand exactly when each exception should be returned by a COUNTER API server."]}),e.jsx("div",{className:"flex flex-wrap gap-4 mt-8",children:[{label:"Total exceptions",value:ne.length},{label:"HTTP 200 (soft)",value:ne.filter(n=>n.httpStatus===200).length},{label:"Non-200 (hard)",value:ne.filter(n=>n.httpStatus!==200).length},{label:"Categories",value:Yt.length}].map(n=>e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl px-5 py-3 text-center shadow-sm",children:[e.jsx("div",{className:"text-2xl font-black text-[#7c3aed]",children:n.value}),e.jsx("div",{className:"text-[11px] text-gray-400 mt-0.5",children:n.label})]},n.label))})]})})]}),e.jsx("section",{className:"bg-[#f8fafc] flex-1 pb-20",children:e.jsxs("div",{className:"container mx-auto px-6 pt-10 max-w-4xl",children:[e.jsxs(h,{delay:.05,children:[e.jsxs("div",{className:"relative mb-5",children:[e.jsx(xt,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),e.jsx("input",{type:"text",value:t,onChange:n=>a(n.target.value),placeholder:"Search by code (e.g. 3031), message, keywordâ¦",className:"w-full pl-11 pr-10 py-3.5 bg-white border border-gray-200 rounded-xl text-sm text-gray-800 placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#7c3aed]/30 focus:border-[#7c3aed]/60 shadow-sm transition-all"}),t&&e.jsx("button",{onClick:()=>a(""),className:"absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(ee,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-8",children:[e.jsxs("button",{onClick:()=>i(null),className:`text-xs font-semibold px-4 py-1.5 rounded-full border transition-all ${s?"bg-white text-gray-500 border-gray-200 hover:border-[#7c3aed]/40":"bg-[#1a2e5a] text-white border-[#1a2e5a]"}`,children:["All (",ne.length,")"]}),Yt.map(n=>{const c=ne.filter(d=>d.category===n).length;return e.jsxs("button",{onClick:()=>i(s===n?null:n),className:`text-xs font-semibold px-4 py-1.5 rounded-full border transition-all ${s===n?"bg-[#7c3aed] text-white border-[#7c3aed]":"bg-white text-gray-500 border-gray-200 hover:border-[#7c3aed]/40"}`,children:[n," (",c,")"]},n)})]})]}),e.jsx("div",{className:"space-y-4",children:r.length===0?e.jsx(h,{children:e.jsxs("div",{className:"text-center py-16 text-gray-400",children:[e.jsx(Le,{className:"w-10 h-10 mx-auto mb-3 opacity-40"}),e.jsx("p",{className:"font-semibold text-gray-500",children:"No exceptions match your search"}),e.jsx("p",{className:"text-sm mt-1",children:"Try a different keyword, code number, or HTTP status"}),e.jsx("button",{onClick:()=>{a(""),i(null)},className:"mt-4 text-sm text-[#7c3aed] hover:underline",children:"Clear filters"})]})}):e.jsxs(e.Fragment,{children:[e.jsx(h,{children:e.jsxs("p",{className:"text-xs font-bold uppercase tracking-widest text-gray-400 mb-4",children:[r.length," exception",r.length!==1?"s":""," found"]}
20)}),r.map(n=>e.jsx(h,{children:e.jsx(Zi,{ex:n,query:t})},n.code))]})}),e.jsx(h,{delay:.1,children:e.jsxs("div",{className:"mt-12 bg-white border border-gray-200 rounded-2xl px-6 py-6 text-sm text-gray-500 leading-relaxed shadow-sm",children:[e.jsx("p",{className:"font-semibold text-gray-700 mb-2",children:"About this reference"}),e.jsxs("p",{children:["Exception codes and messages extracted from"," ",e.jsx("span",{className:"font-semibold text-[#1a2e5a]",children:"COUNTER Code of Practice Release 5.1.0.1"})," ","(published 14 January 2025), Appendix D â Handling Errors and Exceptions, Table D.1. Standard exceptions with Code > 999 must use the exact messages shown here. Codes 0 and 1â999 are reserved for informational and custom provider warnings respectively."]})]})})]})}),e.jsx(H,{})]})}const it=[{value:"PR",label:"Platform Report"},{value:"DR",label:"Database Report"},{value:"TR",label:"Title Report"},{value:"IR",label:"Item Report"}],nt=[{value:"",label:"All (default)"},{value:"Total_Item_Investigations",label:"Total_Item_Investigations"},{value:"Unique_Item_Investigations",label:"Unique_Item_Investigations"},{value:"Total_Item_Requests",label:"Total_Item_Requests"},{value:"Unique_Item_Requests",label:"Unique_Item_Requests"},{value:"Unique_Title_Investigations",label:"Unique_Title_Investigations"},{value:"Unique_Title_Requests",label:"Unique_Title_Requests"},{value:"No_License",label:"No_License"},{value:"Limit_Exceeded",label:"Limit_Exceeded"},{value:"Searches_Regular",label:"Searches_Regular"},{value:"Searches_Platform",label:"Searches_Platform"}],lt=[{value:"",label:"All (default)"},{value:"Article",label:"Article"},{value:"Book",label:"Book"},{value:"Book_Segment",label:"Book_Segment"},{value:"Journal",label:"Journal"},{value:"Dataset",label:"Dataset"},{value:"Multimedia",label:"Multimedia"},{value:"Audiovisual",label:"Audiovisual"},{value:"Image",label:"Image"},{value:"Software",label:"Software"},{value:"Thesis_or_Dissertation",label:"Thesis_or_Dissertation"}],ot=[{value:"",label:"All (default)"},{value:"Controlled",label:"Controlled"},{value:"Open",label:"Open"},{value:"Free_To_Read",label:"Free_To_Read"}],ct=[{value:"",label:"All (default)"},{value:"Regular",label:"Regular"},{value:"TDM",label:"TDM"}],en=()=>{const t=[],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s=new Date,i=s.getFullYear()+1;for(let r=2020;r<=i;r++)for(let n=0;n<12&&!(r===i&&n>s.getMonth());n++){const c=`${a[n]}-${r}`,d=`${r}-${String(n+1).padStart(2,"0")}`;t.push({value:d,label:c})}return t.reverse()},pe=en(),Kt=()=>{const a=new Date().getFullYear(),s=`${a}-01`,i=`${a}-12`;return{report:"TR",dateFrom:s,dateTo:i,metricType:"",dataType:"",includeDataType:!1,accessType:"",includeAccessType:!0,accessMethod:"",includeAccessMethod:!0,yop:"",includeYop:!1,excludeMonthlyDetails:!0}},tn=t=>{var r,n,c,d,u,b,m;((r=it.find(l=>l.value===t.report))==null?void 0:r.label)??t.report,((n=pe.find(l=>l.value===t.dateFrom))==null?void 0:n.label)??t.dateFrom,((c=pe.find(l=>l.value===t.dateTo))==null?void 0:c.label)??t.dateTo,(d=nt.find(l=>l.value===t.metricType))==null||d.label,(u=lt.find(l=>l.value===t.dataType))==null||u.label,(b=ot.find(l=>l.value===t.accessType))==null||b.label,(m=ct.find(l=>l.value===t.accessMethod))==null||m.label;const a=(l,j)=>l.map(y=>` <option value="${y.value}"${y.value===j?" selected":""}>${y.label}</option>`).join(` 21`),s=pe.map(l=>` <option value="${l.value}"${l.value===t.dateFrom?" selected":""}>${l.label}</option>`).join(` 22`),i=pe.map(l=>` <option value="${l.value}"${l.value===t.dateTo?" selected":""}>${l.label}</option>`).join(` 23`);return`<!DOCTYPE html> 24<html lang="en"> 25<head> 26 <meta charset="UTF-8" /> 27 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 28 <title>Configure your COUNTER Report</title> 29 <style> 30 body { font-family: Arial, sans-serif; background: #e8e8e8; display: flex; justify-content: center; padding: 40px 16px; } 31 .card { background: #fff; border: 2px solid #5b9bd5; border-radius: 4px; padding: 28px 32px; max-width: 560px; width: 100%; } 32 h2 { text-align: center; font-size: 1.25rem; margin: 0 0 20px; font-weight: 700; color: #111; } 33 .section-box { border: 1.5px solid #5b9bd5; border-radius: 3px; padding: 16px 20px; margin-bottom: 16px; } 34 .row { display: flex; align-items: center; margin-bottom: 12px; gap: 12px; } 35 .row:last-child { margin-bottom: 0; } 36 .label { flex: 0 0 140px; font-size: 0.875rem; color: #222; } 37 .label.bold { font-weight: 700; font-size: 0.9rem; } 38 .italic { font-style: italic; color: #555; font-size: 0.875rem; } 39 select { flex: 1; border: 1.5px solid #5b9bd5; border-radius: 2px; padding: 6px 8px; font-size: 0.875rem; appearance: none;
39 background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpolygon points='6,8 0,0 12,0' fill='%235b9bd5'/%3E%3C/svg%3E") no-repeat right 10px center; background-size: 10px; cursor: pointer; color: #111; } 40 .include-col { width: 48px; display: flex; align-items: center; justify-content: center; } 41 .include-head { width: 48px; text-align: center; font-style: italic; font-size: 0.875rem; color: #555; } 42 input[type="checkbox"] { width: 18px; height: 18px; border: 1.5px solid #5b9bd5; border-radius: 2px; appearance: none; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fff; } 43 input[type="checkbox"]:checked::after { content: "X"; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 11px; font-weight: 700; color: #111; } 44 .footer-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; } 45 .footer-row .label { font-weight: 700; font-size: 0.9rem; } 46 .actions { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; } 47 button[type="submit"] { background: #5b9bd5; color: #fff; border: none; padding: 9px 22px; border-radius: 4px; cursor: pointer; font-size: 0.9rem; font-weight: 600; } 48 button[type="submit"]:hover { background: #3d7dbf; } 49 button[type="reset"] { background: #fff; color: #5b9bd5; border: 1.5px solid #5b9bd5; padding: 9px 22px; border-radius: 4px; cursor: pointer; font-size: 0.9rem; font-weight: 600; } 50 </style> 51</head> 52<body> 53<div class="card"> 54 <h2>Configure your COUNTER Report</h2> 55 <form id="counter-form" action="/your-sushi-endpoint" method="GET"> 56 57 <!-- Mandatory elements --> 58 <div class="section-box"> 59 <div class="row"> 60 <span class="label bold">Mandatory elements</span> 61 <span class="italic">Select...</span> 62 </div> 63 64 <div class="row"> 65 <label class="label" for="report">Report</label> 66 <select id="report" name="report"> 67${a(it,t.report)} 68 </select> 69 </div> 70 71 <div class="row"> 72 <label class="label" for="date_from">Date from</label> 73 <select id="date_from" name="date_from"> 74${s} 75 </select> 76 </div> 77 78 <div class="row"> 79 <label class="label" for="date_to">Date To</label> 80 <select id="date_to" name="date_to"> 81${i} 82 </select> 83 </div> 84 85 <div class="row"> 86 <label class="label" for="metric_type">Metric types</label> 87 <select id="metric_type" name="metric_type"> 88${a(nt,t.metricType)} 89 </select> 90 </div> 91 </div> 92 93 <!-- Additional elements --> 94 <div class="section-box"> 95 <div class="row"> 96 <span class="label bold">Additional elements</span> 97 <span class="italic" style="flex:1">Select...</span> 98 <span class="include-head">Include</span> 99 </div> 100 101 <div class="row"> 102 <label class="label" for="data_type">Data types</label> 103 <select id="data_type" name="data_type"> 104${a(lt,t.dataType)} 105 </select> 106 <div class="include-col"> 107 <input type="checkbox" id="include_data_type" name="include_data_type"${t.includeDataType?" checked":""} /> 108 </div> 109 </div> 110 111 <div class="row"> 112 <label class="label" for="access_type">Access types</label> 113 <select id="access_type" name="access_type"> 114${a(ot,t.accessType)} 115 </select> 116 <div class="include-col"> 117 <input type="checkbox" id="include_access_type" name="include_access_type"${t.includeAccessType?" checked":""} /> 118 </div> 119 </div> 120 121 <div class="row"> 122 <label class="label" for="access_method">Access methods</label> 123 <select id="access_method" name="access_method"> 124${a(ct,t.accessMethod)} 125 </select> 126 <div class="include-col"> 127 <input type="checkbox" id="include_access_method" name="include_access_method"${t.includeAccessMethod?" checked":""} /> 128 </div> 129 </div> 130 131 <div class="row"> 132 <label class="label" for="yop">YOP</label> 133 <select id="yop" name="yop"> 134 <option value="">All (default)</option> 135${Array.from({length:new Date().getFullYear()-1999},(l,j)=>2e3+j).reverse().map(l=>` <option value="${l}"${String(l)===t.yop?" selected":""}>${l}</option>`).join(` 136`)} 137 </select> 138 <div class="include-col"> 139 <input type="checkbox" id="include_yop" name="include_yop"${t.includeYop?" checked":""} /> 140 </div> 141 </div> 142 </div> 143 144 <!-- Exclude monthly details --> 145 <div class="footer-row">
146 <span class="label bold">Exclude monthly details</span> 147 <input type="checkbox" id="exclude_monthly" name="exclude_monthly"${t.excludeMonthlyDetails?" checked":""} /> 148 </div> 149 150 <div class="actions"> 151 <button type="reset">Reset</button> 152 <button type="submit">Generate Report</button> 153 </div> 154 155 </form> 156</div> 157</body> 158</html>`},ie=({id:t,value:a,onChange:s,options:i})=>e.jsx("select",{id:t,value:a,onChange:r=>s(r.target.value),className:"flex-1 border border-[#5b9bd5] rounded text-sm py-1.5 px-2.5 bg-white text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0077cc]/30",children:i.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))}),Ne=({checked:t,onChange:a})=>e.jsx("button",{type:"button",onClick:a,className:`w-7 h-7 border rounded flex items-center justify-center text-xs font-bold transition-colors ${t?"border-[#5b9bd5] bg-[#e8f2fb] text-[#1a2e5a]":"border-gray-300 bg-white text-transparent"}`,"aria-label":"toggle include",children:"X"}),sn=()=>{const[t,a]=o.useState(Kt()),[s,i]=o.useState(!1),[r,n]=o.useState(!1),c=o.useCallback((m,l)=>a(j=>({...j,[m]:l})),[]),d=tn(t),u=async()=>{await navigator.clipboard.writeText(d),i(!0),setTimeout(()=>i(!1),2e3)},b=()=>a(Kt());return e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-start",children:[e.jsx("div",{children:e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4 flex items-center justify-between",children:[e.jsx("h3",{className:"font-bold text-[#1a2e5a] text-base",children:"Configure your COUNTER Report"}),e.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 text-xs text-gray-400 hover:text-[#0077cc] transition-colors",children:[e.jsx(or,{className:"w-3.5 h-3.5"})," Reset"]})]}),e.jsxs("div",{className:"p-6 space-y-5",children:[e.jsxs("div",{className:"border border-[#5b9bd5]/50 rounded-lg p-5 bg-[#f8fafc]",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("span",{className:"font-bold text-sm text-[#1a2e5a]",children:"Mandatory elements"}),e.jsx("span",{className:"italic text-xs text-gray-400",children:"Select..."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-report",children:"Report"}),e.jsx(ie,{id:"fb-report",value:t.report,onChange:m=>c("report",m),options:it})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-date-from",children:"Date from"}),e.jsx(ie,{id:"fb-date-from",value:t.dateFrom,onChange:m=>c("dateFrom",m),options:pe})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-date-to",children:"Date to"}),e.jsx(ie,{id:"fb-date-to",value:t.dateTo,onChange:m=>c("dateTo",m),options:pe})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-metric",children:"Metric types"}),e.jsx(ie,{id:"fb-metric",value:t.metricType,onChange:m=>c("metricType",m),options:nt})]})]})]}),e.jsxs("div",{className:"border border-[#5b9bd5]/50 rounded-lg p-5 bg-[#f8fafc]",children:[e.jsxs("div",{className:"flex items-center mb-4",children:[e.jsx("span",{className:"font-bold text-sm text-[#1a2e5a] w-32 shrink-0",children:"Additional elements"}),e.jsx("span",{className:"italic text-xs text-gray-400 flex-1",children:"Select..."}),e.jsx("span",{className:"italic text-xs text-gray-400 w-10 text-center",children:"Include"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-data-type",children:"Data types"}),e.jsx(ie,{id:"fb-data-type",value:t.dataType,onChange:m=>c("dataType",m),options:lt}),e.jsx("div",{className:"w-10 flex justify-center",children:e.jsx(Ne,{checked:t.includeDataType,onCh
158ange:()=>c("includeDataType",!t.includeDataType)})})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-access-type",children:"Access types"}),e.jsx(ie,{id:"fb-access-type",value:t.accessType,onChange:m=>c("accessType",m),options:ot}),e.jsx("div",{className:"w-10 flex justify-center",children:e.jsx(Ne,{checked:t.includeAccessType,onChange:()=>c("includeAccessType",!t.includeAccessType)})})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-access-method",children:"Access methods"}),e.jsx(ie,{id:"fb-access-method",value:t.accessMethod,onChange:m=>c("accessMethod",m),options:ct}),e.jsx("div",{className:"w-10 flex justify-center",children:e.jsx(Ne,{checked:t.includeAccessMethod,onChange:()=>c("includeAccessMethod",!t.includeAccessMethod)})})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("label",{className:"text-sm text-gray-700 w-32 shrink-0",htmlFor:"fb-yop",children:"YOP"}),e.jsx(ie,{id:"fb-yop",value:t.yop,onChange:m=>c("yop",m),options:[{value:"",label:"All (default)"},...Array.from({length:new Date().getFullYear()-1999},(m,l)=>({value:String(2e3+l),label:String(2e3+l)})).reverse()]}),e.jsx("div",{className:"w-10 flex justify-center",children:e.jsx(Ne,{checked:t.includeYop,onChange:()=>c("includeYop",!t.includeYop)})})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"font-bold text-sm text-[#1a2e5a] w-52 shrink-0",children:"Exclude monthly details"}),e.jsx(Ne,{checked:t.excludeMonthlyDetails,onChange:()=>c("excludeMonthlyDetails",!t.excludeMonthlyDetails)})]})]})]})}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[#1a2e5a] font-semibold text-sm",children:[e.jsx(He,{className:"w-4 h-4 text-[#0077cc]"}),"Generated HTML"]}),e.jsxs("div",{className:"ml-auto flex gap-2",children:[e.jsx("button",{onClick:()=>n(m=>!m),className:"text-xs px-4 py-1.5 rounded-lg border border-gray-200 bg-white text-gray-600 hover:border-[#0077cc] hover:text-[#0077cc] transition-all font-medium",children:r?"Show Code":"Preview"}),e.jsx("button",{onClick:u,className:"inline-flex items-center gap-1.5 text-xs px-4 py-1.5 rounded-lg bg-[#0077cc] text-white hover:bg-[#005fa3] transition-all font-medium",children:s?e.jsxs(e.Fragment,{children:[e.jsx(Ce,{className:"w-3.5 h-3.5"})," Copied!"]}):e.jsxs(e.Fragment,{children:[e.jsx(xe,{className:"w-3.5 h-3.5"})," Copy HTML"]})})]})]}),r?e.jsx("div",{className:"border border-gray-200 rounded-xl overflow-hidden shadow-sm bg-[#e8e8e8]",style:{height:560},children:e.jsx("iframe",{srcDoc:d,title:"Form preview",className:"w-full h-full border-0",sandbox:"allow-same-origin"},d)}):e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"bg-[#1a2e5a] text-green-300 font-mono text-[11px] rounded-xl p-5 overflow-auto shadow-lg",style:{height:560},children:e.jsx("pre",{className:"whitespace-pre leading-5",children:d})}),e.jsx("div",{className:"absolute bottom-3 right-3",children:e.jsxs("button",{onClick:u,className:"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg bg-white/10 border border-white/20 text-white hover:bg-white/20 transition-all",children:[s?e.jsx(Ce,{className:"w-3 h-3"}):e.jsx(xe,{className:"w-3 h-3"}),s?"Copied!":"Copy"]})})]}),e.jsxs("p",{className:"text-xs text-gray-400 leading-relaxed",children:["The generated form uses standard HTML5 â paste it into your platform's reporting interface or integrate with your SUSHI API endpoint. Adjust the"," ",e.jsx("code",{className:"bg-gray-100 px-1 rounded",children:"action"})," attribute to point to your own COUNTER SUSHI server URL."]})]})]})};function Qt(){return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#f5f0ff] border-b border-gray-200",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(#0a1628 1px, transparent 1px), linear-gradient(90deg, #0a1628 1px, transparent 1px)",backgroundSize:"40px 40px"}}),e.jsx("div",{className:"absolute top-[-80px] right-[-60px] w-[380px] h-[380px] bg-purple-200 rounded-full opacity-20 blur-3xl pointer-events-none"}),e.jsx("div",{className:"relative container mx-auto px-6 py-12 md:py-16",children:e.jsxs(h,{children:[e.jsxs(v,{to:"/tools",className:"inline-flex items-center gap-1.5 text-xs text-gray-400 hover:text-[#9b2c8c] transition-colors mb-6",children:[e.jsx(Je,{className:"w-3.5 h-3.5"})," Back to Tools"]}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-purple-50 border border-purple-100 text-[#9b2c8c] text-xs font-semibold mb-5 ml-3",children:[e.jsx(He,{className:"w-3.5 h-3.5"})," Free Tool"]}),e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#9b2c8c] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#9b2c8c]",children:"COUNTER R5.1"})]}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-black text-[#1a2e5a] mb-4 leading-tight",children:["COUNTER Report ",e.jsx("span",{className:"text-[#9b2c8c]",children:"HTML Form Builder"})]}),e.jsx("p",{className:"text-lg text-gray-500 max-w-2xl leading-relaxed",children:"Configure your report parameters interactively and get a ready-to-embed HTML form â compliant with COUNTER R5.1 SUSHI field names. No coding required."})]})})]}),e.jsx("section",{className:"bg-[#f8fafc] flex-1 pb-20",children:e.jsx("div",{className:"container mx-auto px-6 pt-12 max-w-6xl",children:e.jsx(h,{delay:.05,children:e.jsx(sn,{})})})}),e.jsx(H,{})]})}const U={PR:{id:"PR",name:"Platform Report",description:"Summarizes activity across all platforms of a report provider. Required for all Host_Types.",standardViews:[{id:"PR_P1",name:"Platform Usage",description:"Aggregated platform-level usage showing Searches, Investigations and Requests."}]},DR:{id:"DR",name:"Database Report",description:"Activity within databases, including Searches, Investigations, Requests and Access Denied metrics.",standardViews:[{id:"DR_D1",name:"Database Search and Item Usage",description:"Searches plus Total_Item_Investigations and Total_Item_Requests for all databases."},{id:"DR_D2",name:"Database Access Denied",description:"No_License and Limit_Exceeded denials by database."}]},TR:{id:"TR",name:"Title Report",description:"Usage by title (journal, book, etc.) including Investigations, Requests and Access Denied metrics across all access types.",standardViews:[{id:"TR_B1",name:"Book Requests (Controlled)",description:"Unique_Title_Requests and Total_Item_Requests for books with Controlled access, excluding OA."},{id:"TR_B2",name:"Book Access Denied",description:"No_License and Limit_Exceeded denials for books."},{id:"TR_B3",name:"Book Usage by Access Type",description:"All Investigation and Request metrics for books broken down by Access_Type."},{id:"TR_J1",name:"Journal Requests (Controlled)",description:"Unique_Item_Requests and Total_Item_Requests for journals excluding OA_Gold."}
158,{id:"TR_J2",name:"Journal Access Denied",description:"No_License and Limit_Exceeded denials for journals."},{id:"TR_J3",name:"Journal Usage by Access Type",description:"All Investigation and Request metrics for journals broken down by Access_Type."},{id:"TR_J4",name:"Journal Requests by YOP",description:"Total_Item_Requests and Unique_Item_Requests broken down by Year of Publication."}]},IR:{id:"IR",name:"Item Report",description:"Usage at the item level (article, book segment, multimedia file, dataset, etc.) including Investigations and Requests.",standardViews:[{id:"IR_A1",name:"Journal Article Requests",description:"Total_Item_Requests and Unique_Item_Requests for journal articles broken down by Access_Type."},{id:"IR_M1",name:"Multimedia Item Requests",description:"Total_Item_Requests for multimedia items (audio, video, image, interactive)."}]}},Ue=[{id:"A&I_Database",label:"A&I Database",subtitle:"Abstracting & Indexing",reports:[U.PR,U.DR]},{id:"Aggregated_Full_Content",label:"Aggregated Full Content",subtitle:"Multi-publisher aggregator",reports:[U.PR,U.DR,U.TR]},{id:"eBook",label:"eBook",subtitle:"Electronic books platform",reports:[U.PR,U.DR,U.TR]},{id:"eBook_Collection",label:"eBook Collection",subtitle:"eBook aggregator/collection",reports:[U.PR,U.DR,U.TR]}
158,{id:"eJournal",label:"eJournal",subtitle:"Electronic journals platform",reports:[U.PR,U.DR,U.TR]},{id:"Full_Content_Database",label:"Full Content Database",subtitle:"Single-subject full content",reports:[U.PR,U.DR,U.IR]},{id:"Multimedia",label:"Multimedia",subtitle:"Audio, video, images",reports:[U.PR,U.DR,U.IR]},{id:"Multimedia_Collection",label:"Multimedia Collection",subtitle:"Multimedia aggregator",reports:[U.PR,U.DR,U.IR]},{id:"Repository",label:"Repository",subtitle:"Institutional/subject repository",reports:[U.PR,U.IR]},{id:"Scholarly_Collaboration",label:"Scholarly Collaboration",subtitle:"Academic social network",reports:[U.PR,U.IR]},{id:"Discovery_Service",label:"Discovery Service",subtitle:"Search & discovery layer",reports:[U.PR,U.DR]},{id:"Data_Repository",label:"Data Repository",subtitle:"Research data repository",reports:[U.PR,U.IR]}],an=({report:t})=>{const[a,s]=o.useState(!0);return e.jsxs("div",{className:"border border-gray-200 rounded-xl overflow-hidden bg-white shadow-sm hover:shadow-md transition-shadow",children:[e.jsxs("button",{className:"w-full flex items-center gap-4 px-6 py-4 hover:bg-[#f8fafc] transition-colors text-left",onClick:()=>s(i=>!i),children:[e.jsx("span",{className:"font-mono text-sm font-bold text-[#0077cc] bg-[#f0f7ff] border border-[#b8d9f0] rounded-md px-2.5 py-1 shrink-0",children:t.id}),e.jsx("span",{className:"text-[#1a2e5a] font-semibold text-base flex-1",children:t.name}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-emerald-700 border border-emerald-300 rounded-full px-3 py-0.5 bg-emerald-50 mr-2",children:"Required"}),a?e.jsx(cr,{className:"w-4 h-4 text-gray-400"}):e.jsx(gt,{className:"w-4 h-4 text-gray-400"})]}),a&&e.jsxs("div",{className:"px-6 pb-6 border-t border-gray-100",children:[e.jsx("p",{className:"text-gray-500 text-sm mt-4 mb-5 leading-relaxed",children:t.description}),t.standardViews.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-400 mb-3",children:["Standard Views (",t.standardViews.length,")"]}),e.jsx("div",{className:"space-y-3",children:t.standardViews.map(i=>e.jsxs("div",{className:"flex items-start gap-4 bg-[#f8fafc] border border-gray-100 rounded-lg px-4 py-3",children:[e.jsx("span",{className:"font-mono text-xs font-bold text-[#0077cc] w-14 shrink-0 mt-0.5",children:i.id}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-[#1a2e5a]",children:i.name}),e.jsx("div",{className:"text-xs text-gray-500 leading-relaxed mt-0.5",children:i.description})]})]},i.id))})]})]})]})};function Xt(){const[t,a]=o.useState(Ue[0].id),s=Ue.find(r=>r.id===t)??Ue[0],i=s.reports.reduce((r,n)=>r+n.standardViews.length,0);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-200",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(#0a1628 1px, transparent 1px), linear-gradient(90deg, #0a1628 1px, transparent 1px)",backgroundSize:"40px 40px"}}),e.jsx("div",{className:"absolute top-[-80px] right-[-60px] w-[380px] h-[380px] bg-blue-200 rounded-full opacity-20 blur-3xl pointer-events-none"}),e.jsx("div",{className:"relative container mx-auto px-6 py-12 md:py-16",children:e.jsxs(h,{children:[e.jsxs(v,{to:"/tools",className:"inline-flex items-center gap-1.5 text-xs text-gray-400 hover:text-[#0077cc] transition-colors mb-6",children:[e.jsx(Je,{className:"w-3.5 h-3.5"})," Back to Tools"]}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-blue-50 border border-blue-100 text-[#0077cc] text-xs font-semibold mb-5 ml-3",children:[e.jsx(pt,{className:"w-3.5 h-3.5"})," Free Tool"]}),e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#0077cc] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#0077cc]",children:"COUNTER R5.1"})]}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-black text-[#1a2e5a] mb-4 leading-tight",children:["COUNTER Compliance ",e.jsx("span",{className:"text-[#0077cc]",children:"Report Checker"})]}),e.jsx("p",{className:"text-lg text-gray-500 max-w-2xl leading-relaxed",children:"Select your Host_Type to instantly see which COUNTER reports and standard views you are required to implement for R5.1 compliance."})]})})]}),e.jsx("section",{className:"bg-[#f8fafc] flex-1 pb-20",children:e.jsxs("div",{className:"container mx-auto px-6 pt-12 max-w-5xl",children:[e.jsxs(h,{delay:.05,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"w-6 h-6 rounded-full bg-[#1a2e5a] text-white flex items-center justify-center text-xs font-bold shrink-0",children:"1"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#1a2e5a]",children:"Select your Host_Type"})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-2.5 mb-12",children:Ue.map(r=>e.jsxs("button",{onClick:()=>a(r.id),className:`text-left rounded-xl border px-4 py-3.5 transition-all ${t===r.id?"bg-[#0077cc] border-[#0077cc] shadow-lg shadow-blue-200/60":"bg-white border-gray-200 hover:border-[#0077cc]/40 hover:shadow-sm"}`,children:[e.jsx("div",{className:`text-sm font-bold leading-tight ${t===r.id?"text-white":"text-[#1a2e5a]"}`,children:r.label}),e.jsx("div",{className:`text-[11px] mt-0.5 ${t===r.id?"text-blue-100":"text-gray-400"}`,children:r.subtitle})]},r.id))})]}),e.jsxs(h,{delay:.1,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[e.jsx("span",{className:"w-6 h-6 rounded-full bg-[#1a2e5a] text-white flex items-center justify-center text-xs font-bold shrink-0",children:"2"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#1a2e5a]",children:"Required reports for your platform"}),e.jsx("span",{className:"ml-auto font-mono text-xs bg-white border border-gray-200 text-[#0077cc] rounded-lg px-3 py-1.5 shadow-sm",children:s.id})]}),e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl mb-6 grid grid-cols-3 divide-x divide-gray-100 shadow-sm",children:[e.jsxs("div",{className:"px-6 py-5 text-center",children:[e.jsx("div",{className:"text-3xl font-black text-[#0077cc]",children:s.reports.length}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Required reports"})]}),e.jsxs("div",{className:"px-6 py-5 text-center",children:[e.jsx("div",{className:"text-3xl font-black text-[#9b2c8c]",children:i}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Standard views"})]}),e.jsxs("div",{className:"px-6 py-5 text-center",children:[e.jsx("div",{className:"text-3xl font-black text-[#1a2e5a]",children:"R5.1"}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Standard version"})]})]}),e.jsx("div",{className:"space-y-3 mb-10",children:s.reports.map(r=>e.jsx(an,{report:r},r.id))}),e.jsxs("div",{className:"bg-[#f0f7ff] border border-[#b8d9f0] rounded-2xl px-7 py-7 flex flex-col md:flex-row items-center justify-between gap-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(O,{className:"w-4 h-4 text-emerald-600"}),e.jsxs("span",{className:"text-sm font-bold text-[#1a2e5a]",children:["Automate all ",s.reports.length," reports with usagemetrics.ai"]})]}),e.jsx("p",{className:"text-sm text-gray-500 leading-relaxed max-w-lg",children:"Stop building COUNTER infrastru
158cture from scratch. We handle ingestion, bot filtering, SUSHI delivery and audit validation â fully automated."})]}),e.jsxs("div",{className:"flex gap-3 shrink-0",children:[e.jsxs(v,{to:"/#pilot",className:"inline-flex items-center gap-2 px-6 py-3 bg-[#0077cc] text-white rounded-xl font-semibold text-sm hover:bg-[#005fa3] transition-all shadow-md shadow-blue-200/50 whitespace-nowrap",children:["Get Started ",e.jsx(W,{className:"w-4 h-4"})]}),e.jsx(v,{to:"/",className:"inline-flex items-center gap-2 px-6 py-3 bg-white border border-gray-200 text-[#1a2e5a] rounded-xl font-semibold text-sm hover:bg-[#f8fafc] transition-all whitespace-nowrap",children:"Learn More"})]})]})]},t)]})}),e.jsx(H,{})]})}const Ee=({code:t,language:a})=>{const[s,i]=le.useState(!1),r=()=>{navigator.clipboard.writeText(t),i(!0),I.success("Copied to clipboard"),setTimeout(()=>i(!1),2e3)};return e.jsxs("div",{className:"relative group my-6",children:[e.jsxs("div",{className:"absolute top-3 right-4 flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest",children:a}),e.jsx("button",{onClick:r,className:"p-1.5 rounded-md bg-slate-800 text-slate-400 hover:text-white transition-colors",children:s?e.jsx(Ce,{className:"w-3.5 h-3.5 text-emerald-500"}):e.jsx(xe,{className:"w-3.5 h-3.5"})})]}),e.jsx("pre",{className:"bg-[#0f172a] text-slate-300 p-6 rounded-xl overflow-x-auto font-mono text-sm leading-relaxed border border-slate-800 shadow-2xl",children:e.jsx("code",{children:t})})]})};function rn(){const t=`curl -X POST "https://www.usagemetrics.ai/api/ingestion/activity/search" \\ 159 -H "Content-Type: application/json" \\ 160 -H "X-API-Key: YOUR_PLATFORM_KEY" \\ 161 -d '{ 162 "customerId": "inst_456", 163 "searchType": "Regular", 164 "accessMethod": "Regular", 165 "accessDenied": false, 166 "sessionId": "sess-123", 167 "date": "2024-03-20T14:30:00Z" 168}'`,a=`curl -X POST "https://www.usagemetrics.ai/api/ingestion/activity/document" \\ 169 -H "Content-Type: application/json" \\ 170 -H "X-API-Key: YOUR_PLATFORM_KEY" \\ 171 -d '{ 172 "customerId": "inst_456", 173 "docId": "10.1234/test-doi", 174 "docType": "Article", 175 "accessType": "Controlled", 176 "accessMethod": "Regular", 177 "accessDenied": false, 178 "sessionId": "sess-hmx1y5gu", 179 "parentId": null, 180 "date": "2024-03-20T14:35:00.000Z", 181 "yop": 2024, 182 "request": true, 183 "investigation": true 184}'`,s=`{ 185 "customerId": "string (Institution Identifier)", 186 "searchType": "Regular | Automated | Federated", 187 "accessMethod": "Regular | TDM", 188 "accessDenied": boolean, 189 "sessionId": "string", 190 "date": "ISO-8601 Timestamp" 191}`,i=`{ 192 "customerId": "string (Institution Identifier)", 193 "docId": "string (DOI, ISBN, etc)", 194 "docType": "Article | Book | Chapter | Dataset", 195 "accessType": "Controlled | Open", 196 "accessMethod": "Regular | TDM", 197 "accessDenied": boolean, 198 "sessionId": "string", 199 "parentId": "string | null (e.g. Journal ISSN/eISSN)", 200 "date": "ISO-8601 Timestamp", 201 "yop": number (Year of Publication), 202 "request": boolean, 203 "investigation": boolean 204}`,r=[{title:"Authentication",icon:be,content:"All requests must include your platform's API Key in the 'X-API-Key' header. You can find your keys in the Publisher Dashboard under 'API Settings'."},{title:"Real-time Processing",icon:me,content:"Events are processed individually in real-time. This allows for immediate visibility in your dashboard and instant metrics validation."},{title:"Data Privacy",icon:_s,content:"usagemetrics.ai only requires aggregated or anonymized event data. Do not send PII (Personally Identifiable Information) like full IP addresses or user names."}];return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsx("main",{className:"flex-grow pt-24 pb-20",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/10 flex items-center justify-center border border-blue-500/20",children:e.jsx(ft,{className:"w-6 h-6 text-blue-600"})}),e.jsx("h1",{className:"text-4xl font-black text-[#0a1628] tracking-tight",children:"Technical Reference"})]}),e.jsx("p",{className:"text-xl text-gray-500 mb-12 max-w-3xl leading-relaxed",children:"Integrate usagemetrics.ai directly into your publishing workflow. Automate COUNTER R5.1 reporting with our ingestion API."})]}),e.jsxs("div",{className:"grid lg:grid-cols-3 gap-12",children:[e.jsx("div",{className:"lg:col-span-1",children:e.jsxs("div",{className:"sticky top-32 space-y-6",children:[e.jsxs("div",{className:"bg-slate-50 rounded-2xl p-6 border border-slate-100",children:[e.jsx("h3",{className:"text-xs font-black text-slate-400 uppercase tracking-widest mb-4",children:"Endpoints"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("a",{href:"#search",className:"flex items-center gap-2 text-sm font-bold text-slate-700 hover:text-blue-600 transition-colors",children:[e.jsx(xt,{className:"w-4 h-4"})," POST /activity/search"]}),e.jsxs("a",{href:"#document",className:"flex items-center gap-2 text-sm font-bold text-slate-700 hover:text-blue-600 transition-colors",children:[e.jsx(ye,{className:"w-4 h-4"})," POST /activity/document"]}),e.jsxs("a",{href:"#sushi",className:"flex items-center gap-2 text-sm font-bold text-slate-700 hover:text-blue-600 transition-colors",children:[e.jsx(st,{className:"w-4 h-4"})," GET /sushi/r51/reports"]})]})]}),e.jsxs("div",{className:"bg-blue-600 rounded-2xl p-6 text-white shadow-xl shadow-blue-900/20",children:[e.jsx("h3",{className:"font-bold mb-2",children:"Need a custom client?"}),e.jsx("p",{className:"text-xs text-blue-100 mb-4 opacity-80",children:"We provide SDKs for Python, Node.js, and Go for pilot partners."}),e.jsx(A,{variant:"secondary",size:"sm",className:"w-full font-bold",onClick:()=>window.open("https://calendly.com/usagemetrics","_blank"),children:"Request SDK Access"})]})]})}),e.jsxs("div",{className:"lg:col-span-2 space-y-16",children:[e.jsx("section",{className:"grid sm:grid-cols-3 gap-4",children:r.map(n=>e.jsxs("div",{className:"p-4 rounded-xl border border-slate-100 bg-white hover:border-blue-100 transition-all",children:[e.jsx(n.icon,{className:"w-5 h-5 text-blue-500 mb-3"}),e.jsx("h4",{className:"text-sm font-bold text-slate-800 mb-1",children:n.title}),e.jsx("p",{className:"text-[11px] text-slate-500 leading-relaxed",children:n.content})]},n.title))}),e.jsxs("section",{id:"search",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"px-2 py-0.5 bg-emerald-100 text-emerald-700 text-[10px] font-bold rounded uppercase",children:"POST"}),e.jsx("h2",{className:"text-2xl font-bold text-[#0a1628]",children:"Search Activity"})]}),e.jsx("p",{className:"text-gray-600 mb-6 leading-relaxed",children:"Send search event data to be aggregated into COUNTER reports. Our engine automatically filters AI and bot traffic based on behavioral signatures."}),e.jsx("h3",{className:"text-sm font-bold text-slate-800 mb-3",children:"cURL Example"}
204),e.jsx(Ee,{code:t,language:"bash"}),e.jsx("h3",{className:"text-sm font-bold text-slate-800 mt-8 mb-3",children:"Payload Structure"}),e.jsx(Ee,{code:s,language:"json"})]}),e.jsxs("section",{id:"document",className:"pt-8 border-t border-slate-100",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"px-2 py-0.5 bg-emerald-100 text-emerald-700 text-[10px] font-bold rounded uppercase",children:"POST"}),e.jsx("h2",{className:"text-2xl font-bold text-[#0a1628]",children:"Document Activity"})]}),e.jsxs("p",{className:"text-gray-600 mb-6 leading-relaxed",children:["Track investigations and requests for specific documents (articles, books, chapters). activity classification is derived from the ",e.jsx("code",{children:"request"})," and ",e.jsx("code",{children:"investigation"})," flags."]}),e.jsx("h3",{className:"text-sm font-bold text-slate-800 mb-3",children:"cURL Example"}),e.jsx(Ee,{code:a,language:"bash"}),e.jsx("h3",{className:"text-sm font-bold text-slate-800 mt-8 mb-3",children:"Payload Structure"}),e.jsx(Ee,{code:i,language:"json"}),e.jsxs("div",{className:"bg-blue-50 border border-blue-100 rounded-xl p-6 mt-8",children:[e.jsxs("h4",{className:"text-sm font-bold text-blue-800 mb-2 flex items-center gap-2",children:[e.jsx(As,{className:"w-4 h-4"})," Usage Metric Mapping"]}),e.jsxs("div",{className:"text-xs text-blue-700 leading-relaxed space-y-3",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"investigation (true):"})," Maps to ",e.jsx("em",{children:"Total_Item_Investigations"}),". Triggers whenever a user explores a document's metadata or full-text."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"request (true):"})," Maps to ",e.jsx("em",{children:"Total_Item_Requests"}),". Triggers specifically for full-text downloads or HTML views."]}),e.jsxs("p",{className:"bg-white/50 p-3 rounded border border-blue-200",children:[e.jsx("strong",{children:"Note:"})," Set ",e.jsx("code",{children:"accessDenied"})," to ",e.jsx("code",{children:"true"})," to track ",e.jsx("em",{children:"No_License"})," or ",e.jsx("em",{children:"Limit_Exceeded"})," events."]})]})]})]}),e.jsxs("section",{id:"sushi",className:"pt-8 border-t border-slate-100",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-700 text-[10px] font-bold rounded uppercase",children:"GET"}),e.jsx("h2",{className:"text-2xl font-bold text-[#0a1628]",children:"SUSHI Harvest Endpoint"})]}),e.jsx("p",{className:"text-gray-600 mb-6 leading-relaxed",children:"Reporting is delivered via standard SUSHI API endpoints. Libraries and tools can harvest your reports using these paths."}),e.jsx("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200 font-mono text-xs text-slate-600",children:"https://www.usagemetrics.ai/api/sushi/r51/reports/{report_id}"}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[["TR_J1","TR_J3","DR_D1","PR_P1"].map(n=>e.jsx("span",{className:"px-2 py-1 bg-white border border-slate-200 rounded text-[10px] font-mono font-bold text-slate-400 uppercase",children:n},n)),e.jsx("span",{className:"text-[10px] text-slate-400 font-medium flex items-center italic ml-2",children:"+ All standard R5.1 views"})]})]})]})]})]})}),e.jsx(H,{})]})}function Zt(){const[t,a]=o.useState(""),[s,i]=o.useState(""),[r,n]=o.useState(""),[c,d]=o.useState(!1),[u,b]=o.useState(!1),m=async l=>{l.preventDefault(),d(!0);try{await F.submit_waitlist({email:t,organization:s,role:r,program_type:"pilot"}),b(!0),a(""),i(""),n(""),I.success("¡Solicitud enviada! Nos pondremos en contacto pronto.")}catch{I.error("Error al enviar. Por favor, inténtelo de nuevo.")}finally{d(!1)}};return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("div",{className:"bg-blue-600 text-white py-2 text-center text-xs font-medium",children:"Versión en español de usagemetrics.ai"}),e.jsx("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] py-16 md:py-24",children:e.jsx("div",{className:"container mx-auto px-6 relative",children:e.jsx("div",{className:"max-w-4xl mx-auto text-center",children:e.jsxs(h,{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-100 text-blue-700 text-xs font-bold mb-6",children:[e.jsx(de,{className:"w-3 h-3"})," Cumplimiento COUNTER R5.1 Automatizado"]}),e.jsxs("h1",{className:"text-4xl md:text-6xl font-black text-[#0a1628] mb-6 leading-tight",children:["Simplifique sus informes de uso ",e.jsx("span",{className:"text-blue-600",children:"Project COUNTER"})]}),e.jsx("p",{className:"text-lg md:text-xl text-gray-500 mb-10 leading-relaxed max-w-2xl mx-auto",children:"Automatice el cumplimiento de R5.1, filtre el tráfico de IA y entregue informes SUSHI precisos sin esfuerzo manual."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[e.jsx(A,{size:"lg",className:"bg-[#0a1628] hover:bg-blue-700 text-white px-8 h-14 text-base font-bold shadow-xl shadow-blue-900/10",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Unirse al Programa Piloto"})}),e.jsx(A,{variant:"outline",size:"lg",className:"px-8 h-14 text-base font-bold border-2 border-slate-200 text-slate-600 hover:bg-slate-50 transition-all",asChild:!0,children:e.jsx(v,{to:"/documentation",children:"Ver Documentación API"})})]})]})})})}),e.jsx("div",{className:"bg-white py-8 border-b border-gray-100",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsx(h,{children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-center gap-4 md:gap-8 opacity-80",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-emerald-50 text-emerald-700 rounded-full border border-emerald-100 text-xs font-bold",children:[e.jsx(O,{className:"w-4 h-4"}),"Informes validados por el COUNTER Validator oficial"]}),e.jsx("div",{className:"hidden md:block w-px h-6 bg-gray-200"}),e.jsx("div",{className:"text-xs text-gray-400 font-medium",children:"Confiado por editoriales académicas lÃderes"})]})})})}),e.jsx("section",{className:"py-6 md:py-16 bg-[#f8fafc] border-b border-gray-200",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#9b2c8c] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#9b2c8c]",children:"El DesafÃo"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-[#1a2e5a] mb-4 max-w-3xl",children:"La carga de los informes R5.1 es cada vez mayor"}),e.jsx("p",{className:"text-lg text-gray-600 mb-10 max-w-3xl leading-relaxed",children:"Los estándares de Project COUNTER R5.1 evolucionan y presentan desafÃos para las editoriales académicas:"})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{color:"#0077cc",title:"Errores de procesamiento manual",body:"El procesamiento manual es lento, costoso y propenso a errores que pueden invalidar su auditorÃa COUNTER."},{color:"#9b2c8c",title:"La IA distorsiona sus datos",body:"Los LLMs y bots inflan sus estadÃsticas, haciendo imposible evaluar el impacto humano real de su contenido."},{color:"#0077cc",title:"Estrés de auditorÃa y pérdida de recursos",body:"La auditorÃa anual desvÃa re
204cursos valiosos de su misión editorial. Las APIs poco fiables agravan el problema."}].map(l=>e.jsx(h,{children:e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-7 hover:shadow-md hover:border-[#0077cc] transition-all h-full",children:[e.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mb-4 border-2",style:{borderColor:l.color,backgroundColor:`${l.color}15`},children:e.jsx(ee,{className:"w-5 h-5",style:{color:l.color}})}),e.jsx("h3",{className:"text-base font-bold text-[#1a2e5a] mb-2",children:l.title}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:l.body})]})},l.title))})]})}),e.jsx("section",{id:"pricing",className:"py-16 md:py-24 bg-[#f8fafc] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 text-center",children:[e.jsx("h2",{className:"text-3xl font-black text-[#0a1628] mb-12",children:"Precios transparentes para cada editorial"}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6 max-w-5xl mx-auto",children:[e.jsxs("div",{className:"bg-white p-8 rounded-2xl border border-gray-200",children:[e.jsx("div",{className:"text-xs font-bold text-gray-400 mb-2 uppercase",children:"Starter"}),e.jsxs("div",{className:"text-4xl font-black mb-4",children:["299â¬",e.jsx("span",{className:"text-sm font-normal text-gray-400",children:"/mes"})]}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Para catálogos pequeños (menos de 50 revistas)."}),e.jsx(A,{variant:"outline",className:"w-full",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Empezar"})})]}),e.jsxs("div",{className:"bg-[#0a1628] p-8 rounded-2xl text-white shadow-xl shadow-blue-900/20",children:[e.jsx("div",{className:"text-xs font-bold text-blue-400 mb-2 uppercase",children:"Growth"}),e.jsxs("div",{className:"text-4xl font-black mb-4",children:["599â¬",e.jsx("span",{className:"text-sm font-normal text-blue-300",children:"/mes"})]}),e.jsx("p",{className:"text-sm text-blue-200 mb-6",children:"Ideal para editoriales medianas (50â300 revistas)."}),e.jsx(A,{className:"w-full bg-blue-600 hover:bg-blue-700",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Pedir Demo"})})]}),e.jsxs("div",{className:"bg-white p-8 rounded-2xl border border-gray-200",children:[e.jsx("div",{className:"text-xs font-bold text-gray-400 mb-2 uppercase",children:"Enterprise"}),e.jsx("div",{className:"text-4xl font-black mb-4",children:"Personalizado"}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Volumen ilimitado, soporte dedicado e integraciones a medida."}),e.jsx(A,{variant:"outline",className:"w-full",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Contactar"})})]})]})]})}),e.jsx("section",{id:"pilot",className:"py-16 md:py-24 bg-[#1a2e5a]",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx(h,{children:e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-white mb-4",children:"¿Listo para simplificar sus informes COUNTER R5.1?"}),e.jsx("p",{className:"text-lg text-[#7dd3fc] max-w-2xl mx-auto",children:"Diseñado para editoriales que desean evitar los informes manuales. Ahorre tiempo y prepare sus datos hoy mismo."})]})}),u?e.jsx(h,{children:e.jsxs("div",{className:"bg-white rounded-2xl p-10 text-center shadow-2xl",children:[e.jsx(O,{className:"w-16 h-16 text-[#0077cc] mx-auto mb-4"}),e.jsx("p",{className:"text-xl font-bold text-[#1a2e5a] mb-2",children:"¡Gracias!"}),e.jsx("p",{className:"text-gray-600",children:"Nos pondremos en contacto pronto para programar su demo."})]})}):e.jsx(h,{children:e.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl p-8 md:p-10 shadow-2xl",children:[e.jsx("h3",{className:"text-xl font-bold text-[#1a2e5a] mb-6 text-center",children:"Solicitar una demostración"}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-[#1a2e5a] mb-1.5",children:"Email *"}),e.jsx("input",{type:"email",value:t,onChange:l=>a(l.target.value),required:!0,className:"w-full px-4 py-2.5 border border-gray-300 rounded-md",placeholder:"[email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-[#1a2e5a] mb-1.5",children:"Organización *"}),e.jsx("input",{type:"text",value:s,onChange:l=>i(l.target.value),required:!0,className:"w-full px-4 py-2.5 border border-gray-300 rounded-md",placeholder:"Nombre de la editorial"})]})]}
204),e.jsx("button",{type:"submit",disabled:c,className:"w-full py-3.5 bg-[#1a2e5a] text-white rounded-md font-bold hover:bg-[#0077cc] transition-colors flex items-center justify-center gap-2",children:c?e.jsx($e,{className:"w-4 h-4 animate-spin"}):"Solicitar Demo"})]})})]})})})]}),e.jsx(H,{})]})}function es(){const[t,a]=o.useState(""),[s,i]=o.useState(""),[r,n]=o.useState(""),[c,d]=o.useState(!1),[u,b]=o.useState(!1),m=async l=>{l.preventDefault(),d(!0);try{await F.submit_waitlist({email:t,organization:s,role:r,program_type:"pilot"}),b(!0),a(""),i(""),n(""),I.success("Candidature envoyée ! Nous vous contacterons bientôt.")}catch{I.error("Ãchec de l'envoi. Veuillez réessayer.")}finally{d(!1)}};return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("div",{className:"bg-blue-600 text-white py-2 text-center text-xs font-medium",children:"Version française de usagemetrics.ai"}),e.jsx("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] py-16 md:py-24",children:e.jsx("div",{className:"container mx-auto px-6 relative",children:e.jsx("div",{className:"max-w-4xl mx-auto text-center",children:e.jsxs(h,{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-blue-50 border border-blue-100 text-blue-700 text-xs font-bold mb-6",children:[e.jsx(de,{className:"w-3 h-3"})," Conformité COUNTER R5.1 Automatisée"]}),e.jsxs("h1",{className:"text-4xl md:text-6xl font-black text-[#0a1628] mb-6 leading-tight",children:["Simplifiez vos rapports d'usage ",e.jsx("span",{className:"text-blue-600",children:"Project COUNTER"})]}),e.jsx("p",{className:"text-lg md:text-xl text-gray-500 mb-10 leading-relaxed max-w-2xl mx-auto",children:"Automatisez la conformité R5.1, filtrez le trafic des IA et délivrez des rapports SUSHI précis sans effort manuel."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[e.jsx(A,{size:"lg",className:"bg-[#0a1628] hover:bg-blue-700 text-white px-8 h-14 text-base font-bold shadow-xl shadow-blue-900/10",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Rejoindre le Programme Pilote"})}),e.jsx(A,{variant:"outline",size:"lg",className:"px-8 h-14 text-base font-bold border-2 border-slate-200 text-slate-600 hover:bg-slate-50 transition-all",asChild:!0,children:e.jsx(v,{to:"/documentation",children:"Voir la Documentation API"})})]})]})})})}),e.jsx("div",{className:"bg-white py-8 border-b border-gray-100",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsx(h,{children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-center gap-4 md:gap-8 opacity-80",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-emerald-50 text-emerald-700 rounded-full border border-emerald-100 text-xs font-bold",children:[e.jsx(O,{className:"w-4 h-4"}),"Rapports validés par l'outil officiel COUNTER Validator"]}),e.jsx("div",{className:"hidden md:block w-px h-6 bg-gray-200"}),e.jsx("div",{className:"text-xs text-gray-400 font-medium",children:"Approuvé par nos partenaires éditeurs académiques"})]})})})}),e.jsx("section",{className:"py-6 md:py-16 bg-[#f8fafc] border-b border-gray-200",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#9b2c8c] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#9b2c8c]",children:"Le Défi"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-[#1a2e5a] mb-4 max-w-3xl",children:"La charge des rapports R5.1 devient insupportable"}),e.jsx("p",{className:"text-lg text-gray-600 mb-10 max-w-3xl leading-relaxed",children:"Les normes Project COUNTER R5.1 évoluent sans cesse et présentent des défis majeurs pour les éditeurs académiques :"})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:[{color:"#0077cc",title:"Erreurs de traitement manuel",body:"Le traitement manuel est lent, coûteux et sujet à des erreurs qui peuvent faire échouer votre audit COUNTER."},{color:"#9b2c8c",title:"L'IA fausse vos données",body:"Les LLMs et les bots gonflent vos statistiques, rendant impossible l'évaluation de l'impact humain réel de vos contenus."},{color:"#0077cc",title:"Stress de l'audit et perte de ressources",body:"L'audit annuel détourne des ressources précieuses de votre mission éditoriale. Les APIs non fiables aggravent le problème."}].map(l=>e.jsx(h,{children:e.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-7 hover:shadow-md hover:border-[#0077cc] transition-all h-full",children:[e.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mb-4 border-2",style:{borderColor:l.color,backgroundColor:`${l.color}15`},children:e.jsx(ee,{className:"w-5 h-5",style:{color:l.color}})}),e.jsx("h3",{className:"text-base font-bold text-[#1a2e5a] mb-2",children:l.title}),e.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:l.body})]})},l.title))})]})}),e.jsx("section",{className:"py-16 md:py-24 bg-white border-b border-gray-200",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs(h,{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#0077cc] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#0077cc]",children:"Solution"})]}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-[#1a2e5a] mb-4",children:"usagemetrics.ai â Rapports automatisés, insights réels"})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-10 items-center mt-8",children:[e.jsxs(h,{direction:"left",children:[e.jsx("p",{className:"text-gray-600 leading-relaxed mb-6",children:"usagemetrics.ai est une plateforme SaaS conçue pour aider les éditeurs à automatiser leurs rapports d'usage selon les standards COUNTER R5.1."}),e.jsx("p",{className:"text-gray-600 leading-relaxed",children:"Notre plateforme ingère vos logs bruts, les traite via notre framework de reporting et prépare vos données pour l'audit. Gagnez en confiance sur votre distribution SUSHI."})]}),e.jsx(h,{direction:"right",children:e.jsx("div",{className:"bg-[#f0f7ff] rounded-2xl p-8 border border-[#b8d9f0]",children:[{step:"01",label:"Ingestion des logs bruts"},{step:"02",label:"Filtrage IA & Bots"},{step:"03",label:"Traitement framework R5.1"},{step:"04",label:"Génération de rapports conformes"},{step:"05",label:"Livraison via API SUSHI"}].map(l=>e.jsxs("div",{className:"flex items-center gap-4 py-3 border-b border-[#cce4f7] last:border-0",children:[e.jsx("span",{className:"w-8 h-8 rounded-full bg-[#0077cc] text-white flex items-center justify-center text-xs font-bold flex-shrink-0",children:l.step}),e.jsx("span",{className:"text-[#1a2e5a] font-semibold text-sm",children:l.label})]},l.step))})})]})]})}),e.jsx("section",{id:"pricing",className:"py-16 md:py-24 bg-[#f8fafc] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 text-center",children:[e.jsx("h2",{className:"text-3xl font-black text-[#0a1628] mb-12",children:"Des tarifs transparents pour chaque éditeur"}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6 max-w-5xl mx-auto",children:[e.jsxs("div",{className:"bg-white p-8 rounded-2xl border border-gray-200",children:[e.jsx("div",{className:"text-xs font-bold text-gray-400 mb-2 uppercase",children:"Starter"}),e.jsxs("div",{className:"text-4xl font-black mb-4",children:["299â¬",e.jsx("span",{className:"text-sm font-normal text-gray-400",children:"/mois"})]}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Pour les petits catalogues (moins de 50 revues)."}),e.jsx(A,{variant:"outline",className:"w-full",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Souscrire"})})]}),e.jsxs("div",{className:"bg-[#0a1628] p-8 rounded-2xl text-white shadow-xl shadow-blue-900/20",children:[e.jsx("div",{className:"text-xs font-bold text-blue-400 mb-2 uppercase",children:"Growth"}),e.jsxs("div",{className:"text-4xl font-black mb-4",children:["599â¬",e.jsx("span",{className:"text-sm font-normal text-blue-300",children:"/mois"})]}),e.jsx("p",{className:"text-sm text-blue-200 mb-6",children:"Le choix idéal pour les éditeurs moyens (50â300 revues)."}),e.jsx(A,{className:"w-full bg-blue-600 hover:bg-blue-700",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Demander une démo"})})]}),e.jsxs("div",{className:"bg-white p-8 rounded-2xl border border-gray-200",children:[e.jsx("div",{className:"text-xs font-bold text-gray-400 mb-2 uppercase",children:"Enterprise"}),e.jsx("div",{className:"text-4xl font-black mb-4",children:"Sur devis"}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Volume illimité, support dédié et intégrations sur-mesure."}),e.jsx(A,{variant:"outline",className:"w-full",asChild:!0,children:e.jsx("a",{href:"#pilot",children:"Contactez-nous"})})]})]})]})}),e.jsx("section",{id:"pilot",className:"py-16 md:py-24 bg-[#1a2e5a]",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsx(h,{children:e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold text-white mb-4",children:"Prêt à simplifier vos rapports COUNTER R5.1 ?"}),e.jsx("p",{className:"text-lg text-[#7dd3fc] max-w-2xl mx-auto",children:"Conçu pour les éditeurs qui s
204ouhaitent s'affranchir des rapports manuels. Gagnez du temps et préparez vos données pour demain."})]})}),u?e.jsx(h,{children:e.jsxs("div",{className:"bg-white rounded-2xl p-10 text-center shadow-2xl",children:[e.jsx(O,{className:"w-16 h-16 text-[#0077cc] mx-auto mb-4"}),e.jsx("p",{className:"text-xl font-bold text-[#1a2e5a] mb-2",children:"Merci !"}),e.jsx("p",{className:"text-gray-600",children:"Nous vous contacterons prochainement pour planifier votre démo."})]})}):e.jsx(h,{children:e.jsxs("form",{onSubmit:m,className:"bg-white rounded-2xl p-8 md:p-10 shadow-2xl",children:[e.jsx("h3",{className:"text-xl font-bold text-[#1a2e5a] mb-6 text-center",children:"Demander une démonstration"}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-[#1a2e5a] mb-1.5",children:"Email *"}),e.jsx("input",{type:"email",value:t,onChange:l=>a(l.target.value),required:!0,className:"w-full px-4 py-2.5 border border-gray-300 rounded-md",placeholder:"[email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-semibold text-[#1a2e5a] mb-1.5",children:"Organisation *"}),e.jsx("input",{type:"text",value:s,onChange:l=>i(l.target.value),required:!0,className:"w-full px-4 py-2.5 border border-gray-300 rounded-md",placeholder:"Nom de l'éditeur"})]})]}),e.jsx("button",{type:"submit",disabled:c,className:"w-full py-3.5 bg-[#1a2e5a] text-white rounded-md font-bold hover:bg-[#0077cc] transition-colors flex items-center justify-center gap-2",children:c?e.jsx($e,{className:"w-4 h-4 animate-spin"}):"Demander ma démo aujourd'hui"})]})})]})})})]}),e.jsx(H,{})]})}function ts(){return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(Ve,{title:"Privacy Policy | usagemetrics.ai",description:"usagemetrics.ai Privacy Policy. Learn how we collect, use, and protect your personal data in compliance with GDPR and applicable privacy laws.",canonical:"/privacy"}),e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("section",{className:"bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 py-16 max-w-4xl",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100 border border-gray-200 text-gray-600 text-xs font-semibold mb-5",children:"Legal"}),e.jsx("h1",{className:"text-3xl md:text-4xl font-black text-[#0a1628] mb-3",children:"Privacy Policy"}),e.jsx("p",{className:"text-gray-500",children:"Last updated: January 1, 2025"})]})}),e.jsx("section",{className:"container mx-auto px-6 py-14 max-w-4xl",children:e.jsxs("div",{className:`prose prose-lg prose-gray max-w-none 205 prose-headings:font-black prose-headings:text-[#0a1628] 206 prose-h2:text-2xl prose-h2:mt-10 prose-h2:mb-4 prose-h2:border-b prose-h2:border-gray-100 prose-h2:pb-2 207 prose-h3:text-xl prose-h3:mt-6 prose-h3:mb-2 208 prose-p:text-gray-600 prose-p:leading-relaxed 209 prose-li:text-gray-600 210 prose-a:text-blue-600 211 `,children:[e.jsx("h2",{children:"1. Introduction"}),e.jsxs("p",{children:["usagemetrics.ai (âCompanyâ, âweâ, âourâ, or âusâ) is committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you visit our website ",e.jsx("strong",{children:"usagemetrics.ai"})," or use our usagemetrics.ai platform and services (collectively, the âServicesâ)."]}),e.jsx("p",{children:"Please read this policy carefully. By accessing or using our Services, you agree to the terms of this Privacy Policy."}),e.jsx("h2",{children:"2. Information We Collect"}),e.jsx("h3",{children:"2.1 Information You Provide Directly"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account Information:"})," Name, email address, organization name, and role when you sign up for a demo, pilot program, or account."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Communications:"})," Messages and inquiries you send us via contact forms or email."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Usage Data You Upload:"})," Raw access logs and usage data you provide for COUNTER processing."]})]}),e.jsx("h3",{children:"2.2 Information We Collect Automatically"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Log Data:"})," IP address, browser type, pages visited, time spent, and referring URLs."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cookies and Tracking Technologies:"})," We use essential cookies for authentication and session management, and analytics cookies to understand how our website is used."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Device Information:"})," Device type, operating system, and browser version."]})]}),e.jsx("h2",{children:"3. How We Use Your Information"}),e.jsx("p",{children:"We use the information we collect to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Provide, operate, and improve our Services"}),e.jsx("li",{children:"Process your usage logs and generate COUNTER R5.1 compliant reports"}),e.jsx("li",{children:"Respond to your inquiries and provide customer support"}),e.jsx("li",{children:"Send transactional communications (account updates, report delivery)"}),e.jsx("li",{children:"Send marketing communications, with your consent where required by law"}),e.jsx("li",{children:"Comply with legal obligations and enforce our Terms of Service"}),e.jsx("li",{children:"Detect and prevent fraud or security incidents"})]}),e.jsx("h2",{children:"4. Legal Basis for Processing (GDPR)"}),e.jsx("p",{children:"For users in the European Economic Area (EEA) and United Kingdom, we process personal data on the following legal bases:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Contract Performance:"})," Processing necessary to provide the Services you requested."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legitimate Interests:"})," Analytics, security, and improving our Services."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Consent:"})," Marketing communications and non-essential cookies."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal Obligation:"})," Compliance with applicable law."]})]}),e.jsx("h2",{children:"5. How We Share Your Information"}),e.jsx("p",{children:"We do not sell your personal data. We may share information in the following circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service Providers:"})," Third-party vendors who assist in operating our platform (cloud hosting, email delivery, analytics). These parties are contractually bound to protect your data."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Business Transfers:"})," In connection with a merger, acquisition, or sale of assets, with appropriate notice."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal Requirements:"})," When required by law, court order, or governmental authority."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Safety:"})," To protect the rights, property, or safety of usagemetrics.ai, our users, or the public."]})]}),e.jsx("h2",{children:"6. Data Retention"}),e.jsx("p",{children:"We retain your personal data for as long as necessary to provide the Services and fulfil the purposes outlined in this policy, or as required by law. Usage logs processed for COUNTER reporting are retained for a minimum of two years to support annual audit requirements, unless otherwise agreed in your service contract."}),e.jsx("h2",{children:"7. Data Security"}),e.jsx("p",{children:"We implement industry-standard technical and organizational measures to protect your personal data against unauthorized access, alteration, disclosure, or destruction. These measures include encryption in transit (TLS) and at rest, access controls, and regular security assessments. However, no method of transmission over the internet is 100% secure."}),e.jsx("h2",{children:"8. International Data Transfers"}),e.jsx("p",{children:"If you access our Services from outside the country where our servers are located, your information may be transferred internationally. We ensure appropriate safeguards are in place, including Standard Contractual Clauses (SCCs) approved by the European Commission where applicable."}),e.jsx("h2",{children:"9. Your Rights"}),e.jsx("p",{children:"Depending on your location, you may have the following rights regarding your personal data:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Access:"})," Request a copy of the personal data we hold about you."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Rectification:"})," Request correction of inaccurate or incomplete data."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Erasure:"}
211)," Request deletion of your personal data (âright to be forgottenâ)."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Restriction:"})," Request we limit how we process your data."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Portability:"})," Receive your data in a structured, machine-readable format."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Objection:"})," Object to processing based on legitimate interests or for direct marketing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Withdraw Consent:"})," Where processing is based on consent, withdraw it at any time."]})]}),e.jsxs("p",{children:["To exercise your rights, contact us at ",e.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}),e.jsx("h2",{children:"10. Cookies"}),e.jsx("p",{children:"We use the following categories of cookies:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Essential:"})," Required for the website and platform to function. Cannot be disabled."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Analytics:"})," Help us understand how visitors interact with our site (e.g., page views, session duration). You may opt out via your browser settings."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Marketing:"})," Used to deliver relevant advertisements. Only set with your consent."]})]}),e.jsx("p",{children:"You can manage cookie preferences through your browser settings or our cookie consent manager."}),e.jsx("h2",{children:"11. Third-Party Links"}),e.jsx("p",{children:"Our website may contain links to third-party websites. We are not responsible for the privacy practices or content of those sites. We encourage you to review their privacy policies before providing any personal information."}),e.jsx("h2",{children:"12. Children's Privacy"}),e.jsx("p",{children:"Our Services are not directed to individuals under the age of 16. We do not knowingly collect personal data from children. If you believe we have inadvertently collected such information, please contact us immediately."}),e.jsx("h2",{children:"13. Changes to This Policy"}),e.jsx("p",{children:"We may update this Privacy Policy from time to time. We will notify you of material changes by posting the updated policy on this page with a revised âLast updatedâ date, and by email where required by law. Your continued use of the Services after such changes constitutes your acceptance of the revised policy."}),e.jsx("h2",{children:"14. Contact Us"}),e.jsx("p",{children:"For questions about this Privacy Policy or to exercise your rights, please contact:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Email:"})," ",e.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Address:"})," usagemetrics.ai, [Company Address], [City, Country]"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Data Protection Officer:"})," ",e.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})]})]})]})})]}),e.jsx(H,{})]})}const $=o.forwardRef(({className:t,type:a,...s},i)=>e.jsx("input",{type:a,className:R("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),ref:i,...s}));$.displayName="Input";const nn=ht("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),q=o.forwardRef(({className:t,...a},s)=>e.jsx(Ms,{ref:s,className:R(nn(),t),...a}));q.displayName=Ms.displayName;const ya=dr,jt=o.forwardRef(({className:t,...a},s)=>e.jsx(Fs,{ref:s,className:R("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...a}));jt.displayName=Fs.displayName;const oe=o.forwardRef(({className:t,...a},s)=>e.jsx(Bs,{ref:s,className:R("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...a}));oe.displayName=Bs.displayName;const ce=o.forwardRef(({className:t,...a},s)=>e.jsx(Hs,{ref:s,className:R("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...a}));ce.displayName=Hs.displayName;const X=yr,Z=jr,z=o.forwardRef(({className:t,children:a,...s},i)=>e.jsxs($s,{ref:i,className:R("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...s,children:[a,e.jsx(hr,{asChild:!0,children:e.jsx(ur,{className:"h-4 w-4 opacity-50"})})]}));z.displayName=$s.displayName;const ja=o.forwardRef(({className:t,...a},s)=>e.jsx(Js,{ref:s,className:R("flex cursor-default items-center justify-center py-1",t),...a,children:e.jsx(mr,{})}));ja.displayName=Js.displayName;const va=o.forwardRef(({className:t,...a},s)=>e.jsx(Vs,{ref:s,className:R("flex cursor-default items-center justify-center py-1",t),...a,children:e.jsx(xr,{})}));va.displayName=Vs.displayName;const Y=o.forwardRef(({className:t,children:a,position:s="popper",...i},r)=>e.jsx(pr,{children:e.jsxs(Ws,{ref:r,className:R("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
211de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:s,...i,children:[e.jsx(ja,{}),e.jsx(gr,{className:R("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),e.jsx(va,{})]})}));Y.displayName=Ws.displayName;const ln=o.forwardRef(({className:t,...a},s)=>e.jsx(zs,{ref:s,className:R("px-2 py-1.5 text-sm font-semibold",t),...a}));ln.displayName=zs.displayName;const V=o.forwardRef(({className:t,children:a,...s},i)=>e.jsxs(Ys,{ref:i,className:R("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...s,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(fr,{children:e.jsx(Cs,{className:"h-4 w-4"})})}),e.jsx(br,{children:a})]}));V.displayName=Ys.displayName;const on=o.forwardRef(({className:t,...a},s)=>e.jsx(Gs,{ref:s,className:R("-mx-1 my-1 h-px bg-muted",t),...a}));on.displayName=Gs.displayName;const wa=Rr,cn=Nr,Na=o.forwardRef(({className:t,...a},s)=>e.jsx(Ks,{ref:s,className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a}));Na.displayName=Ks.displayName;const vt=o.forwardRef(({className:t,children:a,...s},i)=>e.jsxs(cn,{children:[e.jsx(Na,{}),e.jsxs(Qs,{ref:i,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...s,children:[a,e.jsxs(vr,{className:"absolute right-4 top-4 roun
211ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(wr,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));vt.displayName=Qs.displayName;const wt=({className:t,...a})=>e.jsx("div",{className:R("flex flex-col space-y-1.5 text-center sm:text-left",t),...a});wt.displayName="DialogHeader";const Nt=({className:t,...a})=>e.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});Nt.displayName="DialogFooter";const Rt=o.forwardRef(({className:t,...a},s)=>e.jsx(Xs,{ref:s,className:R("text-lg font-semibold leading-none tracking-tight",t),...a}));Rt.displayName=Xs.displayName;const dn=o.forwardRef(({className:t,...a},s)=>e.jsx(Zs,{ref:s,className:R("text-sm text-muted-foreground",t),...a}));dn.displayName=Zs.displayName;const Ra=Cr,hn=Tr,Ta=o.forwardRef(({className:t,...a},s)=>e.jsx(ea,{className:R("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a,ref:s}));Ta.displayName=ea.displayName;const Tt=o.forwardRef(({className:t,...a},s)=>e.jsxs(hn,{children:[e.jsx(Ta,{}),e.jsx(ta,{ref:s,className:R("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...a})]}));Tt.displayName=ta.displayName;const Ct=({className:t,...a})=>e.jsx("div",{className:R("flex flex-col space-y-2 text-center sm:text-left",t),...a});Ct.displayName="AlertDialogHeader";const St=({className:t,...a})=>e.jsx("div",{className:R("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});St.displayName="AlertDialogFooter";const kt=o.forwardRef(({className:t,...a},s)=>e.jsx(sa,{ref:s,className:R("text-lg font-semibold",t),...a}));kt.displayName=sa.displayName;const It=o.forwardRef(({className:t,...a},s)=>e.jsx(aa,{ref:s,className:R("text-sm text-muted-foreground",t),...a}));It.displayName=aa.displayName;const _t=o.forwardRef(({className:t,...a},s)=>e.jsx(ra,{ref:s,className:R(yt(),t),...a}));_t.displayName=ra.displayName;const At=o.forwardRef(({className:t,...a},s)=>e.jsx(ia,{ref:s,className:R(yt({variant:"outline"}),"mt-2 sm:mt-0",t),...a}));At.displayName=ia.displayName;function Te({className:t,...a}){return e.jsx("div",{className:R("animate-pulse rounded-md bg-primary/10",t),...a})}function un({institution:t,linkedPlatform:a}){const[s,i]=o.useState(null),r=t.api_key??(a==null?void 0:a.ingestion_api_key)??"MISSING_API_KEY",n=window.location.origin.includes("localhost")?`${window.location.origin}${G}`:`${Se}${G}`,c=[{name:"Members",desc:"List institutions and their customer identifiers.",url:`${n}/sushi/r51/members?customer_id=${t.customer_id}&api_key=${r}`},{name:"Status",desc:"Check the service status and implementation details.",url:`${n}/sushi/r51/status?customer_id=${t.customer_id}&api_key=${r}`},{name:"Report: TR_J1",desc:"Journal Requests Controlled (Monthly).",url:`${n}/sushi/r51/reports/tr_j1?customer_id=${t.customer_id}&api_key=${r}`},{name:"Report: DR_D1",desc:"Database Search & Item Usage (Monthly).",url:`${n}/sushi/r51/reports/dr_d1?customer_id=${t.customer_id}&api_key=${r}`}],d=async(u,b)=>{await navigator.clipboard.writeText(u),i(b),I.success("URL copied to clipboard!"),setTimeout(()=>i(null),2e3)};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-amber-50 border border-amber-100 rounded-lg p-3",children:e.jsxs("p",{className:"text-[10px] text-amber-800 font-medium leading-relaxed",children:[e.jsx("strong",{children:"Note:"}
211)," These endpoints use this institution's unique Customer ID and API Key. Use them to test SUSHI harvesting tools or integrate your library management system."]})}),e.jsx("div",{className:"space-y-3",children:c.map(u=>e.jsxs("div",{className:"border border-gray-100 rounded-lg p-3 bg-gray-50/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{className:"text-[11px] font-bold text-[#0a1628]",children:u.name}),e.jsx("button",{onClick:()=>d(u.url,u.name),className:"text-blue-500 hover:text-blue-700 transition-colors",children:s===u.name?e.jsx(_e,{className:"w-3.5 h-3.5"}):e.jsx(xe,{className:"w-3.5 h-3.5"})})]}),e.jsx("p",{className:"text-[10px] text-gray-500 mb-2",children:u.desc}),e.jsx("div",{className:"bg-white border border-gray-200 rounded px-2 py-1.5 overflow-x-auto",children:e.jsx("code",{className:"text-[9px] font-mono text-blue-600 whitespace-nowrap",children:u.url})})]},u.name))}),!a&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-100 rounded-lg text-red-700",children:[e.jsx(ee,{className:"w-4 h-4"}),e.jsx("p",{className:"text-[10px] font-medium",children:"Institution not linked to a platform. API calls might fail."})]})]})}const mn=[{value:"tr",label:"Title Report (TR)"},{value:"pr",label:"Platform Report (PR)"},{value:"dr",label:"Database Report (DR)"},{value:"tr_b1",label:"Book Requests Controlled (TR_B1)"},{value:"tr_b2",label:"Book Access Denied (TR_B2)"},{value:"tr_b3",label:"Book Usage by Access Type (TR_B3)"},{value:"tr_j1",label:"Journal Requests Controlled (TR_J1)"},{value:"tr_j2",label:"Journal Access Denied (TR_J2)"},{value:"tr_j3",label:"Journal Usage by Access Type (TR_J3)"},{value:"tr_j4",label:"Journal Requests by YOP (TR_J4)"},{value:"dr_d1",label:"Database Search & Item Usage (DR_D1)"},{value:"dr_d2",label:"Database Access Denied (DR_D2)"},{value:"pr_p1",label:"Platform Usage (PR_P1)"}],xn=["All (default)","Total_Item_Requests","Total_Item_Investigations","Unique_Item_Requests","Unique_Item_Investigations","Unique_Title_Requests","Unique_Title_Investigations","No_License","Limit_Exceeded","Searches_Platform"],pn=["All (default)","Journal","Book","Book_Segment","Database","Dataset","Multimedia","Newspaper_or_Newsletter","Other"],gn=["All (default)","Controlled","OA_Gold","OA_Delayed","Other_Free_To_Read"],fn=["All (default)","Regular","TDM"],bn=["All (default)",...Array.from({length:30},(t,a)=>String(new Date().getFullYear()-a))],ss=["#0077cc","#38bdf8","#0a1628","#6366f1","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899"];function yn(){const t=[],a=new Date;for(let s=24;s>=0;s--){const i=new Date(a.getFullYear(),a.getMonth()-s,1),r=`${i.getFullYear()}-${String(i.getMonth()+1).padStart(2,"0")}`,n=i.toLocaleString("default",{month:"short",year:"numeric"});t.push({value:r,label:n})}return t}const as=yn();function jn(){const a=new Date().getFullYear();return{reportType:"tr",dateFrom:`${a}-01`,dateTo:`${a}-12`,metricTypes:"All (default)",dataTypes:"All (default)",accessTypes:"All (default)",accessMethods:"All (default)",yop:"All (default)",excludeMonthlyDetails:!1,includeDataTypes:!1,includeAccessTypes:!0,includeAccessMethods:!0,includeYop:!1}}function vn({institution:t,platforms:a}){const[s,i]=o.useState(jn()),[r,n]=o.useState(null),[c,d]=o.useState(!1),[u,b]=o.useState(!1),[m,l]=o.useState(!1),j=a.find(p=>p.institutions.some(k=>k.customer_id===t.customer_id)),y=o.useCallback(async()=>{d(!0);try{const k=await(await F.get_institution_usage({customerId:t.customer_id,begin_date:s.dateFrom,end_date:s.dateTo,metric_types:s.metricTypes==="All (default)"?void 0:s.metricTypes,access_types:s.accessTypes==="All (default)"?void 0:s.accessTypes,access_methods:s.accessMethods==="All (default)"?void 0:s.accessMethods,data_types:s.dataTypes==="All (default)"?void 0:s.dataTypes})).json();n(k)}catch{I.error("Failed to load usage data.")}finally{d(!1)}},[t.customer_id,s.dateFrom,s.dateTo,s.metricTypes,s.accessTypes,s.accessMethods,s.dataTypes]);o.useEffect(()=>{y()},[y]);const S=async()=>{if(!j){I.error("Institution must be linked to a platform to download SUSHI reports.");return}b(!0);try{const p=t.api_key??j.ingestion_api_key,k=new URLSearchParams({customer_id:t.customer_id,begin_date:s.dateFrom,end_date:s.dateTo,api_key:p});s.metricTypes!=="All (default)"&&k.set("metric_types",s.metricTypes),s.accessTypes!=="All (default)"&&k.set("access_types",s.accessTypes),s.accessMethods!=="All (default)"&&k.set("access_methods",s.accessMethods),s.dataTypes!=="All (default)"&&k.set("data_types",s.dataTypes);const f=`${window.location.origin.includes("localhost")?`${window.location.origin}${G}`:`${Se}${G}`}/sushi/r51/reports/${s.reportType}/tsv?${k}`;window.open(f,"_blank")}finally{b(!1)}},w=async()=>{var p;if(!j){I.error("Institution must be linked to a platform to download SUSHI reports.");return}b(!0);try{const k=t.api_key??j.ingestion_api_key,E=new URLSearchParams({customer_id:t.customer_id,begin_date:s.dateFrom,end_date:s.dateTo,api_key:k});s.metricTypes!=="All (default)"&&E.set("metric_types",s.metricTypes),s.accessTypes!=="All (default)"&&E.set("access_types",s.accessTypes),s.accessMethods!=="All (default)"&&E.set("access_methods",s.accessMethods),s.dataTypes!=="All (default)"&&E.set("data_types",s.dataTypes);const D=`${window.location.origin.includes("localhost")?`${window.location.origin}${G}`:`${Se}${G}`}/sushi/r51/reports/${s.reportType}?${E}`,x=await fetch(D);if(!x.ok){const he=await x.json().catch(()=>({}));I.error(`Failed to download: ${((p=he==null?void 0:he.detail)==null?void 0:p.Message)??x.statusText}`);return}const P=await x.blob(),M=URL.createObjectURL(P),L=document.createElement("a");L.href=M,L.download=`${s.reportType}_${t.customer_id}_${s.dateFrom}_${s.dateTo}.json`,document.body.appendChild(L),L.click(),L.remove(),URL.revokeObjectURL(M)}catch(k){I.error(`Download failed: ${String(k)}`)}finally{b(!1)}},_=async()=>{await navigator.clipboard.writeText(t.api_key??""),l(!0),I.success("SUSHI API key copied!"),setTimeout(()=>l(!1),2e3)},C=(r==null?void 0:r.metrics.map(p=>({name:p.metric_type.replace(/_/g," "),value:p.count})))??[],g=p=>k=>i(E=>({...E,[p]:k}));return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-blue-50 border border-blue-100 rounded-lg px-3 py-2",children:[e.jsx(at,{className:"w-3.5 h-3.5 text-blue-500 shrink-0"}),e.jsx("span",{className:"text-[10px] font-mono text-blue-700 truncate flex-1",children:t.api_key??"â"}),e.jsx("button",{onClick:_,className:"shrink-0 text-blue-400 hover:text-blue-700",children:m?e.jsx(_e,{className:"w-3.5 h-3.5 text-green-500"}):e.jsx(xe,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-bold text-[#0a1628]",children:"Mandatory elements"}),e.jsx("span",{className:"text-xs text-blue-500",children:"Selectâ¦"})]}),e.jsx(Oe,{label:"Report",children:e.jsxs(X,{value:s.reportType,onValueChange:g("reportType"),children:[e.jsx(z,{className:"h-8 text-xs border-blue-200 focus:ring-blue-300",children:e.jsx(Z,{})}),e.jsx(Y,{children:mn.map(p=>e.jsx(V,{value:p.value,className:"text-xs",children:p.label},p.value))})]})}),e.jsx(Oe,{label:"Date from",children:e.jsxs(X,{value:s.dateFrom,onValueChange:g("dateFrom"),children:[e.jsx(z,{className:"h-8 text-xs border-blue-200 focus:ring-blue-300",children:e.jsx(Z,{})}),e.jsx(Y,{children:as.map(p=>e.jsx(V,{value:p.value,className:"text-xs",children:p.label},p.value))})]})}),e.jsx(Oe,{label:"Date to",children:e.jsxs(X,{value:s.dateTo,onValueChange:g("dateTo"),children:[e.jsx(z,{className:"h-8 text-xs border-blue-200 focus:ring-blue-300",children:e.jsx(Z,{})}),e.jsx(Y,{children:as.map(p=>e.jsx(V,{value:p.value,className:"text-xs",children:p.label},p.value))})]})}),e.jsx(Oe,{label:"Metric types",children:e.jsxs(X,{value:s.metricTypes,onValueChange:g("metricTypes"),children:[e.jsx(z,{className:"h-8 text-xs border-blue-200 focus:ring-blue-300",children:e.jsx(Z,{})}),e.jsx(Y,{children:xn.map(p=>e.jsx(V,{value:p,className:"text-xs",children:p},p))})]})})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-bold text-[#0a1628]",children:"Additional elements"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"text-xs text-blue-500",children:"Selectâ¦"}),e.jsx("span",{className:"text-xs text-gray-400",children:"Include"})]})]}),e.jsx(De,{label:"Data types",options:pn,value:s.dataTypes,onChange:g("dataTypes"),include:s.includeDataTypes,onInclude:p=>g("includeDataTypes")(p)}),e.jsx(De,{label:"Access types",options:gn,value:s.accessTypes,onChange:g("accessTypes"),include:s.includeAccessTypes,onInclude:p=>g("includeAccessTypes")(p)}),e.jsx(De,{label:"Access methods",options:fn,value:s.accessMethods,onChange:g("accessMethods"),include:s.includeAccessMethods,onInclude:p=>g("includeAccessMethods")(p)}),e.jsx(De,{label:"YOP",options:bn,value:s.yop,onChange:g("yop"),include:s.includeYop,onInclude:p=>g("includeYop")(p)})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs font-semibold text-[#0a1628]",children:"Exclude monthly details"}),e.jsx(Ca,{active:s.excludeMonthlyDetails,onToggle:()=>g("excludeMonthlyDetails")(!s.excludeMonthlyDetails)})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(A,{className:"flex-1 bg-[#0a1628] hover:bg-blue-600 gap-2 text-xs",size:"sm",onClick:S,disabled:u||!j,children:[e.jsx(Lt,{className:"w-3.5 h-3.5"}),j?"Download TSV Report":"Link to a platform to download"]}),e.jsxs(A,{className:"flex-1 bg-white border border-[#0a1628] text-[#0a1628] hover:bg-blue-50 gap-2 text-xs",variant:"outline",size:"sm",onClick:w,disabled:u||!j,children:[e.jsx(Lt,{className:"w-3.5 h-3.5"}),j?"Download JSON Report":"Link to a platform to download"]})]}),e.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("p",{className:"text-xs font-bold text-[#0a1628] flex items-center gap-1.5",children:[e.jsx(Mt,{className:"w-3.5 h-3.5 text-blue-500"})," Usage Breakdown"]}),r&&e.jsxs("span",{className:"text-xs text-gray-400",children:[r.begin_date," â ",r.end_date," · ",e.jsx("strong",{children:r.total.toLocaleStr
211ing()})," total"]})]}),c?e.jsxs("div",{className:"space-y-2",children:[e.jsx(Te,{className:"h-4 w-full"}),e.jsx(Te,{className:"h-32 w-full"})]}):C.length>0?e.jsx(Ps,{width:"100%",height:200,children:e.jsxs(Sr,{children:[e.jsx(kr,{data:C,cx:"50%",cy:"50%",outerRadius:70,dataKey:"value",label:({name:p,percent:k})=>`${(k*100).toFixed(0)}%`,labelLine:!1,children:C.map((p,k)=>e.jsx(Ir,{fill:ss[k%ss.length]},k))}),e.jsx(Us,{formatter:(p,k)=>[p.toLocaleString(),k],contentStyle:{fontSize:11}}),e.jsx(Es,{iconSize:8,formatter:p=>e.jsx("span",{className:"text-[10px] text-gray-600",children:p})})]})}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-gray-400",children:[e.jsx(Mt,{className:"w-8 h-8 mb-2 opacity-30"}),e.jsx("p",{className:"text-xs",children:r!==null?"No usage data for this period and filters.":"Select filters and apply to view usage."})]})]})]})}function Oe({label:t,children:a}){return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-[#0a5599] w-24 shrink-0",children:t}),e.jsx("div",{className:"flex-1",children:a})]})}function De({label:t,options:a,value:s,onChange:i,include:r,onInclude:n}){return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xs text-[#0a5599] w-24 shrink-0",children:t}),e.jsx("div",{className:"flex-1",children:e.jsxs(X,{value:s,onValueChange:i,children:[e.jsx(z,{className:"h-8 text-xs border-gray-200 focus:ring-blue-300",children:e.jsx(Z,{})}),e.jsx(Y,{children:a.map(c=>e.jsx(V,{value:c,className:"text-xs",children:c},c))})]})}),e.jsx(Ca,{active:r,onToggle:()=>n(!r)})]})}function Ca({active:t,onToggle:a}){return e.jsx("button",{onClick:a,className:`w-6 h-6 rounded border text-xs font-bold flex items-center justify-center transition-colors ${t?"bg-blue-500 border-blue-500 text-white":"bg-white border-gray-300 text-transparent"}`,title:t?"Included":"Not included",children:"Ã"})}function wn({institution:t,platforms:a,onEdit:s,onDelete:i}){const r=a.filter(n=>n.institutions.some(c=>c.customer_id===t.customer_id));return e.jsxs(ya,{defaultValue:"reports",className:"h-full flex flex-col",children:[e.jsxs(jt,{className:"bg-white border border-gray-200 h-9 shrink-0 w-full",children:[e.jsxs(oe,{value:"reports",className:"gap-1.5 flex-1 text-xs",children:[e.jsx(ye,{className:"w-3.5 h-3.5"})," Report Builder"]}),e.jsxs(oe,{value:"api",className:"gap-1.5 flex-1 text-xs",children:[e.jsx(de,{className:"w-3.5 h-3.5"})," API"]}),e.jsxs(oe,{value:"info",className:"gap-1.5 flex-1 text-xs",children:[e.jsx(re,{className:"w-3.5 h-3.5"})," Details"]})]}),e.jsx(ce,{value:"reports",className:"flex-1 overflow-y-auto mt-3 pr-1",children:e.jsx(vn,{institution:t,platforms:a})}),e.jsx(ce,{value:"api",className:"flex-1 overflow-y-auto mt-3 pr-1",children:e.jsx(un,{institution:t,linkedPlatform:r[0]})}),e.jsx(ce,{value:"info",className:"flex-1 overflow-y-auto mt-3 pr-1",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs font-medium text-gray-500",children:"Customer ID"}),e.jsx("p",{className:"text-xs font-mono text-gray-700",children:t.customer_id})]}),t.isni&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500",children:"ISNI"}),e.jsx("p",{className:"text-xs font-mono text-gray-700",children:t.isni})]}),t.ror&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500",children:"ROR"}),e.jsx("p",{className:"text-xs font-mono text-gray-700",children:t.ror})]}),t.isil&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500",children:"ISIL"}),e.jsx("p",{className:"text-xs font-mono text-gray-700",children:t.isil})]}),t.oclc&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500",children:"OCLC"}),e.jsx("p",{className:"text-xs font-mono text-gray-700",children:t.oclc})]}),t.notes&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500",children:"Notes"}),e.jsx("p",{className:"text-xs text-gray-700",children:t.notes})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 mb-1.5",children:"Linked Platforms"}),r.length===0?e.jsx("p",{className:"text-xs text-gray-400 italic",children:"Not linked to any platform."}):e.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map(n=>e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] bg-blue-50 text-blue-700 px-1.5 py-0.5 rounded font-medium",children:[e.jsx(de,{className:"w-2.5 h-2.5"})," ",n.name]},n.id))})]}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[e.jsxs(A,{size:"sm",variant:"outline",className:"gap-1 text-xs",onClick:s,children:[e.jsx(la,{className:"w-3.5 h-3.5"})," Edit"]}),e.jsxs(A,{size:"sm",variant:"outline",className:"gap-1 text-xs text-red-500 hover:text-red-700 border-red-200 hover:border-red-400",onClick:i,children:[e.jsx(oa,{className:"w-3.5 h-3.5"})," Delete"]})]})]})})]})}function Nn({institutions:t,platforms:a,onRefresh:s,initialSelectedId:i,onInitialSelectedConsumed:r}){const[n,c]=o.useState(""),[d,u]=o.useState(null),[b,m]=o.useState(!1),[l,j]=o.useState(null),[y,S]=o.useState(null),[w,_]=o.useState(!1),[C,g]=o.useState({name:"",isni:"",ror:"",isil:"",oclc:"",notes:""});o.useEffect(()=>{if(d){const x=t.find(P=>P.customer_id===d.customer_id);x&&u(x)}},[t]),o.useEffect(()=>{if(i){const x=t.find(P=>P.customer_id===i);x&&(u(x),r==null||r())}},[i,t]);const p=t.filter(x=>x.name.toLowerCase().includes(n.toLowerCase())),k=()=>{g({name:"",isni:"",ror:"",isil:"",oclc:"",notes:""}),j(null),m(!0)},E=x=>{g({name:x.name,isni:x.isni??"",ror:x.ror??"",isil:x.isil??"",oclc:x.oclc??"",notes:x.notes??""}),j(x),m(!0)},f=async()=>{var x,P;if(!C.name.trim()){I.error("Name is required.");return}_(!0);try{const M={name:C.name,isni:C.isni||null,ror:C.ror||null,isil:C.isil||null,oclc:C.oclc||null,notes:C.notes||null};l?(await F.update_institution({customerId:l.customer_id},M),I.success("Institution updated.")):(await F.create_institution(M),I.success("Institution created!")),m(!1),await s()}catch(M){const L=await((P=(x=M==null?void 0:M.response)==null?void 0:x.json)==null?void 0:P.call(x).catch(()=>null));I.error((L==null?void 0:L.detail)??"An error occurred.")}finally{_(!1)}},D=async()=>{var x,P;if(y)try{await F.delete_institution({customerId:y.customer_id}),I.success(`"${y.name}
211" deleted.`),(d==null?void 0:d.customer_id)===y.customer_id&&u(null),S(null),await s()}catch(M){const L=await((P=(x=M==null?void 0:M.response)==null?void 0:x.json)==null?void 0:P.call(x).catch(()=>null));I.error((L==null?void 0:L.detail)??"Failed to delete.")}};return e.jsxs("div",{className:"flex gap-4 h-full min-h-[500px]",children:[e.jsxs("div",{className:`flex flex-col gap-3 shrink-0 ${d?"w-72":"flex-1"}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(xt,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-400"}),e.jsx($,{value:n,onChange:x=>c(x.target.value),placeholder:"Filter by nameâ¦",className:"pl-8 h-8 text-xs"}),n&&e.jsx("button",{onClick:()=>c(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-700",children:e.jsx(ee,{className:"w-3.5 h-3.5"})})]}),e.jsxs(A,{onClick:k,className:"bg-[#0a1628] hover:bg-blue-600 gap-1 h-8",size:"sm",children:[e.jsx(na,{className:"w-3.5 h-3.5"}),!d&&e.jsx("span",{className:"text-xs",children:"New"})]})]}),e.jsxs("p",{className:"text-xs text-gray-400",children:[p.length," of ",t.length," institution",t.length!==1?"s":""]}),p.length===0?e.jsxs("div",{className:"text-center py-12 text-gray-400 border border-dashed border-gray-200 rounded-xl bg-white",children:[e.jsx(re,{className:"w-7 h-7 mx-auto mb-2 opacity-30"}),e.jsx("p",{className:"text-xs",children:t.length===0?"No institutions yet.":"No match for filter."})]}):e.jsx("div",{className:"space-y-1.5 overflow-y-auto",children:p.map(x=>{const P=(d==null?void 0:d.customer_id)===x.customer_id,M=a.filter(L=>L.institutions.some(he=>he.customer_id===x.customer_id));return e.jsx("div",{onClick:()=>u(P?null:x),className:`cursor-pointer rounded-lg border px-3 py-2.5 transition-all ${P?"border-blue-400 bg-blue-50 shadow-sm":"border-gray-200 bg-white hover:border-blue-200 hover:bg-gray-50"}`,children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(re,{className:`w-3.5 h-3.5 shrink-0 mt-0.5 ${P?"text-blue-500":"text-gray-400"}`}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:`text-xs font-semibold truncate ${P?"text-blue-700":"text-[#0a1628]"}`,children:x.name}),e.jsx("p",{className:"text-[10px] font-mono text-gray-400 truncate",children:x.customer_id}),M.length>0&&!d&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:M.map(L=>e.jsx("span",{className:"text-[9px] bg-blue-50 text-blue-600 px-1 py-0.5 rounded font-medium",children:L.name},L.id))})]}),P&&e.jsx(ee,{className:"w-3 h-3 text-blue-400 shrink-0 mt-0.5"})]})},x.customer_id)})})]}),d&&e.jsxs("div",{className:"flex-1 border border-gray-200 rounded-xl bg-white p-4 overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4 pb-3 border-b border-gray-100",children:[e.jsx(re,{className:"w-4 h-4 text-blue-500 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-semibold text-sm text-[#0a1628] truncate",children:d.name}),e.jsx("p",{className:"text-[10px] font-mono text-gray-400",children:d.customer_id})]}),e.jsx("button",{onClick:()=>u(null),className:"text-gray-400 hover:text-gray-700 shrink-0",children:e.jsx(ee,{className:"w-4 h-4"})})]}),e.jsx(wn,{institution:d,platforms:a,onEdit:()=>E(d),onDelete:()=>S(d)})]}),e.jsx(wa,{open:b,onOpenChange:m,children:e.jsxs(vt,{className:"max-w-md",children:[e.jsx(wt,{children:e.jsx(Rt,{children:l?"Edit Institution":"New Institution"})}),e.jsxs("div",{className:"space-y-3 py-2",children:[e.jsxs("div",{children:[e.jsx(q,{htmlFor:"iname",children:"Name *"}),e.jsx($,{id:"iname",value:C.name,onChange:x=>g({...C,name:x.target.value}),placeholder:"e.g. University Library",className:"mt-1"})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:["isni","ror","isil","oclc"].map(x=>e.jsxs("div",{children:[e.jsx(q,{htmlFor:`i${x}`,children:x.toUpperCase()}),e.jsx($,{id:`i${x}`,value:C[x],onChange:P=>g({...C,[x]:P.target.value}),className:"mt-1 font-mono text-xs"})]},x))}),e.jsxs("div",{children:[e.jsx(q,{htmlFor:"inotes",children:"Notes"}),e.jsx($,{id:"inotes",value:C.notes,onChange:x=>g({...C,notes:x.target.value}),placeholder:"Internal notesâ¦",className:"mt-1"})]})]}),e.jsxs(Nt,{children:[e.jsx(A,{variant:"outline",onClick:()=>m(!1),children:"Cancel"}),e.jsx(A,{onClick:f,disabled:w,className:"bg-[#0a1628] hover:bg-blue-600",children:w?"Savingâ¦":l?"Update":"Create"})]})]})}),e.jsx(Ra,{open:!!y,onOpenChange:x=>!x&&S(null),children:e.jsxs(Tt,{children:[e.jsxs(Ct,{children:[e.jsxs(kt,{children:['Delete "',y==null?void 0:y.name,'"?']}),e.jsx(It,{children:"This institution will be unlinked from all platforms."})]}),e.jsxs(St,{children:[e.jsx(At,{children:"Cancel"}),e.jsx(_t,{onClick:D,className:"bg-red-600 hover:bg-red-700",children:"Delete"})]})]})})]})}const Q=o.forwardRef(({className:t,...a},s)=>e.jsx("div",{ref:s,className:R("rounded-xl border bg-card text-card-foreground shadow",t),...a}));
211Q.displayName="Card";const Me=o.forwardRef(({className:t,...a},s)=>e.jsx("div",{ref:s,className:R("flex flex-col space-y-1.5 p-6",t),...a}));Me.displayName="CardHeader";const Fe=o.forwardRef(({className:t,...a},s)=>e.jsx("h3",{ref:s,className:R("font-semibold leading-none tracking-tight",t),...a}));Fe.displayName="CardTitle";const Rn=o.forwardRef(({className:t,...a},s)=>e.jsx("p",{ref:s,className:R("text-sm text-muted-foreground",t),...a}));Rn.displayName="CardDescription";const ae=o.forwardRef(({className:t,...a},s)=>e.jsx("div",{ref:s,className:R("p-6 pt-0",t),...a}));ae.displayName="CardContent";const Tn=o.forwardRef(({className:t,...a},s)=>e.jsx("div",{ref:s,className:R("flex items-center p-6 pt-0",t),...a}));Tn.displayName="CardFooter";const Cn=ht("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ge({className:t,variant:a,...s}){return e.jsx("div",{className:R(Cn({variant:a}),t),...s})}const Sa=o.forwardRef(({className:t,orientation:a="horizontal",decorative:s=!0,...i},r)=>e.jsx(ca,{ref:r,decorative:s,orientation:a,className:R("shrink-0 bg-border",a==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...i}));Sa.displayName=ca.displayName;const ka=o.forwardRef(({className:t,...a},s)=>e.jsx(da,{className:R("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...a,ref:s,children:e.jsx(_r,{className:R("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));ka.displayName=da.displayName;const Sn=["Article","Audiovisual","Book","Book_Segment","Conference","Conference_Item","Database_Aggregated","Database_AI","Database_Full","Database_Full_Item","Dataset","Image","Interactive_Resource","Journal","Multimedia","News_Item","Newspaper_or_Newsletter","Other","Patent","Platform","Reference_Item","Reference_Work","Report","Software","Sound","Standard","Thesis_or_Dissertation","Unspecified"],kn=["Controlled","Open","Free_To_Read"],In=["Regular","TDM"];function _n({platforms:t,institutions:a,onNavigateToInstitution:s}){const[i,r]=o.useState(""),[n,c]=o.useState(""),[d,u]=o.useState("document"),[b,m]=o.useState(new Date().toISOString().slice(0,16)),[l,j]=o.useState("Controlled"),[y,S]=o.useState("Regular"),[w,_]=o.useState("Article"),[C,g]=o.useState("10.1234/test-doi"),[p,k]=o.useState(`sess-${Math.random().toString(36).slice(2,10)}`),[E,f]=o.useState(""),[D,x]=o.useState(String(new Date().getFullYear())),[P,M]=o.useState("request"),[L,he]=o.useState(!1),[Pt,Ut]=o.useState(!1),[se,We]=o.useState(null),[Et,_a]=o.useState(!1),K=t.find(N=>N.id===i)??null,Ot=K?a.filter(N=>K.institutions.some(Ae=>Ae.customer_id===N.customer_id)):[],Dt=()=>window.location.origin.includes("localhost")?`${window.location.origin}${G}`:`${Se}${G}`,Aa=async()=>{if(!K||!n)return;Ut(!0),We(null);const N=K.ingestion_api_key,Ae=Dt();try{let je,ze;d==="document"?(je=`${Ae}/api/usages/document-activities?api_key=${encodeURIComponent(N)}`,ze={customerId:n,docId:C,docType:w,accessType:l,accessMethod:y,accessDenied:L,sessionId:p,parentId:E||null,date:new Date(b).toISOString(),yop:Number(D)||0,request:P==="request",investigation:!0}):(je=`${Ae}/api/usages/search-activities?api_key=${encodeURIComponent(N)}`,ze={customerId:n,date:new Date(b).toISOString(),accessType:l,accessMethod:y});const Pe=await fetch(je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ze)});let Ye;try{Ye=await Pe.json()}catch{Ye=await Pe.text()}We({ok:Pe.ok,status:Pe.status,body:Ye})}catch(je){We({ok:!1,status:0,body:{error:String(je)}})}finally{Ut(!1)}},qt=!!K&&!!n;return e.jsxs("div",{className:"space-y-5",children:[e.jsx(Q,{className:"border border-gray-200 shadow-sm",children:e.jsxs(Me,{className:"pb-2",children:[e.jsxs(Fe,{className:"text-sm font-semibold text-gray-700 flex items-center gap-2",children:[e.jsx(me,{className:"w-4 h-4 text-blue-500"}
211),"Ingestion Event Simulator"]}),e.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:"Send a test ingestion event directly from the dashboard to validate your API key and institution setup."})]})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(Q,{className:"border border-gray-200 shadow-sm",children:e.jsxs(ae,{className:"pt-4 space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Platform"}),e.jsxs(X,{value:i,onValueChange:N=>{r(N),c("")},children:[e.jsx(z,{className:"h-9 text-sm",children:e.jsx(Z,{placeholder:"Select a platformâ¦"})}),e.jsx(Y,{children:t.map(N=>e.jsx(V,{value:N.id,children:N.name},N.id))})]}),K&&e.jsxs("p",{className:"text-[11px] text-gray-400 font-mono truncate",children:["API key: ",K.ingestion_api_key]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Institution (customerId)"}),e.jsxs(X,{value:n,onValueChange:c,disabled:!K,children:[e.jsx(z,{className:"h-9 text-sm",children:e.jsx(Z,{placeholder:K?"Select an institutionâ¦":"Select a platform first"})}),e.jsx(Y,{children:Ot.length===0?e.jsx(V,{value:"__none__",disabled:!0,children:"No linked institutions"}):Ot.map(N=>e.jsxs(V,{value:N.customer_id,children:[N.name," ",e.jsxs("span",{className:"text-gray-400 text-xs ml-1",children:["(",N.customer_id,")"]})]},N.customer_id))})]})]})]})}),e.jsx(Q,{className:"border border-gray-200 shadow-sm",children:e.jsxs(ae,{className:"pt-4 space-y-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Event Type"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>u("document"),className:`flex-1 py-2 px-3 rounded-lg text-sm font-semibold border transition-all ${d==="document"?"bg-[#0a1628] text-white border-[#0a1628]":"bg-white text-gray-600 border-gray-200 hover:border-gray-400"}`,children:"Document Activity"}),e.jsx("button",{onClick:()=>u("search"),className:`flex-1 py-2 px-3 rounded-lg text-sm font-semibold border transition-all ${d==="search"?"bg-[#0a1628] text-white border-[#0a1628]":"bg-white text-gray-600 border-gray-200 hover:border-gray-400"}`,children:"Search Activity"})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Date & Time"}),e.jsx($,{type:"datetime-local",value:b,onChange:N=>m(N.target.value),className:"h-9 text-sm"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Access Type"}),e.jsxs(X,{value:l,onValueChange:j,children:[e.jsx(z,{className:"h-9 text-sm",children:e.jsx(Z,{})}),e.jsx(Y,{children:kn.map(N=>e.jsx(V,{value:N,children:N},N))})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Access Method"}),e.jsxs(X,{value:y,onValueChange:S,children:[e.jsx(z,{className:"h-9 text-sm",children:e.jsx(Z,{})}),e.jsx(Y,{children:In.map(N=>e.jsx(V,{value:N,children:N},N))})]})]})]}),d==="document"&&e.jsxs(e.Fragment,{children:[e.jsx(Sa,{}),e.jsx("p",{className:"text-[11px] font-bold text-gray-400 uppercase tracking-wide",children:"Document fields"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1.5 col-span-2",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Data Type"}),e.jsxs(X,{value:w,onValueChange:_,children:[e.jsx(z,{className:"h-9 text-sm",children:e.jsx(Z,{})}),e.jsx(Y,{className:"max-h-64",children:Sn.map(N=>e.jsx(V,{value:N,children:N},N))})]})]}),e.jsxs("div",{className:"space-y-1.5 col-span-2",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Document ID (DOI)"}),e.jsx($,{value:C,onChange:N=>g(N.target.value),placeholder:"10.1234/example-doi",className:"h-9 text-sm font-mono"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Session ID"}),e.jsx($,{value:p,onChange:N=>k(N.target.value),placeholder:"sess-abc123",className:"h-9 text-sm font-mono"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Parent ID (ISSN)"}),e.jsx($,{value:E,onChange:N=>f(N.target.value),placeholder:"optional",className:"h-9 text-sm font-mono"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Year of Publication"}),e.jsx($,{type:"number",value:D,onChange:N=>x(N.target.value),min:1900,max:new Date().getFullYear(),className:"h-9 text-sm"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Access Denied"}),e.jsx(ka,{checked:L,onCheckedChange:he})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{className:"text-xs font-semibold text-gray-600",children:"Event Type (Action)"}),e.jsx("div",{className:"flex flex-col gap-1.5",children:[{value:"investigation",label:"Investigation Only (1 event)"},{value:"request",label:"Request (+ Investigation) (2 events)"}].map(N=>e.jsxs("button",{type:"button",onClick:()=>
211M(N.value),className:`flex items-center gap-2 px-3 py-2 rounded-lg border text-xs font-medium transition-colors ${P===N.value?"bg-blue-50 border-blue-400 text-blue-700":"bg-white border-gray-200 text-gray-600 hover:border-gray-300"}`,children:[e.jsx("span",{className:`w-3.5 h-3.5 rounded-full border-2 flex items-center justify-center flex-shrink-0 ${P===N.value?"border-blue-500":"border-gray-300"}`,children:P===N.value&&e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-blue-500"})}),N.label]},N.value))})]})]})]})]})}),e.jsxs(A,{className:"w-full bg-[#0a1628] hover:bg-blue-700 text-white gap-2",onClick:Aa,disabled:!qt||Pt,children:[e.jsx(me,{className:"w-4 h-4"}),Pt?"Sendingâ¦":"Send Test Event"]}),!qt&&e.jsx("p",{className:"text-xs text-gray-400 text-center",children:"Select a platform and an institution to enable sending."})]}),e.jsxs("div",{className:"space-y-4",children:[se?e.jsx(Q,{className:`border shadow-sm ${se.ok?"border-green-200 bg-green-50":"border-red-200 bg-red-50"}`,children:e.jsxs(ae,{className:"pt-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[se.ok?e.jsx(O,{className:"w-5 h-5 text-green-600"}):e.jsx(Ar,{className:"w-5 h-5 text-red-500"}),e.jsx("span",{className:`text-sm font-bold ${se.ok?"text-green-700":"text-red-600"}`,children:se.ok?"Event accepted":"Event rejected"}),e.jsxs(ge,{variant:"outline",className:`ml-auto text-xs ${se.ok?"border-green-300 text-green-700":"border-red-300 text-red-600"}`,children:["HTTP ",se.status]})]}),e.jsx("pre",{className:`text-xs rounded-lg p-3 overflow-auto max-h-40 font-mono ${se.ok?"bg-green-100 text-green-900":"bg-red-100 text-red-900"}`,children:JSON.stringify(se.body,null,2)}),se.ok&&n&&s&&e.jsxs("button",{type:"button",onClick:()=>s(n),className:"w-full flex items-center justify-center gap-2 text-xs font-semibold text-blue-700 bg-blue-50 hover:bg-blue-100 border border-blue-200 rounded-lg py-2 transition-colors",children:[e.jsx(re,{className:"w-3.5 h-3.5"}),"View usage metrics for this institution â"]})]})}):e.jsx(Q,{className:"border border-dashed border-gray-200 shadow-sm",children:e.jsxs(ae,{className:"pt-8 pb-8 text-center text-gray-400",children:[e.jsx(me,{className:"w-8 h-8 mx-auto mb-2 opacity-25"}),e.jsx("p",{className:"text-sm",children:"Response will appear here"}),e.jsx("p",{className:"text-xs mt-1",children:'Fill the form and click "Send Test Event"'})]})}),e.jsx(Q,{className:"border border-gray-200 shadow-sm",children:e.jsxs(ae,{className:"pt-4 space-y-2",children:[e.jsxs("button",{onClick:()=>_a(N=>!N),className:"flex items-center gap-1.5 text-xs font-semibold text-gray-500 hover:text-gray-800 transition-colors",children:[e.jsx(st,{className:"w-3.5 h-3.5"}),"Request payload preview",e.jsx(gt,{className:`w-3.5 h-3.5 transition-transform ${Et?"rotate-180":""}`})]}),Et&&e.jsx("pre",{className:"text-[11px] font-mono text-gray-600 bg-gray-50 border border-gray-100 rounded-lg p-3 overflow-auto max-h-64",children:JSON.stringify(d==="document"?{customerId:n,docId:C,docType:w,accessType:l,accessMethod:y,accessDenied:L,sessionId:p,parentId:E||null,date:b?new Date(b).toISOString():"",yop:Number(D)||0,request:P==="request",investigation:!0}:{customerId:n,date:b?new Date(b).toISOString():"",docType:w,accessType:l,accessMethod:y},null,2)})]})}),K&&n&&e.jsx(Q,{className:"border border-gray-200 shadow-sm",children:e.jsxs(ae,{className:"pt-4 space-y-2",children:[e.jsxs("p",{className:"text-xs font-semibold text-gray-500 flex items-center gap-1.5",children:[e.jsx(st,{className:"w-3.5 h-3.5"})," Equivalent curl command"]}),e.jsx("pre",{className:"text-[11px] font-mono text-gray-600 bg-gray-50 border border-gray-100 rounded-lg p-3 overflow-auto whitespace-pre-wrap break-all",children:`curl -X POST \\ 212 ${Dt()}/api/usages/${d==="document"?"document-activities":"search-activities"}?api_key=${K.ingestion_api_key} \\ 213 -H "Content-Type: application/json" \\ 214 -d '${JSON.stringify(d==="document"?{customerId:n,docId:C,docType:w,accessType:l,accessMethod:y,sessionId:p,date:b?new Date(b).toISOString():"",request:P==="request",investigation:!0}:{customerId:n,date:b?new Date(b).toISOString():"",docType:w,accessType:l,accessMethod:y},null,2)}'`})]})})]})]})]})}const An=[{value:"A&I_Database",label:"A&I Database"},{value:"Aggregated_Full_Content",label:"Aggregated Full Content"},{value:"Data_Repository",label:"Data Repository"},{value:"Discovery_Service",label:"Discovery Service"},{value:"eBook",label:"eBook"},{value:"eBook_Collection",label:"eBook Collection"},{value:"eJournal",label:"eJournal"},{value:"Full_Content_Database",label:"Full Content Database"},{value:"Multimedia",label:"Multimedia"},{value:"Multimedia_Collection",label:"Multimedia Collection"},{value:"Repository",label:"Repository"},{value:"Scholarly_Collaboration_Network",label:"Scholarly Collaboration Network"}],Xe=[{value:"PR",label:"Platform Report (PR)",hosts:"All"},{value:"DR",label:"Database Report (DR)",hosts:["A&I_Database","Aggregated_Full_Content","eBook","eBook_Collection","eJournal","Multimedia","Multimedia_Collection","Discovery_Service"]},{value:"TR",label:"Title Report (TR)",hosts:["Aggregated_Full_Content","eBook","eBook_Collection","eJournal"]},{value:"IR",label:"Item Report (IR)",hosts:["Full_Content_Database","Multimedia","Multimedia_Collection","Repository","Scholarly_Collaboration","Data_Repository"]}];function rs(){const t=Be(),a=fe();o.useEffect(()=>{t===null&&a(ke.urls.signIn.replace(/.*\/auth/,"/auth"))},[t,a]);
214const[s,i]=o.useState(null),[r,n]=o.useState([]),[c,d]=o.useState([]),[u,b]=o.useState(!0),[m,l]=o.useState(null),[j,y]=o.useState("platforms"),[S,w]=o.useState(null),_=k=>{w(k),y("institutions")};o.useEffect(()=>{(async()=>{try{const[E,f]=await Promise.all([F.get_or_create_account(),F.list_platforms()]),D=await E.json(),x=await f.json();i(D),n(x);const M=await(await F.list_all_institutions()).json();d(M)}catch(E){I.error("Failed to load data."),console.error(E)}finally{b(!1)}})()},[]);const C=async(k,E)=>{await navigator.clipboard.writeText(k),l(E),I.success("Copied!"),setTimeout(()=>l(null),2e3)},g=async()=>{t&&(await t.signOut(),a("/"))},p=async()=>{const E=await(await F.list_platforms()).json();n(E);const f=await F.list_all_institutions();d(await f.json())};return e.jsxs("div",{className:"min-h-screen bg-gray-50",children:[e.jsx("header",{className:"bg-white border-b border-gray-100 sticky top-0 z-40",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-3 flex items-center justify-between",children:[e.jsx("div",{className:"flex items-center gap-2.5",children:e.jsxs(v,{to:"/",className:"flex items-center gap-2.5 group",children:[e.jsx("div",{className:"w-8 h-8",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",className:"w-8 h-8",children:[e.jsx("rect",{width:"32",height:"32",rx:"6",fill:"#0a1628"}),e.jsx("rect",{x:"5",y:"18",width:"5",height:"9",rx:"1.5",fill:"#0077cc"}),e.jsx("rect",{x:"12.5",y:"12",width:"5",height:"15",rx:"1.5",fill:"#0077cc"}),e.jsx("rect",{x:"20",y:"6",width:"5",height:"21",rx:"1.5",fill:"#38bdf8"})]})}),e.jsxs("div",{className:"leading-none",children:[e.jsxs("span",{className:"text-[15px] font-black text-[#0a1628] tracking-tight group-hover:text-blue-600 transition-colors",children:["usagemetrics",e.jsx("span",{className:"text-blue-500",children:".ai"})]}),e.jsx("div",{className:"text-[9px] font-bold text-gray-400 tracking-[0.15em] uppercase mt-0.5",children:"Publisher Dashboard"})]})]})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-sm text-gray-500 hidden sm:block",children:t==null?void 0:t.primaryEmail}),e.jsxs(A,{variant:"ghost",size:"sm",className:"text-gray-500 hover:text-gray-900 gap-1.5",onClick:g,children:[e.jsx(Pr,{className:"w-4 h-4"})," Sign out"]})]})]})}),e.jsxs("main",{className:"max-w-6xl mx-auto px-6 py-8 space-y-6",children:[e.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 mb-2",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded-full bg-amber-100 flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("span",{className:"text-amber-700 text-[10px] font-bold",children:"i"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-amber-900 mb-1",children:"Status: In Development & Certification Pathway"}),e.jsx("p",{className:"text-xs text-amber-800 leading-relaxed",children:"UsageMetrics.ai is currently in development. We are working towards COUNTER compliance certification and are not yet verified as compliant. Data generated here should be used for testing and preparation purposes only."})]})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ur,{className:"w-5 h-5 text-[#0a1628]"}),e.jsx("h1",{className:"text-xl font-bold text-[#0a1628]",children:(s==null?void 0:s.publisher_name)??(s==null?void 0:s.name)??"My Publisher Account"}),s&&e.jsx(ge,{className:"bg-blue-100 text-blue-800 font-semibold capitalize",children:s.roles[0]})]})}),u?e.jsx(qn,{}):e.jsxs(ya,{value:j,onValueChange:y,className:"w-full",children:[e.jsxs(jt,{className:"bg-white border border-gray-200 h-10",children:[e.jsxs(oe,{value:"platforms",className:"gap-1.5",children:[e.jsx(de,{className:"w-4 h-4"})," Platforms (",r.length,")"]}),e.jsxs(oe,{value:"institutions",className:"gap-1.5",children:[e.jsx(re,{className:"w-4 h-4"})," Institutions (",c.length,")"]}),e.jsxs(oe,{value:"simulator",className:"gap-1.5",children:[e.jsx(me,{className:"w-4 h-4"})," Simulator"]}),e.jsxs(oe,{value:"account",className:"gap-1.5",children:[e.jsx(be,{className:"w-4 h-4"})," Account"]})]}),e.jsx(ce,{value:"platforms",className:"mt-4",children:e.jsx(Pn,{platforms:r,allInstitutions:c,copied:m,onCopy:C,onRefresh:p})}),e.jsx(ce,{value:"institutions",className:"mt-4",children:e.jsx(Nn,{institutions:c,platforms:r,onRefresh:p,initialSelectedId:S,onInitialSelectedConsumed:()=>w(null)})}),e.jsx(ce,{value:"simulator",className:"mt-4",children:e.jsx(_n,{platforms:r,institutions:c,onNavigateToInstitution:_})}),e.jsx(ce,{value:"account",className:"mt-4",children:s&&e.jsx(En,{account:s,onUpdate:i})})]})]})]})}function Pn({platforms:t,allInstitutions:a,copied:s,onCopy:i,onRefresh:r}){const[n,c]=o.useState(!1),[d,u]=o.useState(null),[b,m]=o.useState(null),[l,j]=o.useState(null),[y,S]=o.useState(!1),[w,_]=o.useState({name:"",url:"",hostType:"",reportTypes:[]}),C=()=>{_({name:"",url:"",hostType:"",reportTypes:[]}),u(null),c(!0)},g=f=>{_({name:f.name,url:f.url??"",hostType:f.host_type??"",reportTypes:f.report_types??[]}),u(f),c(!0)},p=async()=>{var f,D;if(!w.name.trim()){I.error("Name is required.");return}S(!0);try{const x={name:w.name,url:w.url||null,host_type:w.hostType||null,report_types:w.reportTypes};d?(await F.update_platform({platformId:d.id},x),I.success("Platform updated.")):(await F.create_platform(x),I.success("Platform created!")),c(!1),r()}catch(x){const P=await((D=(f=x==null?void 0:x.response)==null?void 0:f.json)==null?void 0:D.call(f).catch(()=>null));I.error((P==null?void 0:P.detail)??"Failed to save.")}finally{S(!1)}},k=f=>{_(D=>({...D,reportTypes:D.reportTypes.includes(f)?D.reportTypes.filter(x=>x!==f):[...D.reportTypes,f]}))};Xe.filter(f=>f.hosts==="All"||w.hostType&&f.hosts.includes(w.hostType));const E=async()=>
214{if(b)try{await F.delete_platform({platformId:b.id}),I.success(`"${b.name}" deleted.`),m(null),r()}catch{I.error("Failed to delete platform.")}};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-sm text-gray-500",children:"Manage your COUNTER platforms. Each platform has its own API key for metrics ingestion."}),e.jsxs(A,{onClick:C,className:"bg-[#0a1628] hover:bg-blue-600 gap-1.5",size:"sm",children:[e.jsx(na,{className:"w-4 h-4"})," New Platform"]})]}),t.length===0?e.jsx(On,{icon:e.jsx(de,{className:"w-8 h-8"}),title:"No platforms yet",sub:"Create your first platform to start ingesting COUNTER metrics."}):e.jsx("div",{className:"space-y-3",children:t.map(f=>e.jsx(Un,{platform:f,allInstitutions:a,expanded:l===f.id,onToggle:()=>j(l===f.id?null:f.id),copied:s,onCopy:i,onEdit:()=>g(f),onDelete:()=>m(f),onRefresh:r},f.id))}),e.jsx(wa,{open:n,onOpenChange:c,children:e.jsxs(vt,{className:"max-w-md",children:[e.jsx(wt,{children:e.jsx(Rt,{children:d?"Edit Platform":"New Platform"})}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(q,{htmlFor:"pname",className:"text-xs font-bold",children:"Platform Name *"}),e.jsx($,{id:"pname",value:w.name,onChange:f=>_({...w,name:f.target.value}),placeholder:"e.g. Journals Online",className:"mt-1 text-sm"})]}),e.jsxs("div",{children:[e.jsx(q,{htmlFor:"purl",className:"text-xs font-bold",children:"URL"}),e.jsx($,{id:"purl",value:w.url,onChange:f=>_({...w,url:f.target.value}),placeholder:"https://journals.example.com",className:"mt-1 text-sm"})]}),e.jsxs("div",{children:[e.jsx(q,{htmlFor:"phost",className:"text-xs font-bold",children:"Host Type"}),e.jsxs(X,{value:w.hostType,onValueChange:f=>{const D=Xe.filter(x=>x.hosts==="All"||x.hosts.includes(f)).map(x=>x.value);_({...w,hostType:f,reportTypes:D})},children:[e.jsx(z,{id:"phost",className:"mt-1 text-sm",children:e.jsx(Z,{placeholder:"Select host type..."})}),e.jsx(Y,{children:An.map(f=>e.jsx(V,{value:f.value,className:"text-sm",children:f.label},f.value))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(q,{className:"text-xs font-bold",children:"Provided COUNTER Reports"}),e.jsx("div",{className:"grid grid-cols-2 gap-2 mt-1",children:Xe.map(f=>{const D=f.hosts==="All"||w.hostType&&f.hosts.includes(w.hostType);return e.jsxs("div",{onClick:()=>k(f.value),className:`flex flex-col p-2 border rounded-lg cursor-pointer transition-all ${w.reportTypes.includes(f.value)?"bg-blue-50 border-blue-400":"bg-white border-gray-200 hover:border-blue-200"}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-bold",children:f.value}),w.reportTypes.includes(f.value)&&e.jsx(_e,{className:"w-3 h-3 text-blue-600"})]}),e.jsx("span",{className:"text-[10px] text-gray-500 truncate",children:f.label}),D&&!w.reportTypes.includes(f.value)&&e.jsx("span",{className:"text-[9px] text-blue-500 font-medium mt-1",children:"Recommended"})]},f.value)})})]})]}),e.jsxs(Nt,{children:[e.jsx(A,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(A,{onClick:p,disabled:y,className:"bg-[#0a1628] hover:bg-blue-600",children:y?"Savingâ¦":d?"Update":"Create"})]})]})}),e.jsx(Ra,{open:!!b,onOpenChange:f=>!f&&m(null),children:e.jsxs(Tt,{children:[e.jsxs(Ct,{children:[e.jsxs(kt,{children:['Delete "',b==null?void 0:b.name,'"?']}),e.jsx(It,{children:"All institution links will be removed. Activities tied to this platform will lose their reference."})]}),e.jsxs(St,{children:[e.jsx(At,{children:"Cancel"}),e.jsx(_t,{onClick:E,className:"bg-red-600 hover:bg-red-700",children:"Delete"})]})]})})]})}function Un({platform:t,allInstitutions:a,expanded:s,onToggle:i,copied:r,onCopy:n,onEdit:c,onDelete:d,onRefresh:u}){var C;const[b,m]=o.useState(""),[l,j]=o.useState(!1),y=new Set(t.institutions.map(g=>g.customer_id)),S=a.filter(g=>!y.has(g.customer_id)),w=async g=>{if(g){j(!0);try{await F.link_institution_to_platform({platformId:t.id,customerId:g}),I.success("Institution linked."),m(""),u()}catch{I.error("Failed to link institution.")}finally{j(!1)}}},_=async g=>{try{await F.unlink_institution_from_platform({platformId:t.id,customerId:g}),I.success("Institution unlinked."),u()}
214catch{I.error("Failed to unlink institution.")}};return e.jsx(Q,{className:"border border-gray-200 shadow-sm",children:e.jsxs(ae,{className:"p-0",children:[e.jsxs("div",{className:"flex items-center gap-3 p-4 cursor-pointer hover:bg-gray-50 transition-colors",onClick:i,children:[s?e.jsx(gt,{className:"w-4 h-4 text-gray-400 shrink-0"}):e.jsx(Ds,{className:"w-4 h-4 text-gray-400 shrink-0"}),e.jsx(de,{className:"w-4 h-4 text-blue-500 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-semibold text-[#0a1628] text-sm",children:t.name}),t.host_type&&e.jsx(ge,{variant:"secondary",className:"text-[9px] px-1.5 py-0 h-4 bg-gray-100 text-gray-600 border-none font-medium",children:t.host_type.replace(/_/g," ")})]}),e.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[e.jsx("span",{className:"text-xs font-mono text-gray-400 truncate max-w-[220px]",children:t.ingestion_api_key}),t.url&&e.jsxs("span",{className:"text-xs text-gray-400 truncate",children:["· ",t.url]})]})]}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",onClick:g=>g.stopPropagation(),children:[e.jsxs(ge,{variant:"outline",className:"text-xs",children:[t.institutions.length," institution",t.institutions.length!==1?"s":""]}),e.jsx(A,{size:"icon",variant:"ghost",className:"w-7 h-7",onClick:c,children:e.jsx(la,{className:"w-3.5 h-3.5"})}),e.jsx(A,{size:"icon",variant:"ghost",className:"w-7 h-7 text-red-400 hover:text-red-600",onClick:d,children:e.jsx(oa,{className:"w-3.5 h-3.5"})})]})]}),s&&e.jsxs("div",{className:"border-t border-gray-100 px-4 pb-4 pt-3 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-semibold text-gray-600 mb-1.5 flex items-center gap-1.5",children:[e.jsx(at,{className:"w-3.5 h-3.5 text-blue-500"})," Ingestion API Key"]}),e.jsx(Dn,{value:t.ingestion_api_key,id:`pkey-${t.id}`,copied:r,onCopy:n})]}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-semibold text-gray-600 mb-1.5 flex items-center gap-1.5",children:[e.jsx(ye,{className:"w-3.5 h-3.5 text-blue-500"})," Supported Reports"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:(t.report_types||[]).length>0?(C=t.report_types)==null?void 0:C.map(g=>e.jsx(ge,{variant:"outline",className:"text-[10px] bg-white border-blue-100 text-blue-700 font-bold px-1.5 py-0",children:g},g)):e.jsx("span",{className:"text-xs text-gray-400 italic",children:"None specified"})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-gray-600 mb-2",children:"Linked Institutions"}),t.institutions.length===0?e.jsx("p",{className:"text-xs text-gray-400 italic",children:"No institutions linked yet."}):e.jsx("div",{className:"space-y-2",children:t.institutions.map(g=>e.jsxs("div",{className:"bg-gray-50 rounded-lg px-3 py-2.5 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{className:"w-3.5 h-3.5 text-gray-400 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-semibold text-[#0a1628] truncate",children:g.name}),e.jsx("p",{className:"text-[10px] font-mono text-gray-400",children:g.customer_id})]}),e.jsx("button",{onClick:()=>_(g.customer_id),className:"text-gray-400 hover:text-red-500 shrink-0",title:"Unlink",children:e.jsx(Er,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-5",children:[e.jsx(at,{className:"w-3 h-3 text-blue-400 shrink-0"}),e.jsx("span",{className:"text-[10px] font-mono text-gray-500 truncate flex-1",children:g.api_key}),e.jsx("button",{onClick:()=>n(g.api_key??"",`ikey-${t.id}-${g.customer_id}`),className:"text-gray-400 hover:text-blue-600 shrink-0",title:"Copy SUSHI API key for this institution",children:r===`ikey-${t.id}-${g.customer_id}`?e.jsx(_e,{className:"w-3 h-3 text-green-500"}):e.jsx(xe,{className:"w-3 h-3"})})]})]},g.customer_id))}),S.length>0&&e.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[e.jsxs("select",{value:b,onChange:g=>m(g.target.value),className:"flex-1 text-xs border border-gray-200 rounded-lg px-2 py-1.5 bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-300",children:[e.jsx("option",{value:"",children:"â Link an institution â"}),S.map(g=>e.jsx("option",{value:g.customer_id,children:g.name},g.customer_id))]}),e.jsxs(A,{size:"sm",variant:"outline",disabled:!b||l,onClick:()=>w(b),className:"gap-1 text-xs",children:[e.jsx(Or,{className:"w-3.5 h-3.5"})," Link"]})]})]})]})]})})}function En({account:t,onUpdate:a}){const[s,i]=o.useState(t.publisher_name??""),[r,n]=o.useState(t.registry_url??""),[c,d]=o.use
214State(!1),u=s!==(t.publisher_name??"")||r!==(t.registry_url??""),b=async()=>{d(!0);try{const l=await(await F.update_my_account({publisher_name:s||null,registry_url:r||null})).json();a(l),i(l.publisher_name??""),n(l.registry_url??""),I.success("Publisher profile saved.")}catch{I.error("Failed to save profile.")}finally{d(!1)}};return e.jsxs("div",{className:"space-y-4 max-w-2xl",children:[e.jsxs(Q,{className:"border border-gray-200 shadow-sm",children:[e.jsx(Me,{className:"pb-2",children:e.jsxs(Fe,{className:"text-sm font-semibold text-gray-700 flex items-center gap-2",children:[e.jsx(re,{className:"w-4 h-4 text-blue-500"})," Publisher Profile"]})}),e.jsxs(ae,{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{htmlFor:"publisher_name",className:"text-xs font-semibold text-gray-600",children:"Publisher Name"}),e.jsx($,{id:"publisher_name",placeholder:"e.g. Oxford University Press",value:s,onChange:m=>i(m.target.value),className:"text-sm"}),e.jsx("p",{className:"text-[11px] text-gray-400",children:"Displayed in the dashboard and shared via SUSHI report headers."})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(q,{htmlFor:"registry_url",className:"text-xs font-semibold text-gray-600",children:"COUNTER Registry URL"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{id:"registry_url",placeholder:"https://registry.countermetrics.org/platform/...",value:r,onChange:m=>n(m.target.value),className:"text-sm font-mono"}),r&&e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-gray-400 hover:text-blue-600 transition-colors",title:"Open registry URL",children:e.jsx(ut,{className:"w-4 h-4"})})]}),e.jsx("p",{className:"text-[11px] text-gray-400",children:"Your platform listing on the official COUNTER metrics registry."})]}),e.jsxs(A,{onClick:b,disabled:!u||c,size:"sm",className:"gap-1.5 bg-[#0a1628] text-white hover:bg-[#162440]",children:[e.jsx(Dr,{className:"w-3.5 h-3.5"}),c?"Savingâ¦":"Save profile"]})]})]}),e.jsxs(Q,{className:"border border-gray-200 shadow-sm",children:[e.jsx(Me,{className:"pb-2",children:e.jsxs(Fe,{className:"text-sm font-semibold text-gray-700 flex items-center gap-2",children:[e.jsx(be,{className:"w-4 h-4 text-blue-500"})," Account Information"]})}),e.jsxs(ae,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsx(is,{label:"System name",value:t.name}),e.jsx(is,{label:"Identifier",value:`@${t.slug}`,mono:!0}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 mb-1",children:"Plan"}),e.jsx(ge,{className:"bg-[#0a1628] text-white capitalize",children:t.plan})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 mb-1",children:"Roles"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.roles.map(m=>e.jsx("span",{className:"text-xs font-semibold px-2.5 py-1 rounded-full capitalize bg-blue-100 text-blue-800",children:m},m))})]}),e.jsxs("p",{className:"text-xs text-gray-400 bg-blue-50 border border-blue-100 rounded-lg px-3 py-2",children:["Each ",e.jsx("strong",{children:"platform"})," has an ingestion key (for pushing metrics). Each ",e.jsx("strong",{children:"institution"})," has its own SUSHI API key (shared with libraries for report access). Find both in the ",e.jsx("strong",{children:"Platforms"})," tab."]})]})]})]})}function On({icon:t,title:a,sub:s}){return e.jsxs("div",{className:"text-center py-16 text-gray-400 border border-dashed border-gray-200 rounded-xl bg-white",children:[e.jsx("div",{className:"flex justify-center mb-3 opacity-40",children:t}),e.jsx("p",{className:"text-sm font-semibold text-gray-500",children:a}),e.jsx("p",{className:"text-xs mt-1",children:s})]})}function is({label:t,value:a,mono:s=!1}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 mb-1",children:t}),e.jsx("p",{className:`text-sm font-semibold text-[#0a1628] ${s?"font-mono":""}`,children:a})]})}function Dn({value:t,id:a,copied:s,onCopy:i}){return e.jsxs("div",{className:"flex items-center gap-2 bg-gray-50 border border-gray-200 rounded-lg px-3 py-2",children:[e.jsx("code",{className:"flex-1 text-xs font-mono text-gray-700 truncate",children:t}),e.jsx("button",{onClick:()=>i(t,a),className:"shrink-0 text-gray-400 hover:text-gray-700 transition-colors",title:"Copy",children:s===a?e.jsx(_e,{className:"w-4 h-4 text-green-500"}):e.jsx(xe,{className:"w-4 h-4"})})]})}function qn(){return e.jsxs("div",{className:"space-y-3",children:[e.jsx(Te,{className:"h-10 w-64 roun
214ded-lg"}),e.jsx(Te,{className:"h-32 w-full rounded-xl"}),e.jsx(Te,{className:"h-32 w-full rounded-xl"})]})}const ns=[{slug:"/article-counter-pathway-compliance",category:"article",title:"COUNTER's Pathway to Compliance: A Lifeline for Small Publishers",description:"COUNTER's April 2026 Pathway to Compliance gives small publishers a structured, audit-free route to credible R5.1 usage reporting. Learn who is eligible, which reports are required, what the metric and format rules are, and how the Validator-based accountability mechanism works.",readTime:"9 min",date:"April 2026",tags:["COUNTER R5.1","Pathway to Compliance","Small Publishers","SUSHI"]},{slug:"/article-counter-report-types",category:"article",title:"PR, DR, TR, IR: Understanding the Four COUNTER R5.1 Report Types",description:"COUNTER R5.1 defines four master report types â Platform, Database, Title, and Item â each operating at a different level of granularity. This detailed guide explains the exact differences: metrics, Data_Types, Access_Type and YOP requirements, standard views, and which publishers must provide each report.",readTime:"12 min",date:"April 2025",tags:["COUNTER R5.1","PR","DR","TR","IR","Report Types"]},{slug:"/article-counter-toc-usage",category:"article",title:"Counting Usage for Tables of Contents",description:"Release 5.1 brought ToC tracking for books into line with other data types â but the rules are specific. Learn how ToC views are counted as Book_Segment metrics, what triggers chapter-level usage, and how a worked example plays out in practice.",readTime:"5 min",date:"December 2024",tags:["COUNTER R5.1","Books","Tables of Contents","Book_Segment"]},{slug:"/article-counter-data-retention",category:"article",title:"How Long Should You Keep COUNTER Data? A Practical Guide for Libraries",description:"How long should libraries retain COUNTER usage data? The community weighs in on the 3-year standard, the risk of restated data, and how the R5 to R5.1 transition complicates long-term trend analysis.",readTime:"5 min",date:"March 2025",tags:["Data Retention","COUNTER R5.1","Libraries","Usage Data"]},{slug:"/article-counter-audit-best-practices",category:"article",title:"Best Practices for a Successful COUNTER Audit",description:"A comprehensive guide to preparing and passing a COUNTER compliance audit. Covers auditor requirements, pre-audit checks, data documentation, and how automated tools reduce audit stress.",readTime:"8 min",date:"January 2025",tags:["COUNTER Audit","R5.1","Compliance","Best Practices"]},{slug:"/article-counter-evolutions",category:"article",title:"Key Evolutions of Project COUNTER and Their Implications for Publishers",description:"An in-depth look at the history and evolution of COUNTER standards, the major changes introduced in R5.1, and how publishers can anticipate and adapt to future developments.",readTime:"7 min",date:"January 2025",tags:["COUNTER R5.1","Standards","Open Access","SUSHI API"]}],ls=[{slug:"/whitepaper-code-of-practice",category:"whitepaper",title:"COUNTER Code of Practice R5.1: A Complete Implementation Guide for Publishers",description:"Everything report providers need to know to achieve COUNTER compliance under R5.1.0.1 â report types, metric definitions, processing rules, SUSHI API, audit requirements, and the R5 transition.",readTime:"20 min",date:"March 2025",tags:["COUNTER R5.1","Code of Practice","SUSHI","Audit","Compliance"]},{slug:"/whitepaper-counter-validator",category:"whitepaper",title:"The COUNTER Validator: Your Essential Pre-Audit Compliance Tool",description:"A practical guide to using the official COUNTER Validator (validator.countermetrics.org) to validate JSON, tabular, and SUSHI API reports against R5 and R5.1 â before your auditor does.",readTime:"10 min",date:"March 2025",tags:["COUNTER Validator","SUSHI","R5.1","Audit","Compliance"]},{slug:"/whitepaper-ai-impact",category:"whitepaper",title:"The Impact of AI on Your Download Statistics",description:"How LLMs and AI agents are distorting your usage metrics â and how to reclaim accurate, human-only engagement data through advanced bot filtering.",readTime:"12 min",date:"January 2025",tags:["AI Traffic","Bot Filtering","Usage Statistics","LLM"]},{slug:"/whitepaper-r5migration",category:"whitepaper",title:"How to Migrate from COUNTER R5 to R5.1 Without the Headaches",description:"A practical step-by-step guide for publishers navigating the R5 to R5.1 transition. Covers key changes, readiness asse
214ssment, migration strategies, and post-migration validation.",readTime:"11 min",date:"January 2025",tags:["R5 to R5.1","Migration","Data Types","SUSHI"]},{slug:"/whitepaper-survival-guide",category:"whitepaper",title:"The COUNTER Survival Guide for Independent Publishers",description:"An essential resource for independent and mid-sized academic publishers. Demystifies COUNTER R5.1, identifies common pitfalls, and presents practical compliance strategies including the CaaS model.",readTime:"15 min",date:"January 2025",tags:["Independent Publishers","COUNTER R5.1","Compliance","CaaS"]}],Ln=({category:t})=>e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-semibold border ${t==="whitepaper"?"bg-indigo-50 text-indigo-700 border-indigo-100":"bg-blue-50 text-blue-700 border-blue-100"}`,children:[t==="whitepaper"?e.jsx(ye,{className:"w-3 h-3"}):e.jsx(ft,{className:"w-3 h-3"}),t==="whitepaper"?"White Paper":"Article"]}),os=({item:t})=>e.jsxs(v,{to:t.slug,className:"group flex flex-col bg-white border border-gray-100 rounded-2xl p-6 hover:border-blue-200 hover:shadow-lg hover:shadow-blue-900/5 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx(Ln,{category:t.category}),e.jsxs("span",{className:"text-xs text-gray-400",children:[t.readTime," read"]})]}),e.jsx("h3",{className:"text-lg font-black text-[#0a1628] mb-3 leading-snug group-hover:text-blue-600 transition-colors",children:t.title}),e.jsx("p",{className:"text-gray-500 text-sm leading-relaxed flex-grow mb-4",children:t.description}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-5",children:t.tags.map(a=>e.jsx("span",{className:"px-2 py-0.5 bg-gray-100 text-gray-500 rounded text-xs",children:a},a))}),e.jsxs("div",{className:"flex items-center gap-1.5 text-sm font-semibold text-blue-600 group-hover:gap-2.5 transition-all",children:["Read ",t.category==="whitepaper"?"white paper":"article"," ",e.jsx(W,{className:"w-4 h-4"})]})]});function Mn(){return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(Ve,{title:"Resources: COUNTER R5.1 Guides, White Papers & Articles | usagemetrics.ai",description:"Explore white papers and articles on COUNTER R5.1 compliance, AI traffic filtering, migration from R5, and usage statistics best practices for academic publishers.",canonical:"/resources"}),e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("section",{className:"bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-100",children:e.jsx("div",{className:"container mx-auto px-6 py-16 md:py-20",children:e.jsxs("div",{className:"max-w-2xl",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-blue-50 border border-blue-100 text-blue-700 text-xs font-semibold mb-6",children:"Knowledge Base"}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-black text-[#0a1628] mb-4 leading-tight",children:["COUNTER Compliance",e.jsx("br",{}),"Resources"]}),e.jsx("p",{className:"text-lg text-gray-500 leading-relaxed",children:"Practical guides, white papers, and deep-dives on COUNTER R5.1 compliance, AI traffic filtering, and academic publishing analytics â written by the usagemetrics.ai team."})]})})}),e.jsx("section",{className:"py-16 bg-[#f8fafc] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx(ye,{className:"w-5 h-5 text-indigo-600"}),e.jsx("h2",{className:"text-2xl font-black text-[#0a1628]",children:"White Papers"}),e.jsx("span",{className:"ml-1 px-2 py-0.5 bg-indigo-50 text-indigo-600 rounded-full text-xs font-semibold border border-indigo-100",children:ls.length})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:ls.map(t=>e.jsx(os,{item:t},t.slug))})]})}),e.jsx("section",{className:"py-16 bg-white",children:e.jsxs("div",{className:"container mx-auto px-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx(ft,{className:"w-5 h-5 text-blue-600"}),e.jsx("h2",{className:"text-2xl font-black text-[#0a1628]",children:"Articles"}),e.jsx("span",{className:"ml-1 px-2 py-0.5 bg-blue-50 text-blue-600 rounded-full text-xs font-semibold border border-blue-100",children:ns.length})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:ns.map(t=>e.jsx(os,{item:t},t.slug))})]})}),e.jsx("section",{className:"bg-gradient-to-br from-[#0a1628] to-blue-900 py-16",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-3xl text-center",children:[e.jsx("h2",{className:"text-2xl md:text-3xl font-black text-white mb-3",children:"Ready to automate your compliance?"}),e.jsx("p",{className:"text-blue-200 mb-8",children:"Join publishers who trust usagemetrics.ai for audit-ready COUNTER R5.1 reporting."}),e.jsxs(v,{to:"/#pilot",className:"inline-flex items-center gap-2 px-8 py-3 bg-blue-500 hover:bg-blue-400 text-white rounded-xl font-semibold transition-all",children:["Request a Demo ",e.jsx(W,{className:"w-4 h-4"})]})]})})]}),e.jsx(H,{})]})}function cs(){return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(Ve,{title:"Terms of Service | usagemetrics.ai",de
214scription:"usagemetrics.ai Terms of Service. Read our terms and conditions governing the use of the usagemetrics.ai platform and services.",canonical:"/terms"}),e.jsx(B,{}),e.jsxs("main",{className:"flex-grow",children:[e.jsx("section",{className:"bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-100",children:e.jsxs("div",{className:"container mx-auto px-6 py-16 max-w-4xl",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-gray-100 border border-gray-200 text-gray-600 text-xs font-semibold mb-5",children:"Legal"}),e.jsx("h1",{className:"text-3xl md:text-4xl font-black text-[#0a1628] mb-3",children:"Terms of Service"}),e.jsx("p",{className:"text-gray-500",children:"Last updated: January 1, 2025"})]})}),e.jsx("section",{className:"container mx-auto px-6 py-14 max-w-4xl",children:e.jsxs("div",{className:`prose prose-lg prose-gray max-w-none 215 prose-headings:font-black prose-headings:text-[#0a1628] 216 prose-h2:text-2xl prose-h2:mt-10 prose-h2:mb-4 prose-h2:border-b prose-h2:border-gray-100 prose-h2:pb-2 217 prose-h3:text-xl prose-h3:mt-6 prose-h3:mb-2 218 prose-p:text-gray-600 prose-p:leading-relaxed 219 prose-li:text-gray-600 220 prose-a:text-blue-600 221 `,children:[e.jsx("h2",{children:"1. Agreement to Terms"}),e.jsx("p",{children:"These Terms of Service (âTermsâ) govern your access to and use of the usagemetrics.ai website and platform (collectively, the âServicesâ), operated by usagemetrics.ai (âCompanyâ, âweâ, âourâ, or âusâ). By accessing or using our Services, you agree to be bound by these Terms. If you do not agree, do not use the Services."}),e.jsx("p",{children:"These Terms apply to all visitors, users, pilot partners, and customers of the Services."}),e.jsx("h2",{children:"2. Description of Services"}),e.jsx("p",{children:"usagemetrics.ai provides a Software-as-a-Service (SaaS) platform that automates COUNTER R5.1 compliance for academic publishers. Core services include:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Ingestion and processing of raw usage log data"}),e.jsx("li",{children:"Generation of COUNTER R5.1 compliant reports (TR, DR, PR, IR)"}),e.jsx("li",{children:"AI-powered bot traffic detection and filtering"}),e.jsx("li",{children:"SUSHI API provision for library customers"}),e.jsx("li",{children:"Usage analytics dashboard and data visualization"}),e.jsx("li",{children:"Audit support and documentation"})]}),e.jsx("h2",{children:"3. Account Registration"}),e.jsx("p",{children:"To access certain features of the Services, you must register for an account. You agree to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Provide accurate, current, and complete registration information"}),e.jsx("li",{children:"Maintain and promptly update your account information"}),e.jsx("li",{children:"Keep your login credentials confidential and not share them with third parties"}),e.jsx("li",{children:"Notify us immediately of any unauthorized use of your account"}),e.jsx("li",{children:"Be responsible for all activity that occurs under your account"})]}),e.jsx("h2",{children:"4. Acceptable Use"}),e.jsx("p",{children:"You agree to use the Services only for lawful purposes and in accordance with these Terms. You must not:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Upload data to which you do not have the right or authorization"}),e.jsx("li",{children:"Attempt to reverse-engineer, decompile, or extract source code from our platform"}),e.jsx("li",{children:"Interfere with or disrupt the integrity or performance of the Services"}),e.jsx("li",{children:"Use the Services to infringe the intellectual property rights of others"}),e.jsx("li",{children:"Use the Services in any way that violates applicable laws or regulations"}),e.jsx("li",{children:"Resell, sublicense, or transfer access to the Services without our written consent"}),e.jsx("li",{children:"Upload malicious code, viruses, or other harmful content"})]}),e.jsx("h2",{children:"5. Subscription Plans and Payment"}),e.jsx("p",{children:"Access to the usagemetrics.ai platform requires a paid subscription following any applicable free trial or pilot period. By subscribing, you agree to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Pay all fees associated with your chosen subscription plan"}),e.jsx("li",{children:"Provide valid payment information and authorize recurring charges"}
221),e.jsx("li",{children:"Subscription fees are billed in advance on a monthly or annual basis, as selected"}),e.jsx("li",{children:"All fees are non-refundable except as required by law or as expressly stated in your service agreement"})]}),e.jsx("p",{children:"We reserve the right to modify pricing with at least 30 days' written notice. Continued use after a price change constitutes acceptance of the new pricing."}),e.jsx("h2",{children:"6. Intellectual Property"}),e.jsx("h3",{children:"6.1 Our Intellectual Property"}),e.jsx("p",{children:"The Services, including all software, algorithms, interfaces, content, and trademarks, are owned by usagemetrics.ai and protected by intellectual property laws. These Terms do not grant you any right to use our branding, trademarks, or proprietary technology outside of your authorized use of the Services."}),e.jsx("h3",{children:"6.2 Your Data"}),e.jsx("p",{children:"You retain full ownership of the usage data you upload to the platform (âCustomer Dataâ). You grant us a limited, non-exclusive license to process Customer Data solely to provide the Services. We do not sell, share, or use your Customer Data for any purpose other than delivering the Services agreed upon."}),e.jsx("h2",{children:"7. Data Processing and GDPR"}),e.jsx("p",{children:"Where usagemetrics.ai processes personal data on your behalf as part of the Services, we act as a data processor under the GDPR and applicable data protection law. Our Data Processing Agreement (DPA), available upon request, governs such processing. You represent that you have the legal authority to provide any personal data submitted to the Services."}),e.jsx("h2",{children:"8. Confidentiality"}),e.jsx("p",{children:"Each party agrees to keep the other party's confidential information (including Customer Data, platform architecture, and business terms) strictly confidential and not to disclose it to any third party without prior written consent, except as required by law or to provide the Services."}),e.jsx("h2",{children:"9. Disclaimers and Warranties"}),e.jsx("p",{children:"THE SERVICES ARE PROVIDED âAS ISâ AND âAS AVAILABLEâ. TO THE MAXIMUM EXTENT PERMITTED BY LAW, USAGEMETRICS.AI DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT."}),e.jsx("p",{children:"We do not warrant that the Services will be uninterrupted, error-free, or that defects will be corrected. While we strive to generate COUNTER-compliant reports, ultimate responsibility for regulatory compliance rests with you as the publisher."}),e.jsx("h2",{children:"10. Limitation of Liability"}),e.jsx("p",{children:"TO THE MAXIMUM EXTENT PERMITTED BY LAW, USAGEMETRICS.AI SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING LOSS OF PROFITS, DATA, OR GOODWILL, ARISING OUT OF OR RELATED TO YOUR USE OF THE SERVICES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."}),e.jsx("p",{children:"OUR TOTAL LIABILITY TO YOU FOR ANY CLAIMS ARISING UNDER THESE TERMS SHALL NOT EXCEED THE AMOUNT PAID BY YOU TO USAGEMETRICS.AI IN THE TWELVE (12) MONTHS PRECEDING THE CLAIM."}),e.jsx("h2",{children:"11. Indemnification"}),e.jsx("p",{children:"You agree to indemnify, defend, and hold harmless usagemetrics.ai and its officers, directors, employees, and agents from and against any claims, liabilities, damages, losses, and expenses arising from: (a) your use of the Services in violation of these Terms; (b) your Customer Data; (c) your violation of any applicable law or third-party right."}),e.jsx("h2",{children:"12. Term and Termination"}),e.jsx("p",{children:"These Terms remain in effect while you use the Services. We may suspend or terminate your access immediately, with or without notice, if you breach these Terms. You may terminate your account at any time by contacting us. Upon termination, your right to use the Services ceases and we may delete your Customer Data after a reasonable retention period (typically 90 days)."}),e.jsx("h2",{children:"13. Governing Law and Dispute Resolution"}),e.jsx("p",{children:"These Terms are governed by and construed in accordance with the laws of [Governing Jurisdiction], without regard to its conflict of law provisions. Any disputes arising from these Terms or the Services shall first be submitted to good-faith mediation. Failing resolution, disputes shall be subject to the exclusive jurisdiction of the courts of [Governing Jurisdiction]."}),e.jsx("h2",{children:"14. Changes to Terms"}),e.jsx("p",{children:"We reserve the right to modify these Terms at any time. We will provide at least 30 days' notice of material changes via email or a prominent notice on our website. Continued use of the Services after the effective date of changes constitutes your acceptance."}),e.jsx("h2",{children:"15. Contact"}),e.jsx("p",{children:"For questions about these Terms, please contact:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Email:"})," ",e.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Address:"})," usagemetrics.ai, [Company Address], [City, Country]"]})]})]})})]}),e.jsx(H,{})]})}const ds=[{id:"report-checker",href:"/counter-report-checker",accent:"#0077cc",accentBg:"bg-blue-50",accentBorder:"border-blue-100",accentText:"text-[#0077cc]",icon:e.jsx(pt,{className:"w-5 h-5"}),badge:"Compliance",title:"COUNTER Report Checker",description:"Select your Host_Type and instantly see which COUNTER R5.1 reports and standard views your platform is required to implement. Covers all 12 Host_Types.",highlights:["12 Host_Types covered","All PR / DR / TR / IR reports","Standard views per report"]}
221,{id:"form-builder",href:"/counter-form-builder-page",accent:"#9b2c8c",accentBg:"bg-purple-50",accentBorder:"border-purple-100",accentText:"text-[#9b2c8c]",icon:e.jsx(He,{className:"w-5 h-5"}),badge:"Developer",title:"HTML Form Builder",description:"Configure your COUNTER report parameters interactively â Report, Date range, Metric types, Access types, YOP â and get a ready-to-embed HTML form with correct SUSHI field names.",highlights:["Live HTML preview","One-click copy to clipboard","SUSHI-compliant field names"]},{id:"exception-lookup",href:"/counter-exception-lookup",accent:"#7c3aed",accentBg:"bg-violet-50",accentBorder:"border-violet-100",accentText:"text-[#7c3aed]",icon:e.jsx(Le,{className:"w-5 h-5"}),badge:"Reference",title:"Exception Code Lookup",description:"Search all 22 COUNTER R5.1 exception codes from Appendix D by code number, message, or keyword. See the HTTP status, severity, and full invocation conditions for each one.",highlights:["All 22 Appendix D exceptions","Filter by category or keyword","HTTP status & severity shown"]}];function Fn(){return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white",children:[e.jsx(B,{}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f8fafc] via-white to-[#eff6ff] border-b border-gray-200",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(#0a1628 1px, transparent 1px), linear-gradient(90deg, #0a1628 1px, transparent 1px)",backgroundSize:"40px 40px"}}),e.jsx("div",{className:"absolute top-[-100px] right-[-80px] w-[440px] h-[440px] bg-blue-200 rounded-full opacity-20 blur-3xl pointer-events-none"}),e.jsx("div",{className:"relative container mx-auto px-6 py-14 md:py-20",children:e.jsxs(h,{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-blue-50 border border-blue-100 text-[#0077cc] text-xs font-semibold mb-5",children:[e.jsx(pt,{className:"w-3.5 h-3.5"}),"Free Tools"]}),e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"w-1 h-8 bg-[#0077cc] rounded-full"}),e.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-[#0077cc]",children:"COUNTER R5.1"})]}),e.jsxs("h1",{className:"text-4xl md:text-5xl font-black text-[#1a2e5a] mb-4 leading-tight",children:["Tools for ",e.jsx("span",{className:"text-[#0077cc]",children:"Publishers & Libraries"})]}),e.jsx("p",{className:"text-lg text-gray-500 max-w-2xl leading-relaxed",children:"Free, no-login tools to help you understand, implement, and validate COUNTER R5.1 compliance â built by the usagemetrics.ai team."})]})})]}),e.jsx("section",{className:"bg-[#f8fafc] flex-1 py-16 md:py-24",children:e.jsxs("div",{className:"container mx-auto px-6 max-w-5xl",children:[e.jsx(h,{children:e.jsxs("p",{className:"text-xs font-bold uppercase tracking-widest text-gray-400 mb-8",children:[ds.length," tools available"]})}),e.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:ds.map((t,a)=>e.jsx(h,{delay:a*.08,children:e.jsxs(v,{to:t.href,className:"group flex flex-col h-full bg-white border border-gray-200 rounded-2xl p-7 hover:shadow-lg hover:border-gray-300 transition-all",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-5",children:[e.jsx("div",{className:`w-11 h-11 rounded-xl flex items-center justify-center border ${t.accentBg} ${t.accentBorder} ${t.accentText}`,children:t.icon}),e.jsx("span",{className:`text-[10px] font-bold uppercase tracking-widest border rounded-full px-3 py-1 ${t.accentBg} ${t.accentBorder} ${t.accentText}`,children:t.badge})]}),e.jsx("h2",{className:"text-xl font-black text-[#1a2e5a] mb-2 leading-snug group-hover:text-[#0077cc] transition-colors",children:t.title}),e.jsx("p",{className:"text-gray-500 text-sm leading-relaxed mb-6 flex-1",children:t.description}),e.jsx("ul",{className:"space-y-1.5 mb-6",children:t.highlights.map(s=>e.jsxs("li",{className:"flex items-center gap-2 text-xs text-gray-500",children:[e.jsx(Ls,{className:"w-3.5 h-3.5 shrink-0",style:{color:t.accent}}),s]},s))}),e.jsxs("div",{className:"inline-flex items-center gap-2 text-sm font-semibold transition-colors",style:{color:t.accent},children:["Open tool ",e.jsx(W,{className:"w-4 h-4 group-hover:translate-x-1 transition-transform"})]})]})},t.id))}),e.jsx(h,{delay:.2,children:e.jsxs("div",{className:"mt-16 bg-[#f0f7ff] border border-[#b8d9f0] rounded-2xl px-8 py-8 flex flex-col md:flex-row items-center justify-between gap-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-[#0077cc] mb-2",children:"Go further"}),e.jsx("h3",{className:"text-xl font-black text-[#1a2e5a] mb-1",children:"Want full automation?"}),e.jsx("p",{className:"text-sm text-gray-500 max-w-lg leading-relaxed",children:"These tools help you understand COUNTER R5.1. usagemetrics.ai automates the whole process â ingestion, bot filtering, SUSHI delivery and audit validation."})]}),e.jsxs("div",{className:"flex gap-3 shrink-0",children:[e.jsxs(v,{to:"/#pilot",className:"inline-flex items-center gap-2 px-6 py-3 bg-[#0077cc] text-white rounded-xl font-semibold text-sm hover:bg-[#005fa3] transition-all shadow-md shadow-blue-200/50 whitespace-nowrap",children:["Join the waitlist ",e.jsx(W,{className:"w-4 h-4"})]}),e.jsx(v,{to:"/",className:"inline-flex items-center gap-2 px-6 py-3 bg-white border border-gray-200 text-[#1a2e5a] rounded-xl font-semibold text-sm hover:bg-[#f8fafc] transition-all whitespace-nowrap",children:"Learn more"})]})]})})]})}),e.jsx(H,{})]})}const Bn={title:"The Impact of AI on Your Download Statistics",subtitle:"How LLMs and AI agents are distorting your usage metrics â and what to do about it",description:"The rise of large language models and AI agents has fundamentally changed how digital content is consumed. This white paper explores the growing impact of AI-generated traffic on academic publisher download statistics and presents strategies for identifying, filtering, and reclaiming accurate human engagement data.",category:"whitepaper",readTime:"12 min",date:"January 2025",tags:["AI Traffic","Bot Filtering","Usage Statistics","LLM","COUNTER R5.1","Cost Per Use"],seoTitle:"The Impact of AI on Academic Publisher Download Statistics | usagemetrics.ai",seoDescription:"How AI bots and LLMs are inflating academic publisher download statistics â and how to filter them out. A usagemetrics.ai white paper on detecting non-human traffic in COUNTER usage data.",canonical:"/resources/ai-impact-download-statistics"};function hs(){return e.jsxs(te,{meta:Bn,children:[e.jsx("h2",{children:"Executive Summary"}),e.jsx("p",{children:"The advent of large language models (LLMs) and AI agents has radically transformed the way digital content is consumed. For academic publishers, this creates a silent crisis: a growing share of âusageâ logged in your systems is generated by machines â not human readers. Left unaddressed, this AI traffic artificially inflates your COUNTER statistics, distorts cost-per-use analysis, and undermines the trust libraries place in your data. This white paper provides a framework for understanding, detecting, and filtering AI-generated traffic â and for building a data strategy that gives you and your library partners confidence in your engagement numbers."}),e.jsx("h2",{children:"1. The AI Era and Content Consumption"}),e.jsx("p",{children:"In the three years since large language models entered the mainstream, the volume of automated requests to academic content platforms has grown dramatically. Tools like ChatGPT, Claude, Perplexity, and a long tail of research assistants, systematic review tools, and AI-powered reference managers are continuously crawling, downloading, and parsing scholarly content at machine speed."}),e.jsx("p",{children:"This is qualitatively different from the bot traffic publishers have always had to contend with. Traditional web crawlers (Googlebot, Bingbot) are well-identified, move at predictable rates, and are routinely filtered by established robot exclusion lists. AI-driven access is different:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"It operates at much higher request volumes and speeds than traditional bots"}),e.jsx("li",{children:"It uses User-Agent strings that may mimic legitimate browsers or known tools"}),e.jsx("li",{children:"It targets content with academic depth â full-text PDFs, structured metadata â not just surface-level HTML"}),e.jsx("li",{children:"Its IP origins are distributed across cloud infrastru
221cture (AWS, Azure, GCP) that overlaps with legitimate institutional access"}),e.jsx("li",{children:"It is commercially motivated â AI companies are not neutral crawlers; they are building data assets"})]}),e.jsxs("p",{children:["For publishers, the question is no longer ",e.jsx("em",{children:"whether"})," AI traffic is affecting their statistics â it is ",e.jsx("em",{children:"by how much"}),"."]}),e.jsx("h2",{children:"2. Defining AI and Non-Human Traffic"}),e.jsx("p",{children:"Not all non-human traffic is the same. Understanding the taxonomy is essential for building effective detection strategies:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Known robots and crawlers:"})," Search engine bots, indexing agents, and monitoring services listed in the COUNTER robot exclusion list. These are relatively straightforward to filter."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"AI training scrapers:"})," Automated pipelines downloading content at scale to build or augment AI training datasets. Often disguised as browser traffic or use rotating IP pools to evade detection."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"LLM-powered research tools:"})," Tools like Consensus, Elicit, or Research Rabbit that use AI to retrieve and summarize academic content on behalf of human users. Ambiguous â a human initiated the query, but a machine executed the content access."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"API-based AI integrations:"})," Publishers increasingly offer API access to their content. Calls via a licensed API from an AI system may or may not represent genuine human-initiated research."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Institutional AI tools:"})," Universities deploying ChatGPT Enterprise or similar tools where faculty and students generate AI-mediated content requests that flow back to publisher platforms."]})]}),e.jsx("h2",{children:"3. The Impact on Traditional Usage Statistics"}),e.jsxs("p",{children:["Even conservatively estimated, AI-generated traffic is materially affecting publisher metrics. usagemetrics.ai analysis of anonymised platform data from pilot partners found that between ",e.jsx("strong",{children:"15% and 35%"})," of logged access events on typical academic publisher platforms are attributable to non-human agents â a figure that has grown year-over-year since 2022."]}),e.jsx("h3",{children:"Inflated Download Figures"}),e.jsx("p",{children:"When AI scrapers download PDFs or access full-text content, COUNTER processing rules apply. If the access is not caught by the robot exclusion filter, it is counted as a legitimate Total_Item_Request. The result: download numbers that overstate true readership. A journal reporting 200,000 annual downloads may, in fact, have only 140,000 human reads."}),e.jsx("h3",{children:"Distorted Cost-Per-Use Calculations"}),e.jsx("p",{children:"Cost-per-use (CPU) is one of the most widely used metrics in library subscription renewal decisions. If usage is artificially inflated, CPU appears lower than it actually is. This creates a false sense of value that can mask declining human readership, and can unravel trust when libraries begin their own investigations."}),e.jsx("h3",{children:"Misleading Editorial Intelligence"}),e.jsx("p",{children:"Publishers use usage trends to guide editorial strategy â which subjects to develop, which titles to prioritise for promotion, which content types attract investment. AI-distorted data pollutes this intelligence. A spike in downloads of a specific article may reflect an AI training run, not genuine scholarly interest."}),e.jsx("h3",{children:"Consequences for Library Negotiations"}),e.jsx("p",{children:"Libraries are becoming increasingly aware of the AI traffic problem. Some have begun applying their own filtering or discounting publisher-reported figures when AI contamination is suspected. Publishers who can demonstrate proactive, transparent AI traffic filtering gain a significant competitive advantage in renewal negotiations â and avoid the reputational damage of being caught with inflated statistics."}),e.jsx("h2",{children:"4. Identifying and Filtering AI Traffic"}),e.jsx("p",{children:"Effective AI traffic detection requires a multi-layered approach. No single signal is sufficient; robust detection requires combining multiple indicators:"}),e.jsx("h3",{children:"Layer 1: User-Agent Analysis"}),e.jsx("p",{children:"Many AI tools and scrapers use identifiable User-Agent strings. Maintaining an up-to-date list of known AI crawler signatures â beyond the standard COUNTER robot exclusion list â is the first line of defence. usagemetrics.ai maintains a continuously updated AI agent signature database covering known LLM training scrapers, AI research tools, and cloud-based crawlers."}),e.jsx("h3",{children:"Layer 2: IP Reputation Scoring"}),e.jsx("p",{children:"AI scraping operations frequently originate from cloud infrastru
221cture. IP ranges associated with AWS, Azure, GCP, and known AI company networks can be flagged for elevated scrutiny. Access from these ranges is not automatically excluded â legitimate institutional users also access content through cloud VPNs â but it triggers higher-confidence AI traffic signals when combined with other indicators."}),e.jsx("h3",{children:"Layer 3: Behavioural Pattern Analysis"}),e.jsx("p",{children:"AI traffic exhibits distinctive behavioural patterns that diverge from human reading behaviour:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Speed:"})," AI agents access content at rates that exceed human reading speed by orders of magnitude. A session accessing 200 articles in 10 minutes is definitively non-human."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Depth uniformity:"})," Human readers show variable download patterns. AI scrapers tend to access content comprehensively and uniformly across a topic area."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"No-referrer access:"})," AI-driven requests frequently bypass normal referral chains (journal homepage â abstract â full text), going directly to full-text content."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Session absence
221:"})," Many AI access patterns show no session continuity â individual requests arrive without the cookie-based session identifiers that characterise human browsing."]})]}),e.jsx("h3",{children:"Layer 4: usagemetrics.ai's Proprietary Detection Engine"}),e.jsx("p",{children:"usagemetrics.ai combines all of these signals in a trained machine learning model that continuously improves as new AI traffic patterns emerge. Rather than relying on static lists or single-signal rules, our engine assigns a confidence score to each access event â allowing publishers to apply thresholds that balance aggressive filtering against the risk of false positives."}),e.jsx("h2",{children:"5. Beyond Filtering: Making Human Engagement the Core Metric"}),e.jsx("p",{children:"Filtering AI traffic is necessary â but the real opportunity is in what you do with clean data. Publishers who establish robust human-engagement baselines unlock several strategic advantages:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Credible CPU reporting:"})," Human-only CPU figures are more defensible in library negotiations. When you can show the methodology behind your filtering, you build trust that your numbers reflect genuine value."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Sharper editorial signals:"})," Usage trends based on human reads reflect actual scholarly demand, enabling better investment decisions in content development and marketing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Differentiated market positioning:"})," As AI traffic contamination becomes widely understood, publishers who can certify the human origin of their usage data will stand out from those who cannot."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Future-proof COUNTER reporting:"})," If â as many expect â Project COUNTER introduces separate reporting categories for AI usage, publishers with detection infrastructure already in place will have a significant head start."]})]}),e.jsx("h2",{children:"6. The Future of Usage Statistics in the AI Era"}),e.jsx("p",{children:"The industry is at an inflection point. Several trajectories are plausible:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Separate AI usage metrics:"})," COUNTER or a parallel standard introduces distinct reporting for machine-mediated content access, creating a new revenue category and reporting obligation for publishers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Licensed AI access programmes:"})," Publishers negotiate directly with AI companies (as some major STM publishers already have), creating a new data stream distinct from COUNTER reporting."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Library-side filtering standards:"})," Library consortia develop their own filtering standards and begin asking publishers to certify AI-clean statistics â creating a new compliance expectation."]})]}),e.jsx("p",{children:"In all of these scenarios, publishers with detection infrastructure â and the data provenance to prove their filtering methodology â will be best positioned."}),e.jsx("h2",{children:"7. Conclusion: Take Back Control of Your Data"}),e.jsx("p",{children:"AI-generated traffic is not going away. It will grow as AI tools proliferate and as the economic incentives driving content scraping intensify. The publishers who address this challenge now â building detection infrastructure, cleaning historical data baselines, and communicating their methodology transparently to library partners â will emerge with stronger relationships and more defensible usage data."}),e.jsx("p",{children:"usagemetrics.ai is purpose-built for this challenge. Our platform combines COUNTER R5.1 compliance automation with a native AI traffic detection engine â giving publishers a single, integrated solution for accurate, trustworthy usage statistics."}),e.jsx("p",{children:e.jsx("strong",{children:"The question is not whether AI is affecting your statistics. The question is whether you can prove it isn't â or prove exactly how much it is."})})]})}const Hn={title:"COUNTER Code of Practice R5.1: A Complete Implementation Guide for Publishers",subtitle:"Everything report providers need to know to achieve and maintain COUNTER compliance under Release 5.1.0.1",description:"A comprehensive guide to the COUNTER Code of Practice Release 5.1.0.1 â covering report types, metric definitions, data processing rules, SUSHI API requirements, audit procedures, and how to transition from R5. Written for academic publishers and platform operators.",category:"whitepaper",readTime:"20 min",date:"March 2025",tags:["COUNTER R5.1","Code of Practice","SUSHI","Audit","Publishers","Compliance","Reports"],seoTitle:"COUNTER Code of Practice R5.1: Publisher Implementation Guide | usagemetrics.ai",seoDescription:"Comprehensive guide to the COUNTER Code of Practice R5.1.0.1 for academic publishers. Covers report types (PR, DR, TR, IR), metric definitions, processing rules, SUSHI API, audit requirements, and R5-to-R5.1 transition.",canonical:"/resources/counter-code-of-practice-r51"};function us(){return e.jsxs(te,{meta:Hn,children:[e.jsx("h2",{children:"Executive Summary"}),e.jsxs("p",{children:["The ",e.jsx("strong",{children:"COUNTER Code of Practice Release 5.1.0.1"}),", published on 14 January 2025, is the current mandatory standard for usage statistics reporting in academic publishing. It is the requirement for COUNTER compliance effective immediately."]}),e.jsx("p",{children:"For academic publishers, platform operators, and aggregators, R5.1 is not a minor update â it introduces substantive changes to report structure, data types, access type definitions, and item-level counting rules that require deliberate technical implementation. This white paper translates the full Code of Practice into a structured implementation guide, covering every section relevant to report providers."}),e.jsxs("p",{children:["The COUNTER Code of Practice is published and maintained by"," ",e.jsx("a",{href:"https://www.countermetrics.org",target:"_blank",rel:"noopener noreferrer",children:"COUNTER Metrics Limited"})," ","and is available in full at"," ",e.jsx("a",{href:"https://cop5.countermetrics.org",target:"_blank",rel:"noopener noreferrer",children:"cop5.countermetrics.org"}),"."]}),e.jsx("h2",{children:"1. Purpose and Scope"}),e.jsx("p",{children:"The COUNTER Code of Practice provides a framework for recording and exchanging online usage statistics for digital resources â journals, databases, books, reference works, and multimedia. It covers:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Data elements to be measured and their definitions"}),e.jsx("li",{children:"Content and format of usage reports"}),e.jsx("li",{children:"Data processing requirements (double-click filtering, bot exclusion, session counting)"}),e.jsx("li",{children:"Auditing requirements for compliance certification"}),e.jsx("li",{children:"COUNTER API (formerly SUSHI) specifications for automated report harvesting"})]}),e.jsxs("p",{children:["Compliance applies to ",e.jsx("strong",{children:"report providers"})," â publishers, aggregators, platform operators, and third-party reporting services acting on behalf of publishers. Report providers must conform to the current Code of Practice for their usage statistics to be designated COUNTER compliant."]}),e.jsx("h2",{children:"2. The Four COUNTER Reports"}),e.jsxs("p",{children:["R5.1 defines four primary COUNTER Reports. Each is customisable through filters and attributes. Pre-set filtered views called ",e.jsx("strong",{children:"Standard Views"})," cover the most common reporting needs."]}),e.jsx("h3",{children:"Platform Report (PR)"}),e.jsxs("p",{children:["Required for ",e.jsx("strong",{children:"all Host_Types"}),". Summarises activity across a report provider's platforms. The Standard View ",e.jsx("code",{children:"PR_P1"})," (Platform Usage) reports platform-level usage summarised by Metric_Type, including ",e.jsx("code",{children:"Searches_Platform"}),","," ",e.jsx("code",{children:"Total_Item_Requests"}),", ",e.jsx("code",{children:"Unique_Item_Requests"}),", and"," ",e.jsx("code",{children:"Unique_Title_Requests"}),"."]}),e.jsx("h3",{children:"Database Report (DR)"}),e.jsx("p",{children:"Required for A&I databases, aggregated full-content hosts, discovery services, eBook collections, full-content databases, and multimedia collections. Standard Views:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"DR_D1"})," â Database Search and Item Usage: key searches, investigations, and requests metrics"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DR_D2"})," â Database Access Denied: turnaways due to licence limits or missing licences"]}
221)]}),e.jsx("h3",{children:"Title Report (TR)"}),e.jsx("p",{children:"Required for aggregated full-content hosts, eBook hosts, eBook collections, and eJournal hosts. Reports usage at the title level. Standard Views:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"TR_B1"})," â Book Requests (Controlled)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_B2"})," â Book Access Denied"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_B3"})," â Book Usage by Access Type"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J1"})," â Journal Requests (Controlled)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J2"})," â Journal Access Denied"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J3"})," â Journal Usage by Access Type"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"TR_J4"})," â Journal Requests by YOP (Controlled)"]})]}),e.jsx("h3",{children:"Item Report (IR)"}),e.jsx("p",{children:"Required for data repositories, multimedia hosts, repositories, and scholarly collaboration networks. Reports usage at the granular item level (article, chapter, multimedia object). Standard Views:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"IR_A1"})," â Journal Article Requests: ",e.jsx("code",{children:"Total_Item_Requests"})," and"," ",e.jsx("code",{children:"Unique_Item_Requests"})," for articles"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"IR_M1"})," â Multimedia Item Requests"]})]}),e.jsxs("p",{children:["R5.1 encourages all Host_Types to offer a ",e.jsx("strong",{children:"Global Item Report"}),' â an IR attributed to "The World" covering all global usage, whether attributed to institutions or not. This is particularly relevant for open access content.']}),e.jsx("h2",{children:"3. Metric Types"}),e.jsx("p",{children:"Metrics fall into four categories:"}),e.jsx("h3",{children:"Searches"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Searches_Regular"})," â user-initiated searches where the user selects the databases"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Searches_Automated"})," â platform searches across multiple pre-selected databases where the user has no selection option"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Searches_Federated"})," â searches from federated search engines via client-server technology"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Searches_Platform"})," â platform-level searches; each user-initiated search counted once regardless of databases involved"]})]}),e.jsx("h3",{children:"Investigations and Requests"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Investigations"})," cover any access to content information â including abstracts, metadata views, and full text. ",e.jsx("strong",{children:"Requests"})," are limited to full content retrieval (reading, downloading, streaming)."]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Total_Item_Investigations"})," â total accesses to a content item or its metadata"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Total_Item_Requests"})," â total full-content retrievals"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Unique_Item_Investigations"})," â unique content items investigated per user session"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Unique_Item_Requests"})," â unique content items requested per user session"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Unique_Title_Investigations"})," â unique titles investigated per user session (books only)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Unique_Title_Requests"})," â unique titles requested per user session (books only)"]})]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Critical R5.1 change for books:"})," In R5.1, each Book_Segment (chapter, section) accessed in a session MUST be counted as a separate ",e.jsx("code",{children:"Unique_Item_Investigation"})," or"," ",e.jsx("code",{children:"Unique_Item_Request"}),". In R5, the same session counted as only 1 unique item regardless of how many chapters were accessed. This means item-level counts for book content will be significantly higher in R5.1."]}),e.jsx("h3",{children:"Access Denied"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"No_License"})," â access denied because the institution has no licence for the content"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Limit_Exceeded"})," â access denied because the simultaneous-user limit was exceeded"]})]}),e.jsx("h2",{children:"4. Key Attributes"}),e.jsx("h3",{children:"Access_Type"}),e.jsx("p",{children:"R5.1 uses three Access_Type values:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Controlled"})," â content restricted to authorised users at the time of access, including free content requiring registration"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Open"})," â content available to all users under an open access model at the time of access; the publisher asserts OA status; not intended to return to Controlled"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Free_To_Read"})," â content available to all users but not Open; may have been Controlled in the past or may return to Controlled (e.g. promotional content, delayed OA)"]})]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Important:"})," Access_Type applies to access on the platform where usage occurs, applies to all parts of a content item (metadata through full text), and applies consistently â an item MUST NOT be reported as Open for one user and Controlled for another."]}),e.jsxs("p",{children:["This replaces the R5 distinction between ",e.jsx("code",{children:"OA_Gold"})," and"," ",e.jsx("code",{children:"Other_Free_To_Read"}),", which caused widespread confusion. The standard views"," ",e.jsx("code",{children:"TR_B1"}),", ",e.jsx("code",{children:"TR_J1"}),", and ",e.jsx("code",{children:"TR_J4"})," now report only Controlled content, excluding Open and Free_To_Read materials."]}),e.jsx("h3",{children:"Data_Type"}),e.jsx("p",{children:"R5.1 significantly expanded the Data_Type vocabulary to enable more accurate content classification. Key Data_Types include:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Article"})," â journal articles, preprints, author accepted manuscripts"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Book"})," â monographs, textbooks, edited volumes"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Book_Segment"})," â chapters or sections; whole book counted as single Book_Segment where segments cannot be identified"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Journal"})," â serial publications"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Conference / Conference_Item"})," â collections and individual conference papers"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Dataset"})," â research data"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Reference_Work / Reference_Item"})," â encyclopedias, dictionaries and entries within them"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Database_Aggregated, Database_AI, Database_Full"})," â for denial and search metrics only"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Unspecified"})," â content that cannot be classified; generates a Warning in the Validation Tool"]})]}),e.jsxs("p",{children:[e.jsx("code",{children:"Section_Type"})," from R5 is removed in R5.1."]}),e.jsx("h3",{children:"Access_Method"}),e.jsxs("p",{children:[e.jsx("strong",{children:"Regular"})," â typical human browsing and searching. ",e.jsx("strong",{children:"TDM"})," â text and data mining. TDM usage MUST be reported in the Platform, Database, and Title Reports but MUST NOT appear in Standard Views."]}),e.jsx("h3",{children:"YOP (Year of Publication)"}),e.jsxs("p",{children:["Required for all Investigations, Requests, and Access Denied metrics in Title and Item Reports. Use ",e.jsx("code",{children:"0001"})," for unknown YOP, ",e.jsx("code",{children:"9999"})," for articles in press. Use the Version of Record publication year where print and online years differ."]}),e.jsx("h2",{children:"5. Report Formats and Delivery Requirements"}),e.jsx("p",{children:"Reports MUST be delivered in two formats:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"JSON via the COUNTER API"})," â the machine-readable format used for automated harvesting via library ERM systems. Must comply with the COUNTER API Specification at"," ",e.jsx("a",{href:"https://countermetrics.stoplight.io/docs/counter-sushi-api",target:"_blank",rel:"noopener noreferrer",children:"countermetrics.stoplight.io"})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Tabular format (Excel or TSV)"})," â must be available via a web interface accessible to library customers. UTF-8 encoded. Each report as a separate file."]})]}),e.jsx("h3",{children:"Mandatory delivery rules"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Reports MUST be provided monthly"}),e.jsx("li",{children:"Data MUST be updated within 4 weeks of the end of the reporting period"}),e.jsx("li",{children:"A minimum of the current year plus the prior 24 months of data MUST be available"}),e.jsx("li",{children:"If usage for a month is not yet processed, E
221xception 3031 MUST be returned â partial data MUST NOT be reported"}),e.jsx("li",{children:"Reports MUST allow customers to specify date ranges by month"})]}),e.jsx("h2",{children:"6. Data Processing Rules"}),e.jsx("p",{children:"Processing rules define how raw usage events are cleaned and transformed before being included in reports. Getting these right is the difference between compliant and non-compliant data."}),e.jsx("h3",{children:"HTTP Status Codes"}),e.jsxs("p",{children:["Only successful requests MUST be counted: HTTP status codes ",e.jsx("strong",{children:"200"})," and"," ",e.jsx("strong",{children:"304"}),". All other responses (redirects, errors, not found) must be excluded."]}),e.jsx("h3",{children:"Double-Click Filtering"}),e.jsxs("p",{children:["Two clicks on the same content by the same user within a ",e.jsx("strong",{children:"30-second window"})," ","MUST be counted as a single action. The first request is removed; the second is retained. Double-click filtering applies to ",e.jsx("code",{children:"Total_Item_Investigations"}),","," ",e.jsx("code",{children:"Total_Item_Requests"}),", ",e.jsx("code",{children:"No_License"}),", and ",e.jsx("code",{children:"Limit_Exceeded"}),"."]}),e.jsx("p",{children:"User identification for double-click filtering follows this priority:"}),e.jsxs("ol",{children:[e.jsx("li",{children:"Logged-in username"}),e.jsx("li",{children:"User cookie"}),e.jsx("li",{children:"Session cookie"}),e.jsx("li",{children:"IP address + User-Agent (least reliable)"})]}),e.jsx("h3",{children:"Counting Unique Items"}),e.jsx("p",{children:"If multiple transactions for the same item occur within the same user session, only one unique activity is counted. A user session is defined by:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Logged session ID + transaction date, or"}),e.jsx("li",{children:"User ID + transaction date + hour of day, or"}),e.jsx("li",{children:"User cookie + transaction date + hour of day, or"}),e.jsx("li",{children:"IP address + User-Agent + transaction date + hour of day"})]}),e.jsx("p",{children:"Where session IDs are not tracked, a surrogate session ID is generated by combining the transaction date + one-hour time slice + user ID, cookie, or IP+User-Agent. Statistical studies confirm this produces unique counts within 1â2% of actual session-based counts."}),e.jsx("h3",{children:"Internet Robots and Crawlers"}),e.jsxs("p",{children:["Activity from internet robots and crawlers MUST be excluded from all COUNTER reports. COUNTER maintains an official"," ",e.jsx("a",{href:"https://github.com/Project-Counter/COUNTER-Robots",target:"_blank",rel:"noopener noreferrer",children:"robot exclusion list"})," ","that is updated regularly. Any transaction matching a User-Agent on this list MUST be excluded."]}),e.jsx("p",{children:"Report providers MUST also exclude other identifiable robots and crawlers not on the official list. Harvesting for TDM without permission MUST be treated as robot traffic."}),e.jsx("h3",{children:"Text and Data Mining (TDM)"}),e.jsxs("p",{children:["TDM usage MUST be reported separately using ",e.jsx("code",{children:"Access_Method=TDM"}),". Typical methods for isolating TDM traffic: dedicated API endpoints, special account credentials, API keys, or registered harvesting IP addresses."]}),e.jsx("h3",{children:"Restating Data"}),e.jsxs("p",{children:["If errors are found in previously submitted reports, the report provider MUST correct them within ",e.jsx("strong",{children:"three months"})," of discovery and notify COUNTER at"," ",e.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})," so the COUNTER Registry can be updated. Libraries with archived data should be informed directly."]}),e.jsx("h3",{children:"Abnormal Usage Spikes"}),e.jsxs("p",{children:["A ",e.jsx("strong",{children:"positive spike"})," is flagged when monthly usage exceeds three times the previous 12-month average by at least 100 units. A ",e.jsx("strong",{children:"negative spike"})," is flagged when monthly usage falls below 1% of the 12-month average (where the average is at least 20 units). These thresholds are prompts for human investigation, not automated data exclusions."]}
221),e.jsx("h2",{children:"7. COUNTER API (Formerly SUSHI) Requirements"}),e.jsxs("p",{children:["Starting with R5.1, the COUNTER API paths include the release version in the format"," ",e.jsx("code",{children:"/r51/"}),". Report providers MUST support the following endpoints:"]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"GET /r51/status"})," â public endpoint (no authentication required); returns operating status, COUNTER Registry URL, and service alerts"]}),e.jsxs("li",{children:[e.jsx("code",{children:"GET /r51/reports"})," â returns list of supported reports with first and last available months"]}),e.jsxs("li",{children:[e.jsxs("code",{children:["GET /r51/reports/","{","report_id","}"," "]})," â individual report endpoints, e.g."," ",e.jsx("code",{children:"/r51/reports/tr_j1"})]}),e.jsxs("li",{children:[e.jsx("code",{children:"GET /r51/members"})," â returns consortium member details and their COUNTER API credentials"]})]}),e.jsx("h3",{children:"Authentication"}),e.jsx("p",{children:"The COUNTER API MUST be secured using TLS (HTTPS) and one or both of:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Combination of Customer_ID and Requestor_ID"}),e.jsx("li",{children:"API key"})]}),e.jsxs("p",{children:["IP-based authentication is explicitly prohibited in R5.1. The"," ",e.jsx("code",{children:"/r51/status"})," endpoint MUST remain public."]}),e.jsx("h3",{children:"Error Handling"}),e.jsx("p",{children:"Implementations MUST return standardised Exception Codes. Key codes include:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"3030"})," â No Usage Available for Requested Dates (HTTP 200)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"3031"})," â Usage Not Ready for Requested Dates (HTTP 200)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"3032"})," â Usage No Longer Available for Requested Dates (HTTP 200)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"2000"})," â Requestor Not Authorized (HTTP 401)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"2020"})," â APIKey Invalid (HTTP 401)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"1000"})," â Service Not Available (HTTP 503)"]})]}),e.jsx("h2",{children:"8. Audit Requirements"}),e.jsxs("p",{children:["An ",e.jsx("strong",{children:"independent annual audit"})," is required of each report provider's reports and processes to certify COUNTER compliance. Auditors may be Certified Public Accountants (CPAs), Chartered Accountants (CAs), or COUNTER-approved auditors."]}),e.jsx("h3",{children:"The Five-Stage Audit Process"}),e.jsxs("ol",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Pre-flight preparation"})," â run all JSON and tabular reports through the COUNTER Validation Tool; fix identified issues before proceeding"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Audit initiation"})," â agree scope with auditor; scope MUST include all required reports and Standard Views"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Seeding"})," â auditors perform structured test actions on the platform over one full calendar month"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Report reconciliation"})," â auditor reconciles COUNTER reports against seeding actions; produces Pass Report or Interim Report"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Audit complete"})," â Pass Report issued; COUNTER Registry updated"]})]}),e.jsx("h3",{children:"Audit Result Categories"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Pass"})," â fully compliant; no required action"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Qualified Pass"})," â minor issue noted; must be resolved within 3 months to maintain compliance"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Interim Report"})," â significant issue; must be resolved within 3 months"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Fail"})," â issues from Interim Report unresolved; fresh audit (new seeding) required within 3 months"]})]}),e.jsx("h3",{children:"Audit Tolerances"}),e.jsxs("p",{children:["All metrics reported MUST be within a ",e.jsx("strong",{children:"-8% to +3% reliability window"})," of the same metrics on the auditor's seeding records."]}),e.jsx("h3",{children:"Alternate-Year Audits"}),e.jsx("p",{children:"Report providers with a single platform containing up to 150 books, 15 journals, or one database may apply for alternate-year audit status (every 24 months)."}),e.jsx("h2",{children:"9. Transitioning from R5 to R5.1"}),e.jsx("p",{children:"The official R5 to R5.1 transition timeline:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["R5.1 compliance REQUIRED from ",e.jsx("strong",{children:"February 2025"})," for January 2025 usage"]}),e.jsxs("li",{children:["R5-compliant reports MUST be available until ",e.jsx("strong",{children:"April 2025"})," for usage up to March 2025"]}),e.jsx("li",{children:"R5 reports may be offered beyond April 2025 at the provider's discretion"})]}),e.jsx("h3",{children:"Comparing R5 and R5.1 data"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Item-level book metrics will be larger in R5.1 (each Book_Segment counted separately); use ",e.jsx("code",{children:"Unique_Title_Investigations"})," and ",e.jsx("code",{children:"Unique_Title_Requests"})," for cross-release comparison"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Section_Type"})," is removed â do not expect backward compatibility in reports that used it"]}),e.jsx("li",{children:"The expanded Data_Type list means conference papers and other content types can now be more accurately classified"}),e.jsxs("li",{children:["Access_Type definitions have changed â ",e.jsx("code",{children:"TR_B1"}),", ",e.jsx("code",{children:"TR_J1"}),", and"," ",e.jsx("code",{children:"TR_J4"})," now show only Controlled content; use the full TR for a complete picture"]}
221),e.jsx("li",{children:"The R5.1 JSON schema is more compact than R5; it can be converted back to R5 structure but requires careful handling"})]}),e.jsx("h2",{children:"10. Consortia Reporting"}),e.jsx("p",{children:"Consortia managers MUST be able to access usage reports for all member institutions from a single login. Report providers MUST:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Offer ",e.jsx("strong",{children:"summary reports"})," showing consortium-level totals (cannot be broken down by institution)"]}),e.jsxs("li",{children:["Support the ",e.jsx("code",{children:"/r51/members"})," COUNTER API path to provide consortium member details and credentials"]}),e.jsx("li",{children:"Not place rate limits on the COUNTER API that would prevent full consortium harvesting"})]}),e.jsxs("p",{children:["Detailed reports broken down by institution are optional but, if provided, the"," ",e.jsx("code",{children:"Customer_ID"})," in the detailed report MUST match the ",e.jsx("code",{children:"Customer_ID"})," ","returned by ",e.jsx("code",{children:"/r51/members"}),"."]}),e.jsx("h2",{children:"11. Extending the Code of Practice"}),e.jsxs("p",{children:["Report providers wishing to create custom reports or add custom elements can do so using their COUNTER-assigned ",e.jsx("strong",{children:"platform ID as a namespace"}),". Custom elements follow the format ",e.jsxs("code",{children:["{","namespace","}",":","{","element name","}"," "]}),", for example"," ",e.jsx("code",{children:"pubsiteA:Total_Linkouts"}),"."]}),e.jsx("p",{children:"Common reserved extensions available to all providers include:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("code",{children:"Institution_Name"})," and ",e.jsx("code",{children:"Customer_ID"})," â for consortium breakdowns"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Country_Name"})," / ",e.jsx("code",{children:"Country_Code"})," â ISO 3166-1 geolocation"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Subdivision_Name"})," / ",e.jsx("code",{children:"Subdivision_Code"})," â ISO 3166-2 regional breakdown"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Attributed"})," â whether usage was attributed to an institution (Yes/No)"]}),e.jsxs("li",{children:[e.jsx("code",{children:"Book_Segment_Count"})," â number of segments within a book (TR only)"]})]}),e.jsx("p",{children:"Custom extensions MUST NOT be used with Standard Views of COUNTER Reports and MUST only be included in reports when explicitly requested."}),e.jsx("h2",{children:"12. Confidentiality and Privacy"}),e.jsx("p",{children:"The Code of Practice imposes clear confidentiality obligations:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Statistical data that reveals information about individual users MUST NOT be released or sold without permission"}),e.jsx("li",{children:"Statistical usage information about specific institutions MUST NOT be released without permission, except to consortium administrators and the original copyright holder"}),e.jsx("li",{children:"Aggregate comparisons that do not identify specific institutions do not require prior permission"}),e.jsx("li",{children:"Report providers are responsible for GDPR compliance and other applicable privacy regulations"})]}),e.jsx("h2",{children:"Key Takeaways for Publishers"}),e.jsxs("ul",{children:[e.jsx("li",{children:"R5.1.0.1 is the mandatory standard from 14 January 2025 â if you are still on R5, you are out of compliance."}),e.jsx("li",{children:"The biggest technical changes are book item-level counting (each Book_Segment counted separately), the revised Access_Type definitions, and the expanded Data_Type vocabulary."}),e.jsx("li",{children:"IP-based authentication for the COUNTER API is no longer permitted â migrate to Customer_ID/Requestor_ID or API keys."}),e.jsxs("li",{children:["COUNTER API paths now include the release version: all R5.1 paths begin with"," ",e.jsx("code",{children:"/r51/"}),"."]}),e.jsx("li",{children:"Run your reports through the COUNTER Validation Tool before every audit â pre-flight validation is the single most effective way to prevent audit failures."}),e.jsx("li",{children:"Bot exclusion is mandatory and your responsibility â maintain alignment with the COUNTER robot list and exclude other identifiable non-human traffic."}),e.jsx("li",{children:"Data restatements must be completed within three months of error discovery and notified to COUNTER."}),e.jsx("li",{children:"A continuous compliance approach â validating reports on every generation cycle, not just before audits â is the only reliable way to maintain clean data over time."})]})]})}const $n={title:"The COUNTER Validator: Your Essential Pre-Audit Compliance Tool",subtitle:"How to use validator.countermetrics.org to catch errors before they cost you your certification",description:"A practical guide to the official COUNTER Validator â what it checks, how to use it effectively for JSON, tabular, and SUSHI API reports, and how to integrate it into a continuous compliance workflow.",category:"whitepaper",readTime:"10 min",date:"March 2025",tags:["COUNTER Validator","COUNTER R5.1","SUSHI","Compliance","Audit","Publishers"],seoTitle:"The COUNTER Validator: Pre-Audit Compliance Tool Guide | usagemetrics.ai",seoDescription:"Learn how to use the official COUNTER Validator at validator.countermetrics.org to validate JSON, tabular, and SUSHI API reports against R5 and R5.1 before your audit. Practical guidance for academic publishers.",canonical:"/resources/counter-validator-guide"};function ms(){return e.jsxs(te,{meta:$n,children:[e.jsx("h2",{children:"Executive Summary"}),e.jsxs("p",{children:["The ",e.jsx("strong",{children:"COUNTER Validator"})," â available free of charge at"," ",e.jsx("a",{href:"https://validator.countermetrics.org",target:"_blank",rel:"noopener noreferrer",children:"val
221idator.countermetrics.org"})," ","â is the official tool published by"," ",e.jsx("a",{href:"https://www.countermetrics.org",target:"_blank",rel:"noopener noreferrer",children:"COUNTER Metrics Limited"})," ","for validating usage reports against the COUNTER Code of Practice. It supports both Release 5 and Release 5.1, covers JSON and tabular report formats, and includes direct SUSHI API endpoint testing."]}),e.jsx("p",{children:"For any academic publisher pursuing or maintaining COUNTER compliance, the Validator is not optional infrastructure â it is the earliest and cheapest line of defence against the errors that cause audits to fail. This white paper explains what the tool does, how to use it effectively, and how to embed it into a repeatable compliance workflow."}),e.jsx("h2",{children:"1. What Is the COUNTER Validator?"}),e.jsxs("p",{children:["The COUNTER Validator is a web application developed and maintained by COUNTER Metrics Limited, the not-for-profit organisation that stewards the COUNTER standard. It is open source, with full source code available on"," ",e.jsx("a",{href:"https://github.com/Project-Counter/counter-validator",target:"_blank",rel:"noopener noreferrer",children:"GitHub"}),", and can be self-hosted by organisations that require it."]}),e.jsx("p",{children:"Its core purpose is straightforward: given a COUNTER report â in any supported format â it checks whether that report conforms to the rules defined in the Code of Practice and returns a structured list of errors, warnings, and confirmations. It does not fix reports; it diagnoses them. The correction work remains with the publisher, but the Validator tells you exactly where to look."}),e.jsx("h3",{children:"Supported validation modes"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"JSON report validation"})," â validates COUNTER R5 and R5.1 reports in the JSON format used by SUSHI API responses"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Tabular report validation"})," â validates the Excel/TSV tabular format used for manual report delivery"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"SUSHI API validation"})," â connects directly to a live SUSHI endpoint, fetches reports, and validates the responses in real time"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"API-based submission"})," â allows integration with CI/CD pipelines or internal tooling via the Validator's own API"]})]}),e.jsx("h2",{children:"2. Why Validation Matters Before Your Audit"}),e.jsx("p",{children:"COUNTER compliance audits are conducted by accredited third-party auditors. Auditors test a publisher's reports and SUSHI endpoints against the same rules the Validator checks â with one critical difference: a failed audit is on record, can affect your listing on the COUNTER registry, and requires a remediation cycle that delays re-certification."}),e.jsx("p",{children:"The Validator lets you run the same checks as the auditor, privately, as many times as needed, before the formal audit begins. In practice, publishers who validate systematically before submitting for audit encounter significantly fewer surprises."}),e.jsx("h3",{children:"Common errors caught by the Validator"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Header field violations"})," â missing or incorrect mandatory header fields such as",e.jsx("code",{children:"Created_By"}),", ",e.jsx("code",{children:"Reporting_Period"}),", or ",e.jsx("code",{children:"Institution_ID"})]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Invalid metric types"})," â use of metric types not permitted for a given report (e.g., ",e.jsx("code",{children:"Unique_Item_Requests"})," appearing in a PR report)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Data_Type mismatches"})," â R5.1 introduced stricter Data_Type vocabulary; values valid in R5 may be rejected in R5.1"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Access_Type errors"})," â incorrect or missing Access_Type values, particularly for Open Access content where ",e.jsx("code",{children:"Gold_OA"}),", ",e.jsx("code",{children:"Bronze_OA"}),", and ",e.jsx("code",{children:"Green_OA"}),"must be distinguished"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"YOP formatting"})," â Year of Publication must follow specific formatting rules; values like ",e.jsx("code",{children:"0001"})," for unknown YOP are often miscoded"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Duplicate rows"})," â rows that differ only in non-key fields can indicate aggregation errors in the upstream data pipeline"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Zero-count rows"})," â COUNTER R5.1 prohibits reporting rows where all metric values are zero"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"SUSHI error codes"})," â incorrect HTTP status codes or malformed SUSHI exception objects in API responses"]})]}),e.jsx("h2",{children:"3. Using the Validator: A Step-by-Step Approach"}),e.jsx("h3",{children:"Step 1 â Register for a free account"}),e.jsxs("p",{children:["The Validator requires a free account at"," ",e.jsx("a",{href:"https://validator.countermetrics.org/register",target:"_blank",rel:"noopener noreferrer",children:"val
221idator.countermetrics.org/register"}),". Registration gives you access to saved validations, shared validation links (useful for sharing results with colleagues or auditors), and the development environment for testing against a dedicated test SUSHI endpoint."]}),e.jsx("h3",{children:"Step 2 â Choose your validation mode"}),e.jsx("p",{children:"Select the mode that matches your current testing need:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Use ",e.jsx("strong",{children:"tabular validation"})," for reports generated by your reporting team and delivered to libraries via download or email"]}),e.jsxs("li",{children:["Use ",e.jsx("strong",{children:"JSON validation"})," for reports generated by your SUSHI backend before deploying an endpoint update"]}),e.jsxs("li",{children:["Use ",e.jsx("strong",{children:"SUSHI API validation"})," when your endpoint is live and you want to test it end-to-end as a library ERM system would"]})]}),e.jsx("h3",{children:"Step 3 â Submit a representative sample, not just one report"}),e.jsx("p",{children:"A common mistake is to validate a single report type and assume all others are clean. Each report type (TR, DR, IR, PR) has distinct rules. Validate at least one example of each report type you intend to provide, covering both R5 and R5.1 if you are in a transitional period."}
221),e.jsx("p",{children:"Pay particular attention to edge cases: reports for Open Access content, reports with unknown YOP, and reports covering content from multiple platforms."}),e.jsx("h3",{children:"Step 4 â Triage the output"}),e.jsx("p",{children:"The Validator returns three categories of output:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Errors"})," â hard failures that will cause an audit to fail. Fix these before proceeding."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Warnings"})," â conditions that are technically valid but unusual or potentially problematic. Investigate each one."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Info"})," â confirmations and informational notes. Review but typically no action required."]})]}),e.jsx("p",{children:"Do not treat warnings as acceptable noise. Some warnings indicate data quality issues that, while not strict violations, will draw auditor attention and may reveal genuine problems in your data pipeline."}),e.jsx("h3",{children:"Step 5 â Share results with your team"}),e.jsx("p",{children:"The Validator allows you to generate a shareable link for any validation run. Use this to loop in your development team, your compliance officer, or a third-party consultant without requiring them to re-upload the same reports. This significantly reduces the friction of cross-team remediation."}),e.jsx("h2",{children:"4. Integrating Validation into a Continuous Compliance Workflow"}),e.jsx("p",{children:"One-off validation before an audit is better than nothing â but it is not a compliance strategy. Errors introduced by a platform update, a data pipeline change, or a new content type may not be caught until the next audit cycle if validation is a periodic manual exercise."}),e.jsx("p",{children:"The Validator's API mode enables a more robust approach: automated validation on every report generation cycle. This means that every time your system produces a COUNTER report â whether monthly as part of a scheduled job or on demand via SUSHI â the report is submitted to the Validator and the results are checked programmatically."}),e.jsx("h3",{children:"What a continuous validation pipeline looks like"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Report generation"})," â your system aggregates raw usage events into COUNTER-format reports on a monthly schedule"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Automated validation"})," â the generated reports are submitted to the Validator API; any errors trigger an alert before the report is made available to libraries"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Error routing"})," â validation failures are routed to the responsible team with the specific error detail, not a generic alert"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Approval gate"})," â reports only become available via SUSHI or download after passing validation"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Audit trail"})," â all validation results are stored, providing a complete history of report quality over time"]})]}),e.jsx("p",{children:"This approach transforms compliance from a periodic review into a continuous quality gate â the same philosophy applied to software testing with unit tests and CI pipelines."}),e.jsx("h2",{children:"5. The R5.1 Transition and the Validator"}),e.jsx("p",{children:"The Validator is particularly valuable during the R5 to R5.1 transition. Both release versions are supported simultaneously, which means you can validate the same report against both standards during a transitional period â useful for confirming backward compatibility before fully committing to R5.1 output."}),e.jsx("p",{children:"Key R5.1 changes that the Validator specifically checks include:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Correct use of the new and modified ",e.jsx("strong",{children:"Data_Type"})," values introduced in R5.1 (e.g., the distinction between ",e.jsx("code",{children:"Article"}),", ",e.jsx("code",{children:"Book"}),", ",e.jsx("code",{children:"Book_Segment"}),")"]}),e.jsxs("li",{children:["Valid ",e.jsx("strong",{children:"Access_Type"})," vocabulary, including the OA sub-types required by R5.1"]}),e.jsxs("li",{children:["Correct ",e.jsx("strong",{children:"Metric_Type"})," combinations per report type under R5.1 rules"]}),e.jsxs("li",{children:["Updated ",e.jsx("strong",{children:"SUSHI API"})," response structure, including changes to exception handling and authentication headers"]})]}),e.jsx("p",{children:"If your system is generating reports that pass R5 validation but fail R5.1 validation, the Validator's output will tell you exactly which fields need updating â saving weeks of speculative debugging."}),e.jsx("h2",{children:"6. Self-Hosting the Validator"}),e.jsxs("p",{children:["For organisations with strict data governance requirements â particularly publishers handling confidential subscriber-level data â the Validator is available as a self-hosted option via its open-source"," ",e.jsx("a",{href:"https://github.com/Project-Counter/counter-validator",target:"_blank",rel:"noopener noreferrer",children:"GitHub repository"}),". Running your own instance means that no report data leaves your infrastru
221cture during the validation process."]}),e.jsx("p",{children:"Self-hosting also enables deeper integration: you can embed the Validator directly into your internal reporting pipeline without relying on an external service, and customise alerting, logging, and access controls to match your organisation's requirements."}),e.jsx("h2",{children:"7. Limitations to Be Aware Of"}),e.jsx("p",{children:"The Validator is a rules-based compliance checker, not a usage data auditor. There are things it does not and cannot check:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Data accuracy"})," â the Validator confirms that your reports are correctly structured and use valid vocabulary. It cannot confirm that the usage counts themselves are accurate. A report can pass validation while containing systematically overcounted or undercounted metrics."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Bot filtering"})," â the Validator does not assess whether your data pipeline correctly excludes robot and bot traffic as required by the Code of Practice. That is a separate, upstream concern."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Session deduplication"})," â whether your session-based metric calculations correctly implement the COUNTER protocol for counting unique sessions is outside the Validator's scope."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Historical restatements"})," â the Validator checks a report in isolation; it cannot detect whether a corrected report is consistent with previously submitted reports."]})]}),e.jsx("p",{children:"These limitations are not criticisms of the tool â they are a reminder that structural compliance and data quality compliance are two different things, and both are required for a clean audit."}),e.jsx("h2",{children:"Key Takeaways"}),e.jsxs("ul",{children:[e.jsx("li",{children:"The COUNTER Validator is the official, free tool for checking structural compliance of COUNTER R5 and R5.1 reports â use it before every audit."}),e.jsx("li",{children:"It supports JSON, tabular, and live SUSHI API validation, covering all the formats your libraries and auditors will test."}),e.jsx("li",{children:"Validate all report types, not just TR. Each has distinct rules and each can fail independently."}),e.jsx("li",{children:"Treat warnings as signals to investigate, not background noise."}),e.jsx("li",{children:"Use the Validator API to build continuous validation into your report generation pipeline â make compliance a quality gate, not a periodic review."}),e.jsx("li",{children:"During the R5 to R5.1 transition, validate against both versions to identify exactly which fields require updating."}),e.jsx("li",{children:"Remember that the Validator checks structure, not data accuracy. Bot filtering, session deduplication, and metric calculation correctness require separate validation."})]})]})}const Jn={title:"How to Migrate from COUNTER R5 to R5.1 Without the Headaches",subtitle:"A practical step-by-step guide for academic publishers navigating the R5.1 transition",description:"The transition from COUNTER R5 to R5.1 is a major technical and operational challenge for academic publishers. This white paper provides a practical migration guide covering key changes, readiness assessment, migration strategies, and post-migration validation.",category:"whitepaper",readTime:"11 min",date:"January 2025",tags:["R5 to R5.1","Migration","SUSHI API","Data Types","Access Types","COUNTER Audit"],seoTitle:"COUNTER R5 to R5.1 Migration Guide for Academic Publishers | usagemetrics.ai",seoDescription:"A comprehensive guide to migrating from COUNTER R5 to R5.1. Covers key changes, readiness assessment, migration strategies, and how usagemetrics.ai automates the transition.",canonical:"/resources/r5-to-r51-migration"};function xs(){return e.jsxs(te,{meta:Jn,children:[e.jsx("h2",{children:"Executive Summary"}),e.jsx("p",{children:"The mandatory transition from COUNTER Release 5 (R5) to Release 5.1 (R5.1), effective January 2025, represents one of the most significant updates to the COUNTER standard in years. For publishers still operating on R5 infrastru
221cture, the transition requires deliberate planning, technical investment, and operational change management. This guide walks you through every stage â from understanding what changed and why, to assessing your current readiness, selecting the right migration strategy, and validating compliance post-transition. Publishers who complete this journey systematically will emerge with more accurate data, better library relationships, and a compliance posture that supports the next decade of digital publishing."}),e.jsx("h2",{children:"1. The Evolving COUNTER Landscape"}),e.jsx("p",{children:"COUNTER has been the backbone of usage statistics reporting in academic publishing since 2002. Its value lies in standardisation: when every publisher reports using the same definitions, metrics, and formats, libraries can make meaningful comparisons across their entire portfolio of subscriptions. That comparability is only possible if publishers stay current with the standard."}),e.jsx("p",{children:"R5.1 was developed over several years in response to real problems that R5 left unsolved â particularly around granularity of item-level reporting, precision of Open Access access type definitions, and the reliability of SUSHI API interactions. The standard is not changing for change's sake; it is evolving to remain relevant in a rapidly changing publishing environment."}),e.jsx("p",{children:"For publishers who delay the transition, the consequences are concrete: loss of COUNTER certification, inability to provide SUSHI R5.1 endpoints to library ERM systems, and potential disruption to subscription renewals from library customers who expect R5.1-compliant data."}),e.jsx("h2",{children:"2. Key Changes from R5 to R5.1"}),e.jsx("p",{children:"Understanding what changed is the prerequisite for planning what to do about it. The R5 to R5.1 transition involves changes across four dimensions:"}),e.jsx("h3",{children:"Data Types"}),e.jsx("p",{children:"R5 used a relatively small set of Data Types (Article, Book, Database, Multimedia, Newspaper_or_Newsletter, Report, Repository_Item, Thesis_or_Dissertation, Unspecified). R5.1 expands and refines this taxonomy to support more precise item-level reporting. New Data Types include more granular distinctions between content forms, enabling better representation of the diversity of academic output (books, chapters, journal articles, datasets, software)."}),e.jsx("p",{children:"Impact for publishers: Tracking scripts must capture and transmit the correct R5.1 Data Type for each content access event. Content repositories and metadata systems may need updating to supply correct type values."}),e.jsx("h3",{children:"Access Types"}),e.jsx("p",{children:"R5 defined Access Types at a relatively high level. R5.1 introduces more granular Open Access categories:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"OA_Gold:"})," Published under a CC or equivalent licence from initial publication"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"OA_Bronze:"})," Made freely available without a formal licence (e.g., time-delayed free access)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"OA_Green:"})," Available through an institutional or subject repository"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Controlled:"})," Requires authentication (subscription or pay-per-view)"]})]}),e.jsx("p",{children:"Impact for publishers: Access Type must be determined correctly at the point of access, not retrospectively. This requires real-time awareness of whether content is OA and under which OA model."}),e.jsx("h3",{children:"The Item Concept"}),e.jsx("p",{children:"R5.1 solidifies the âitemâ as the fundamental unit of reporting â moving decisively away from title-level aggregation. An item is the smallest discrete unit of content a user can access: an individual article, chapter, or section."}),e.jsx("p",{children:"Impact for publishers: Item-level tracking requires persistent, unique identifiers (DOIs, ISBNs, or proprietary IDs) at the article/chapter level. Publishers without item-level identifier infrastru
221cture will need to establish this before R5.1 reporting becomes viable."}),e.jsx("h3",{children:"SUSHI API Updates"}),e.jsx("p",{children:"SUSHI R5.1 introduces schema changes, new filter attributes to support item-level queries, and updated error codes. A SUSHI R5 endpoint will not satisfy R5.1 harvesting requirements from library ERM systems."}),e.jsx("p",{children:"Impact for publishers: SUSHI endpoints must be rebuilt or updated to serve R5.1 JSON responses. This involves not just schema updates but also changes to query parameter handling and response pagination."}),e.jsx("h2",{children:"3. Assessing Your Current Readiness"}),e.jsx("p",{children:"Before developing a migration plan, conduct an honest internal diagnostic. Assess each component of your current R5 implementation:"}),e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Component"}),e.jsx("th",{children:"R5 Requirement"}),e.jsx("th",{children:"R5.1 Requirement"}),e.jsx("th",{children:"Gap?"})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{children:"Tracking script"}),e.jsx("td",{children:"Title-level events"}),e.jsx("td",{children:"Item-level events with DOI/ISBN"}),e.jsx("td",{children:"Likely"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"Log storage"}),e.jsx("td",{children:"Basic access log fields"}),e.jsx("td",{children:"Additional OA status & item ID fields"}),e.jsx("td",{children:"Possible"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"Processing engine"}),e.jsx("td",{children:"R5 deduplication & robot rules"}),e.jsx("td",{children:"Updated rules + new Data/Access Types"}),e.jsx("td",{children:"Yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"Report generation"}),e.jsx("td",{children:"R5 report schemas"}),e.jsx("td",{children:"R5.1 schemas (new columns, new types)"}),e.jsx("td",{children:"Yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"SUSHI API"}),e.jsx("td",{children:"SUSHI R5 spec"}),e.jsx("td",{children:"SUSHI R5.1 spec"}),e.jsx("td",{children:"Yes"})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"Robot exclusion"}),e.jsx("td",{children:"COUNTER R5 robot list"}),e.jsx("td",{children:"COUNTER R5.1 robot list + AI agents"}),e.jsx("td",{children:"Possible"})]})]})]}),e.jsxs("p",{children:["Rate each gap as: ",e.jsx("strong",{children:"No change needed / Minor update / Significant rebuild"}),". This assessment forms the basis of your migration scope and timeline."]}),e.jsx("h2",{children:"4. Migration Strategies"}),e.jsx("p",{children:"Publishers have three broad strategic options for the R5 to R5.1 migration:"}),e.jsx("h3",{children:"Option 1: Internal Build"}),e.jsx("p",{children:"Your development team rebuilds or updates the full compliance stack in-house."}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Pros:"})," Maximum control over architecture and data flows;
221 no dependency on third-party availability."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cons:"})," High upfront development cost (typically 3â9 months of engineering time); ongoing maintenance burden; risk of compliance gaps without external validation."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Best for:"})," Large publishers with dedicated data engineering teams and complex custom platform requirements."]})]}),e.jsx("h3",{children:"Option 2: External SaaS Platform"}),e.jsx("p",{children:"Migrate compliance processing entirely to a specialist SaaS provider."}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Pros:"})," Fastest path to R5.1 compliance (weeks, not months); compliance responsibility shifts substantially to the provider; audit support included."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cons:"})," Dependency on vendor; ongoing subscription cost; integration effort required."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Best for:"})," Mid-sized publishers without dedicated compliance engineering resources â the profile that usagemetrics.ai is specifically designed for."]})]}),e.jsx("h3",{children:"Option 3: Hybrid Approach"}),e.jsx("p",{children:"Retain internal ownership of log collection and raw data, while outsourcing processing, reporting, and SUSHI API provision to a specialist provider."}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Pros:"})," Balances internal data control with outsourced compliance expertise."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cons:"})," Requires clear interface definitions between internal and external systems; integration complexity."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Best for:"})," Publishers with strong data teams but limited COUNTER-specific expertise."]})]}),e.jsx("h2",{children:"5. Implementing R5.1 with usagemetrics.ai"}),e.jsx("p",{children:"For publishers choosing the SaaS or hybrid route, usagemetrics.ai provides a complete R5.1 compliance stack designed for fast, low-friction onboarding:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Lightweight Tracking Integration:"})," A JavaScript tracking snippet or server-side API integration captures item-level events from your existing platform. No backend rebuild required."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Automated Processing Pipeline:"})," usagemetrics.ai ingests your raw events, applies the full R5.1 processing rule set (double-click filtering, robot exclusion, session reconciliation, OA type classification), and outputs clean metric data."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Report Generation:"})," TR, DR, PR, and IR reports in R5.1 JSON and Excel formats are generated on-demand and validated against official COUNTER schemas before delivery."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"SUSHI R5.1 Endpoint:"})," A fully maintained SUSHI R5.1 API is provisioned for your platform â tested, monitored, and available for library ERM system harvesting from day one."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"AI Traffic Filtering:"})," Our built-in AI detection engine provides an additional layer of filtering beyond the standard COUNTER robot exclusion list, protecting your human engagement metrics from LLM and scraper inflation."]})]}),e.jsxs("p",{children:["Typical usagemetrics.ai onboarding from contract signature to live R5.1 reporting takes ",e.jsx("strong",{children:"three to four weeks"})," â compared to six to twelve months for a typical in-house build."]}),e.jsx("h2",{children:"6. Post-Migration Validation and Audit Preparation"}),e.jsx("p",{children:"Migration is not complete until R5.1 reports have been validated. Follow these steps after going live:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Schema validation:"})," Run all generated reports through the official COUNTER JSON schema validator. Fix any schema errors before presenting data to libraries or auditors."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Cross-reference checking:"})," Compare R5.1 Total_Item_Request totals against your access control system's authentication records. The numbers will not be identical (processing rules exclude some events), but gross discrepancies indicate a pipeline issue."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"SUSHI endpoint testing:"})," Use the official COUNTER SUSHI Validator tool to verify your endpoint serves well-formed R5.1 responses. Test with multiple report types and filter combinations."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Library partner testing:"}
221)," Invite one or two library customers to harvest test data from your new SUSHI R5.1 endpoint before going live. Their feedback will surface real-world harvesting issues that synthetic testing can miss."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Audit readiness review:"})," At least 60 days before your audit window, conduct a mock audit using your own documentation and data. Identify any gaps the auditor is likely to flag and address them proactively."]})]}),e.jsx("h2",{children:"7. Ensuring Continuity and Long-Term Reliability"}),e.jsx("p",{children:"A successful R5.1 migration is an investment in data quality and library trust â but it is also the starting point for ongoing compliance management. To protect your investment:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Subscribe to COUNTER standard updates and evaluate the impact of each on your implementation"}),e.jsx("li",{children:"Schedule monthly automated validation runs against your live report output"}),e.jsx("li",{children:"Maintain a clear version history of your processing pipeline, enabling audit trail reconstruction for any historical period"}),e.jsx("li",{children:"Build a quarterly compliance review into your operations calendar â not just an annual pre-audit scramble"})]}),e.jsx("p",{children:"Publishers who treat compliance as a continuous process, not an annual event, consistently outperform peers in audit outcomes and library trust metrics."}),e.jsx("p",{children:"usagemetrics.ai automates this continuous compliance posture â monitoring your data pipeline, validating your reports, and keeping your SUSHI endpoint current â so that âcomplianceâ becomes a background capability rather than a foreground burden."})]})}const Vn={title:"The COUNTER Survival Guide for Independent Publishers",subtitle:"Demystifying COUNTER R5.1 compliance for mid-sized and independent academic publishers",description:"An essential resource for independent and mid-sized academic publishers navigating COUNTER R5.1 compliance. Covers key requirements, common pitfalls, audit preparation, and practical strategies to reduce compliance burden without sacrificing data quality.",category:"whitepaper",readTime:"15 min",date:"January 2025",tags:["Independent Publishers","COUNTER R5.1","Compliance","CaaS","COUNTER Audit","SUSHI"],seoTitle:"COUNTER R5.1 Survival Guide for Independent Academic Publishers | usagemetrics.ai",seoDescription:"A practical guide for independent and mid-sized academic publishers on COUNTER R5.1 compliance, audit preparation, and cost-effective compliance strategies including Compliance-as-a-Service (CaaS).",canonical:"/resources/counter-survival-guide"};function ps(){return e.jsxs(te,{meta:Vn,children:[e.jsx("h2",{children:"Executive Summary"}),e.jsx("p",{children:"This white paper is designed as an essential resource for independent and mid-sized academic publishers navigating the complex landscape of Project COUNTER compliance. It demystifies COUNTER R5.1, explains its key requirements, and proposes practical strategies to minimise the technical and financial burden of compliance. The guide highlights common pitfalls and offers concrete solutions to ensure that publishers can continue providing reliable usage statistics to their library customers, while focusing on their core mission: publishing quality content."}),e.jsx("h2",{children:"1. Why COUNTER Is Critical for Independent Publishers"}),e.jsxs("p",{children:["In the world of digital academic publishing, the value of a publication is not measured solely by its content â it is also measured by how that usage is counted, reported, and understood. ",e.jsx("strong",{children:"Project COUNTER"})," (Counting Online Usage of Networked Electronic Resources) has become the indispensable international standard for measuring the usage of electronic resources including journals, books, and databases."]}),e.jsx("p",{children:"For independent and mid-sized publishers, COUNTER compliance is not an administrative formality. It is a fundamental requirement for maintaining credibility, visibility, and commercial relationships with libraries and research institutions. COUNTER-compliant data enables librarians to evaluate the return on investment of their subscriptions, make informed acquisition decisions, and justify their budgets to administrators. For publishers, compliant reports are a mark of quality and professionalism â facilitating licence negotiations and strengthening trust with customers."}),e.jsxs("p",{children:["Non-compliance carries real consequences: de-listing from consolidated usage platforms, loss of credibility in negotiations, and missed commercial opportunities. And with the mandatory adoption of ",e.jsx("strong",{children:"Release 5.1 (R5.1)"})," from January 2025, the stakes have never been higher."]}
221),e.jsx("h2",{children:"2. Understanding COUNTER R5.1: The Fundamentals"}),e.jsx("h3",{children:"Key Changes from R5 to R5.1"}),e.jsx("p",{children:"The R5 to R5.1 transition involves meaningful changes across several dimensions:"}),e.jsxs("table",{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Feature"}),e.jsx("th",{children:"COUNTER R5"}),e.jsx("th",{children:"COUNTER R5.1"})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsx("td",{children:"Reporting Unit"}),e.jsx("td",{children:"Primarily title-level"}),e.jsxs("td",{children:[e.jsx("strong",{children:"Item-level"})," (article, chapter, section)"]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"Access Types"}),e.jsx("td",{children:"Less granular"}),e.jsxs("td",{children:[e.jsx("strong",{children:"More precise"})," (Gold OA, Bronze OA, Green OA, Controlled)"]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"Data Types"}),e.jsx("td",{children:"Fewer categories"}),e.jsxs("td",{children:[e.jsx("strong",{children:"More categories"})," (Article, Book, Chapter, Section)"]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:"SUSHI API"}),e.jsx("td",{children:"SUSHI R5 specification"}),e.jsxs("td",{children:[e.jsx("strong",{children:"SUSHI R5.1"})," (significant updates)"]})]})]})]}),e.jsx("h3",{children:"Essential Reports: TR, DR, PR, and IR"}),e.jsx("p",{children:"COUNTER R5.1 standardises a suite of reports providing different views of resource usage:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"TR (Title Report):"})," Usage statistics at the title level (journal, book). Variants like TR_J1 and TR_B1 cover journals and ebooks respectively, detailing article and chapter accesses."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"DR (Database Report):"})," Measures database usage, including search counts and full-text link clicks."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"PR (Platform Report):"})," Provides a high-level overview of platform-wide activity including total requests and sessions."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"IR (Item Report):"})," The most granular report, providing usage statistics at the individual article or chapter level. This is the most significant new emphasis in R5.1."]})]}),e.jsx("p",{children:"These reports are the backbone of publisher-library communication â the shared language through which subscription value is demonstrated."}),e.jsx("h3",{children:"The SUSHI Protocol"}),e.jsx("p",{children:"SUSHI (Standardized Usage Statistics Harvesting Initiative) enables automated collection of COUNTER statistics. Instead of libraries manually downloading Excel files, their ERM systems query publisher SUSHI endpoints via a standardised API. For publishers, maintaining a robust SUSHI R5.1 endpoint is a non-negotiable technical requirement â and one that many independent publishers underestimate in complexity and maintenance cost."}),e.jsx("h2",{children:"3. The Compliance Challenge: Hidden Pitfalls and True Costs"}),e.jsx("h3",{children:"Technical Complexity of R5.1 Implementation"}),e.jsx("p",{children:"COUNTER R5.1 implementation demands significant technical expertise across multiple domains:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Log capture:"})," Tracking events must be captured at item level with correct identifiers (DOI, ISBN) â a requirement that many legacy publishing platforms do not natively support"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Processing rules:"})," Deduplication, double-click filtering, robot exclusion, session handling, and OA type classification must all be implemented correctly and consistently"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"SUSHI API development:"})," Building and maintaining a SUSHI R5.1 endpoint requires API development expertise and ongoing monitoring to ensure availability and correctness"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Schema validation:"})," Generated reports must conform precisely to COUNTER JSON schemas â even minor schema deviations can trigger audit findings"]})]}),e.jsx("p",{children:"For publishers without a dedicated data engineering team, this represents a substantial and underestimated technical undertaking."}),e.jsx("h3",{children:"The True Cost of the Annual Audit"}),e.jsx("p",{children:"The annual COUNTER audit â conducted by accredited bodies like ABC or BPA Worldwide â is unavoidable for certified publishers. Its costs extend beyond the audit firm's fees:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Audit firm fees:"})," Typically â¬3,000ââ¬7,000 per year depending on publisher size and system complexity"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Internal preparation time:"})," Technical and administrative staff time spent gathering evidence, writing documentation, and responding to auditor requests â often 20â60 person-days of effort"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Remediation costs:"})," When findings require system changes, the cost of engineering those corrections and re-testing adds to the total"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Opportunity cost:"})," Resources diverted to audit preparation are not available for product development, content acquisition, or customer service"]})]}),e.jsx("h3",{children:"Non-Compliance Risks"}),e.jsx("p",{children:"Non-compliance with COUNTER R5.1 carries escalating consequences:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Loss of COUNTER certification:"})," The most direct consequence â publishers who fail the audit lose the right to de
221scribe themselves as COUNTER compliant"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Library de-listing:"})," Libraries using platforms like the KB+ (Knowledge Base+) or consortium tools that filter for COUNTER compliance may automatically de-list non-certified publishers"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Negotiation disadvantage:"})," Without standardised, audited data, publishers cannot provide the usage evidence libraries require for renewal decisions"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Reputational damage:"})," In a market built on trust and data integrity, a compliance failure is a reputational event that can take years to recover from"]})]}),e.jsx("h3",{children:"The Growing AI Traffic Problem"}),e.jsx("p",{children:"A rapidly emerging challenge compounds the existing complexity: the explosion of AI-generated traffic. Large language models (LLMs) and AI research tools are generating an increasing volume of automated content accesses that, if not filtered, inflate COUNTER statistics and undermine the accuracy of human engagement metrics."}),e.jsx("p",{children:"COUNTER R5.1 provides robot exclusion guidelines, but the pace of AI evolution outstrips static exclusion lists. Publishers who rely only on the standard COUNTER robot list are systematically undercounting AI-generated traffic â and over-reporting human engagement. This creates a liability when libraries begin to scrutinise CPU calculations more closely."}),e.jsx("h2",{children:"4. Survival Strategies: Managing Compliance Effectively"}),e.jsx("h3",{children:"Option 1: Build In-House"}),e.jsx("p",{children:"Develop and maintain all compliance infrastructure internally with your own engineering team."}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Advantages:"})," Full control over data and architecture; no third-party dependency; builds internal expertise"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Disadvantages:"})," High development cost (6â12 months typical); ongoing maintenance burden as COUNTER standard evolves; high risk of compliance gaps without external validation; full audit preparation falls on the internal team"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Best for:"})," Large publishers with dedicated data engineering teams of 3+ people and highly custom platform architectures"]})]}),e.jsx("h3",{children:"Option 2: Outsource to a Third Party"}),e.jsx("p",{children:"Engage a specialist SaaS provider to handle some or all compliance processing, reporting, and SUSHI API provision."}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Advantages:"})," Fast time-to-compliance; specialist expertise; reduced internal engineering burden; audit support typically included"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Disadvantages:"})," Ongoing subscription cost; dependency on vendor continuity; integration effort required; data leaves the publisher's direct control"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Best for:"})," Mid-sized publishers (50â500 journals or 1,000+ ebooks) without large internal data teams"]})]}),e.jsx("h3",{children:"Option 3: usagemetrics.ai â Compliance-as-a-Service (CaaS)"}),e.jsx("p",{children:"usagemetrics.ai offers a purpose-built Compliance-as-a-Service model designed specifically for the operational realities of independent and mid-sized publishers:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Zero-effort R5.1 compliance:"})," We manage the entire processing pipeline â from raw log ingestion through rule application, report generation, and SUSHI API provision. Your team connects once; we deliver compliance continuously."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Audit included and simplified:"})," usagemetrics.ai is itself audited as a platform provider. For our clients, the annual COUNTER audit becomes a verification exercise rather than a discovery exercise â dramatically reducing internal preparation time and audit anxiety."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"AI traffic detection built in:"})," Our proprietary detection engine goes beyond the COUNTER robot exclusion list to identify and filter LLM and AI agent traffic, giving publishers and their library customers confidence that reported human engagement is genuine."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Rapid onboarding:"})," Integration via a lightweight JavaScript tracking snippet or server-side API. Typical onboarding from contract to live R5.1 reporting: 3â4 weeks."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Publisher analytics portal:"})," A clean, modern dashboard giving your team visibility into usage trends, top content, AI traffic share, and compliance status â without requiring data science expertise."]})]}),e.jsx("h2",{children:"5. Preparing for the COUNTER Audit: Best Practices"}),e.jsx("h3",{children:"Understanding the Audit Process"}),e.jsx("p",{children:"The COUNTER audit is conducted by an accredited auditor (ABC or BPA Worldwide) who examines your data collection, processing, and reporting systems. They will request raw log samples, processing documentation, SUSHI API access, and final report files. The goal is to verify that your reported statistics faithfully represent actual usage events processed according to COUNTER specifications."}),e.jsx("h3",{children:"Essential Preparation Checklist"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Maintain a clear, version-controlled document describing your data processing pipeline from log capture to report output"}),e.jsx("li",{children:"Store raw access logs in an immutable, time-stamped archive for at least 24 months"}),e.jsx("li",{children:"Run generated reports through the official COUNTER schema validator before the audit window"}),e.jsx("li",{children:"Test your SUSHI endpoint with the COUNTER SUSHI Validator tool quarterly"}),e.jsx("li",{children:"Document your robot exclusion methodology, including how you address AI traffic beyond the standard list"}),e.jsx("li",{children:"Designate a single internal audit coordinator who maintains audit-readiness documentation year-round"})]}),e.jsx("h3",{children:"How a Pre-Audited SaaS Simplifies Everything"}),e.jsx("p",{children:"When you use usagemetrics.ai, the audit compliance burden shifts substantially to us. Our platform is audited independently, and our processing rules are certified as COUNTER-compliant. For your annual audit, this means:"}
221),e.jsxs("ul",{children:[e.jsx("li",{children:"The auditor validates our platform's certified compliance rather than re-auditing your entire data pipeline from scratch"}),e.jsx("li",{children:"Your internal preparation focuses on access logs and integration documentation â not on defending processing algorithm choices"}),e.jsx("li",{children:"We provide direct audit support, including liaison with the audit firm on technical questions"})]}),e.jsx("h2",{children:"6. Beyond Compliance: Making Your Data Work For You"}),e.jsx("p",{children:"COUNTER compliance is a minimum requirement â but the data it generates is a strategic asset. Publishers who invest in compliance infrastructure often underutilise the resulting data. Here's how to extract more value:"}),e.jsx("h3",{children:"Editorial Decision Support"}),e.jsx("p",{children:"Usage data at the item level reveals which articles, chapters, and subject areas drive the most genuine reader engagement. This intelligence can guide commissioning decisions, promotional investment, and strategic development of your journal portfolio. Publishers who read their own COUNTER data critically â filtering out AI traffic to focus on human engagement â make better editorial decisions."}),e.jsx("h3",{children:"Negotiation Intelligence"}),e.jsx("p",{children:"Accurate CPU data â based on human engagement metrics, not AI-inflated totals â gives you a defensible, transparent value proposition for library renewal negotiations. When you can show a library exactly which of their users accessed which content, and demonstrate that your CPU calculation excludes machine traffic, you build the kind of trust that drives long-term subscription relationships."}),e.jsx("h3",{children:"Open Access Strategy"}),e.jsx("p",{children:"R5.1's granular Access Type data enables precise measurement of OA uptake â which content is being accessed under Gold, Bronze, or Green OA, and by whom. This data is increasingly important for funder reporting, transformative agreement negotiations, and demonstrating the impact of your OA publishing programme."}),e.jsx("h2",{children:"7. Conclusion: Securing Your Future in Academic Publishing"}),e.jsx("p",{children:"Project COUNTER R5.1 compliance is more than a regulatory obligation â it is a foundation for commercial credibility and data-driven publishing strategy. For independent and mid-sized publishers, the path to compliance can feel daunting given the technical demands, audit requirements, and the growing complexity of AI traffic management."}),e.jsx("p",{children:"But the challenge is manageable â with the right strategy and the right partners."}),e.jsx("p",{children:"By adopting a proactive approach and leveraging innovative solutions like usagemetrics.ai, independent publishers can:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Achieve and maintain R5.1 compliance"})," without building and managing a full internal data engineering capability"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Pass annual COUNTER audits"})," with minimal internal effort and cost"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Report accurate, human-verified usage statistics"})," that build library trust and support subscription renewals"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Leverage usage data as a strategic asset"})," for editorial decisions, OA strategy, and commercial negotiations"]})]}),e.jsx("p",{children:"The complexity of COUNTER should not hold back your publishing mission. Explore how usagemetrics.ai can become your strategic partner for simplified compliance and intelligent usage analytics."}),e.jsx("h2",{children:"References"}),e.jsxs("ol",{children:[e.jsxs("li",{children:["Project COUNTER. (n.d.). ",e.jsx("em",{children:"About COUNTER"}),". ",e.jsx("a",{href:"https://www.projectcounter.org/about/",target:"_blank",rel:"noopener noreferrer",children:"https://www.projectcounter.org/about/"})]}),e.jsxs("li",{children:["Project COUNTER. (n.d.). ",e.jsx("em",{children:"COUNTER Code of Practice Release 5.1"}),". ",e.jsx("a",{href:"https://cop5.projectcounter.org/",target:"_blank",rel:"noopener noreferrer",children:"https://cop5.projectcounter.org/"})]}),e.jsxs("li",{children:["COUNTER Metrics. (n.d.). ",e.jsx("em",{children:"Changes in Release 5.1"}),". ",e.jsx("a",{href:"https://www.countermetrics.org/wp-content/uploads/2024/04/Guide-Changes.pdf",target:"_blank",rel:"noopener noreferrer",children:"countermetrics.org"})]}),e.jsxs("li",{children:["Project COUNTER. (n.d.). ",e.jsx("em",{children:"Title Reports"}),". ",e.jsx("a",{href:"https://cop5.projectcounter.org/en/5.1/04-reports/01-title-reports/",target:"_blank",rel:"noopener noreferrer",children:"cop5.projectcounter.org"})]}),e.jsxs("li",{children:["NISO. (n.d.). ",e.jsx("em",{children:"SUSHI (Standardized Usage Statistics Harvesting Initiative)"}),". ",e.jsx("a",{href:"https://www.niso.org/standards-committees/sushi",target:"_blank",rel:"noopener noreferrer",children:"niso.org"})]}),e.jsxs("li",{children:["Scholarly Kitchen. (2024, October 2). ",e.jsx("em",{children:"Guest Post: Time to Rethink Usage Analytics"}),". ",e.jsx("a",{href:"https://scholarlykitchen.sspnet.org/2024/10/02/guest-post-time-to-rethink-usage-analytics/",target:"_blank",rel:"noopener noreferrer",children:"scholarlykitchen.sspnet.org"})]})]})]})}const Wn=[{path:"/auth/redirect",element:e.jsx(pi,{})},{path:"/auth/*",element:e.jsx(fi,{})},{path:"/about",element:e.jsx(Di,{})},{path:"/",element:e.jsx(Hi,{})},{path:"/article-counter-audit-best-practices",element:e.jsx(Ht,{})},{path:"/articlecounterauditbestpractices",element:e.jsx(Ht,{})},{path:"/article-counter-data-retention",element:e.jsx($t,{})},{path:"/articlecounterdataretention",element:e.jsx($t,{})},{path:"/article-counter-evolutions",element:e.jsx(Jt,{})},{path:"/articlecounterevolutions",element:e.jsx(Jt,{})},{path:"/article-counter-pathway-compliance",element:e.jsx(Vt,{})},{path:"/articlecounterpathwaycompliance",element:e.jsx(Vt,{})},{path:"/article-counter-report-types",element:e.jsx(Wt,{})},{path:"/articlecounterreporttypes",element:e.jsx(Wt,{})},{path:"/article-counter-toc-usage",element:e.jsx(zt,{})}
221,{path:"/articlecountertocusage",element:e.jsx(zt,{})},{path:"/benefits",element:e.jsx(Gi,{})},{path:"/comparison",element:e.jsx(ji,{children:e.jsx(Ki,{})})},{path:"/counter-exception-lookup",element:e.jsx(Gt,{})},{path:"/counterexceptionlookup",element:e.jsx(Gt,{})},{path:"/counter-form-builder-page",element:e.jsx(Qt,{})},{path:"/counterformbuilderpage",element:e.jsx(Qt,{})},{path:"/counter-report-checker",element:e.jsx(Xt,{})},{path:"/counterreportchecker",element:e.jsx(Xt,{})},{path:"/documentation",element:e.jsx(rn,{})},{path:"/home-es",element:e.jsx(Zt,{})},{path:"/homees",element:e.jsx(Zt,{})},{path:"/home-fr",element:e.jsx(es,{})},{path:"/homefr",element:e.jsx(es,{})},{path:"/privacy-policy",element:e.jsx(ts,{})},{path:"/privacypolicy",element:e.jsx(ts,{})},{path:"/publisher-dashboard",element:e.jsx(rs,{})},{path:"/publisherdashboard",element:e.jsx(rs,{})},{path:"/resources",element:e.jsx(Mn,{})},{path:"/terms-of-service",element:e.jsx(cs,{})},{path:"/termsofservice",element:e.jsx(cs,{})},{path:"/tools",element:e.jsx(Fn,{})},{path:"/whitepaper-ai-impact",element:e.jsx(hs,{})},{path:"/whitepaperaiimpact",element:e.jsx(hs,{})},{path:"/whitepaper-code-of-practice",element:e.jsx(us,{})},{path:"/whitepapercodeofpractice",element:e.jsx(us,{})},{path:"/whitepaper-counter-validator",element:e.jsx(ms,{})},{path:"/whitepapercountervalidator",element:e.jsx(ms,{})},{path:"/whitepaper-r5migration",element:e.jsx(xs,{})},{path:"/whitepaperr5migration",element:e.jsx(xs,{})},{path:"/whitepaper-survival-guide",element:e.jsx(ps,{})},{path:"/whitepapersurvivalguide",element:e.jsx(ps,{})}],zn=()=>ue,Yn=qr([{element:e.jsx(di,{shouldRender:ua===bt.DEV,children:e.jsx(Kr,{children:e.jsx(Ge,{children:e.jsx(Lr,{})})})}),children:Wn},{path:"*",element:e.jsx(Ge,{children:e.jsx(hi,{})}),errorElement:e.jsx(Ge,{children:e.jsx(ui,{})})}],{basename:zn()}),Gn="light",Kn=()=>e.jsx(Jr,{children:e.jsx(Mr,{app:ke,children:e.jsxs(Wr,{defaultTheme:Gn,children:[e.jsx(Fr,{router:Yn}),e.jsx($r,{})]})})});"use"in le||(le.use=function(a){if(typeof a=="object"&&a!==null&&typeof a.then=="function"){const s=a.status;if(s===void 0){const i=a;throw i.status="pending",i.then(r=>{i.status==="pending"&&(i.status="fulfilled",i.value=r)},r=>{i.status==="pending"&&(i.status="rejected",i.reason=r)}),i}else{if(s==="fulfilled")return a.value;throw s==="rejected"?a.reason:a}}else return typeof a=="object"&&a!==null&&typeof a._context<"u"?le.useContext(a._context||a):typeof a=="object"&&a!==null&&typeof a.$$typeof<"u"?le.useContext(a):le.useContext(a)});const Ia=document.getElementById("root");if(Ia===null)throw new Error("Missing root element");const Qn=Br.createRoot(Ia);Qn.render(e.jsx(Kn,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.