--- title: usageanalytics.coveo.com endpoint deprecation slug: o6ag8284 canonical_url: https://docs.coveo.com/en/o6ag8284/ collection: coveo-for-sitecore-v5 source_format: adoc --- # usageanalytics.coveo.com endpoint deprecation ## Symptoms Usage analytics calls are failing. ## Cause [Coveo V1 endpoints are deprecated](https://docs.coveo.com/en/p2ea0239#check-your-coveo-implementation) and will no longer be supported. ## Resolution Coveo strongly recommends that all Coveo for Sitecore customers upgrade to the [latest version](https://docs.coveo.com/en/2274/) and [migrate to organization endpoints](https://docs.coveo.com/en/o1ud0002#migrate-to-organization-endpoints). Upgrading to the latest Coveo for Sitecore release simplifies the transition to organization endpoints and ensures that your instance is using the most up-to-date endpoints, features, and improvements. > **Tip** > > The [multi-release upgrade procedure](https://docs.coveo.com/en/2155#multi-release-upgrade) speeds up the upgrade process. If an immediate upgrade to the latest release of Coveo for Sitecore isn't feasible, refer to the instructions associated with [your current version of Coveo for Sitecore](https://docs.coveo.com/en/2301/) below to ensure you no longer use deprecated endpoints. ## [May 9, 2023 (5.0.1227.1)](https://docs.coveo.com/en/n3ne0564/) or [October 23, 2023 (5.0.1277.4)](https://docs.coveo.com/en/n5jd0437/) You're not using the deprecated analytics endpoint, so no action is required. However, Coveo strongly recommends that you upgrade to the [latest version](https://docs.coveo.com/en/2274/). Follow all upgrade steps including the [organization endpoints migration steps](https://docs.coveo.com/en/o1ud0002#migrate-to-organization-endpoints). ## [September 18, 2020 (5.0.788.5)](https://docs.coveo.com/en/3314/) to [February 15, 2023 (5.0.1202.1)](https://docs.coveo.com/en/m9ta0384/) Short of upgrading to the latest release and enabling organization endpoints, ensure you're using non-deprecated endpoints in your configuration files. . In `\App_Config\Include\Coveo\Coveo.CloudPlatformClient.Custom.config`, make sure that the `` value is one of the following: For [US East region organizations](https://docs.coveo.com/en/2976/): ```xml https://platform.cloud.coveo.com ``` If your [Coveo organization](https://docs.coveo.com/en/185/) uses [regional endpoints](https://docs.coveo.com/en/2976/), make sure you're using the relevant region-specific endpoint (for example, `\https://platform-eu.cloud.coveo.com`). . In `\App_Config\Include\Coveo\Coveo.SearchProvider.Rest.Custom.config`, make sure that the `` value is one of the following: For [US East region organizations](https://docs.coveo.com/en/2976/): ```xml https://analytics.cloud.coveo.com/rest/ua ``` If your [Coveo organization](https://docs.coveo.com/en/185/) uses [regional endpoints](https://docs.coveo.com/en/2976/), make sure you're using the relevant region-specific endpoint (for example, `\https://analytics-au.cloud.coveo.com/rest/ua`). > **Note** > > You can use PowerShell configuration and activation scripts to make these changes in your Sitecore instance. > > .Configuring >
Details > > This function configures Coveo for Sitecore by applying the passed parameters values on the corresponding configuration files. > It can be called either to fully or partially configure the instance. > > [source,c#] > ``` function Configure-CoveoForSitecorePackage([Parameter(Mandatory=$true)] [string] $SitecoreInstanceUrl, [string] $CoveoForSitecoreApiVersion = "v1", [string] $OrganizationId, [string] $ConfigApiKey, [string] $SearchApiKey, [boolean] $DisableSourceCreation = $false, [string] $CoveoSitecoreUsername, [string] $CoveoSitecorePassword, [string] $DocumentOptionsBodyIndexing = "Rich", [boolean] $DocumentOptionsIndexPermissions = $true, [string] $FarmName, [boolean] $BypassCoveoForSitecoreProxy = $false, [Parameter(Mandatory=$true)] [string] $ScriptSitecoreUsername, [Parameter(Mandatory=$true)] [string] $ScriptSitecorePassword, [string] $ApiEndpointUrl = "", [string] $IndexingEndpointUrl = "", [string] $PlatformEndpointUrl = "", [string] $UsageAnalyticsEndpointUrl = "") { $ConfigureCoveoForSitecoreUrl = $SitecoreInstanceUrl + "/coveo/api/config/" + $CoveoForSitecoreApiVersion + "/configure" ​ $Body = @{ } ​ if (![string]::IsNullOrEmpty($OrganizationId)) { $Body.Organization = @{ "OrganizationId" = $OrganizationId "ApiKey" = $ConfigApiKey "SearchApiKey" = $SearchApiKey "ApiEndpointUrl" = $ApiEndpointUrl "IndexingEndpointUrl" = $IndexingEndpointUrl "PlatformEndpointUrl" = $PlatformEndpointUrl "UsageAnalyticsEndpointUrl" = $UsageAnalyticsEndpointUrl "DisableSourceCreation" = $DisableSourceCreation } $Body.Proxy = @{ "BypassCoveoForSitecoreProxy" = $BypassCoveoForSitecoreProxy } $Body.SitecoreCredentials = @{ "Username" = $CoveoSitecoreUsername "Password" = $CoveoSitecorePassword } $Body.DocumentOptions = @{ "BodyIndexing" = $DocumentOptionsBodyIndexing "IndexPermissions" = $DocumentOptionsIndexPermissions } $Body.Proxy = @{ "BypassCoveoForSitecoreProxy" = $BypassCoveoForSitecoreProxy } } if (![string]::IsNullOrEmpty($FarmName)) { $Body.Farm = @{ "Name" = $FarmName } } ​ $BodyJson = $Body | ConvertTo-Json ​ $m_Headers = @{ "x-scUsername" = $ScriptSitecoreUsername "x-scPassword" = $ScriptSitecorePassword } ​ Write-Host "Configuring the Coveo for Sitecore package... " Try { Invoke-RestMethod -Uri $ConfigureCoveoForSitecoreUrl -Method PUT -Body $BodyJson -Headers $m_Headers -ContentType "application/json" Write-Host "The Coveo for Sitecore package is now configured." } Catch { Write-Host "There was an error during your Coveo for Sitecore package configuration:" Write-Host $PSItem } } ``` > > If Coveo configuration files still have the `.config.example` extension, Coveo for Sitecore isn't activated. > You can use the following function to activate Coveo for Sitecore. > >
> > .Activating >
Details > > This function activates Coveo for Sitecore by renaming the `\**.config.example` files to `**.config`. > Since this is a configuration change, it will restart your IIS application pool once the operation is completed. > > [source,c#] > ``` function Activate-CoveoForSitecorePackage([Parameter(Mandatory=$true)] [string] $SitecoreInstanceUrl, [string] $CoveoForSitecoreApiVersion = "v1", [Parameter(Mandatory=$true)] [string] $ScriptSitecoreUsername, [Parameter(Mandatory=$true)] [string] $ScriptSitecorePassword) { $ActivateCoveoForSitecoreUrl = $SitecoreInstanceUrl + "/coveo/api/config/" + $CoveoForSitecoreApiVersion + "/activate" ​ $m_Headers = @{ "x-scUsername" = $ScriptSitecoreUsername "x-scPassword" = $ScriptSitecorePassword } ​ Write-Host "Activating the Coveo for Sitecore package... " ​ Try { Invoke-RestMethod -Uri $ActivateCoveoForSitecoreUrl -Method POST -Headers $m_Headers -ContentType "application/json" Write-Host "The Coveo for Sitecore package is now activated." } Catch { Write-Host "There was an error during your Coveo for Sitecore package activation:" Write-Host $PSItem } } ``` > >
> > .Usage example >
Details > > Once the previous functions are added to your PowerShell script tooling, you can use them to configure and activate Coveo for Sitecore. > Here is an example of how to call them with the right parameters: > > ```powershell .\yourpowershellscriptfile.ps1 Configure-CoveoForSitecorePackage -SitecoreInstanceUrl -OrganizationId -ConfigApiKey -SearchApiKey -CoveoSitecoreUsername -CoveoSitecorePassword -ScriptSitecoreUsername -ScriptSitecorePassword -PlatformEndpointUrl -UsageAnalyticsEndpointUrl ​ .\yourpowershellscriptfile.ps1 Activate-CoveoForSitecorePackage -SitecoreInstanceUrl -ScriptSitecoreUsername -ScriptSitecorePassword ``` > > You need to replace: > > * `` with the ID of your [Coveo organization](https://docs.coveo.com/en/185/). > > * `` with the unencrypted value of your [`ApiKey`](https://docs.coveo.com/en/2484#create-apikey). > > * `` with the unencrypted value of your [`SearchApiKey`](https://docs.coveo.com/en/2484#create-searchapikey). > > * `` and `` with the unencrypted credentials of a user that can read all the files that you want to index. > > * `` and `` with the unencrypted credentials of a user that can modify the configuration files of your Sitecore instance. > > * `` with your Sitecore instance URL. > > * `` with the URL of the Coveo Platform endpoint (that is, `\https://platform.cloud.coveo.com` or the region-specific endpoint, like `\https://platform-eu.cloud.coveo.com`, if applicable for [your Coveo organization](https://docs.coveo.com/en/2976/)). > > * `` with the URL of the usage analytics endpoint (that is, `\https://analytics.cloud.coveo.com/rest/ua` or the region-specific endpoint, like `\https://analytics-au.cloud.coveo.com/rest/ua`, if applicable for [your Coveo organization](https://docs.coveo.com/en/2976/)). > >
## Versions older than [September 18, 2020 (5.0.788.5)](https://docs.coveo.com/en/3314/) You're using the deprecated analytics endpoint and your implementation is severely outdated. Upgrade to the [latest version](https://docs.coveo.com/en/2274/) of Coveo for Sitecore and follow the steps to [migrate to organization endpoints](https://docs.coveo.com/en/o1ud0002#migrate-to-organization-endpoints). If you're using Coveo for Sitecore 4.0 or 4.1, [identify your upgrade scenario](https://docs.coveo.com/en/2642#identify-your-upgrade-scenario) and follow the related instructions to upgrade to the latest version of Coveo for Sitecore 5.