{"id":15506234,"url":"https://github.com/simply007/kontent-recommendations-net","last_synced_at":"2026-01-18T00:20:18.219Z","repository":{"id":94605334,"uuid":"522462419","full_name":"Simply007/kontent-recommendations-net","owner":"Simply007","description":"[Deprecated] Kentico Smart Kontent Recommendations .NET SDK","archived":false,"fork":false,"pushed_at":"2021-05-26T13:31:21.000Z","size":1252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-04T22:28:13.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Simply007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-08T08:18:36.000Z","updated_at":"2023-02-17T08:23:59.000Z","dependencies_parsed_at":"2023-04-13T09:47:19.572Z","dependency_job_id":null,"html_url":"https://github.com/Simply007/kontent-recommendations-net","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Simply007/kontent-recommendations-net","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simply007%2Fkontent-recommendations-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simply007%2Fkontent-recommendations-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simply007%2Fkontent-recommendations-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simply007%2Fkontent-recommendations-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Simply007","download_url":"https://codeload.github.com/Simply007/kontent-recommendations-net/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Simply007%2Fkontent-recommendations-net/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28523712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T23:53:28.710Z","status":"ssl_error","status_checked_at":"2026-01-17T23:52:20.131Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T09:26:24.170Z","updated_at":"2026-01-18T00:20:18.212Z","avatar_url":"https://github.com/Simply007.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Kentico Kontent Recommendation .NET SDK\n\n[![No Maintenance Intended](https://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n## :warning: Deprecation Notice\n\u003e Kontent's Recommendations API has been deprecated (see [changelog](https://docs.kontent.ai/changelog/product-changelog#a-deprecating-the-smart-recommendations-api)). We advise to use the underlying [Recombee](https://www.recombee.com/) service directly to recommend your content. \n\n\n# Summary\nForget manually browsing, updating and testing your related content - create personalized content recommendations using our integrated AI-based recommendation engine fast and simple.\n\n# Getting started\nInstallation via Package Manager Console in Visual Studio:\n\n```powershell\nPM\u003e Install-Package Kentico.Kontent.Recommendations \n```\n\nInstallation via .NET CLI:\n\n```console\n\u003e dotnet add package Kentico.Kontent.Recommendations \n```\n\n## Prerequisities\n* Kentico Kontent Account \u0026 Project\n* Project registered in the KC Content Recommendation Engine\n\n# Getting Recommendations\nTo recommend content from your Kentico Kontent projects, you'll be using an implementation of the `IRecommendationClient` interface. This is the main interface of the SDK.\n\n#### Use dependency injection (ideal for ASP.NET Core web apps)\n\n## Basic scenario for getting recommendations\n```csharp\nusing Kentico.Kontent.Recommendations;\nusing Kentico.Kontent.Recommendations.Models;\n\n//Creates an instance of the recommendation client\nvar recommendationClient = new RecommendationClient(accessToken: \"recommendation_token\", timeoutSeconds: 5);\n\n//Creates a new recommendation request\nvar recommendationRequest = new RecommendationRequest {\n        VisitId = \"clientId\",\n        CurrentItemCodename = \"current_codename\",\n        ResponseLimit = 2,\n        RequestedTypeCodename = \"article\"\n};\n\n//The method returns a requested number of recommended content items (codenames)\nRecommendedContentItem[] recommendedArticles = await recommendationClient.GetRecommendationsAsync(recommendationRequest);\n```\n\n## Working with visitor data\n```csharp\nusing Kentico.Kontent.Recommendations.Models;\n\n//Manually inserted visitor details\nvar visitor = new VisitorDetails {\n    //Source of the visit\n    Referer = \"google\", \n    //Your own custom data (you can create a custom profile using this property)\n    Custom = new Dictionary\u003cstring, string\u003e \n    {\n        //e.g. Persona property\n        {\"Persona\", \"Manager\"} \n    },\n   //Geo-location information about the visitor\n    Location = new LocationDetails \n    {\n        City = \"Brno\",\n        Country = \"Czechia\",\n        Timezone = \"CET\"\n    }\n}\n\nvar recommendationRequest = new RecommendationRequest {\n        VisitId = \"clientId\",\n        CurrentItemCodename = \"current_codename\",\n        ResponseLimit = 2,\n        RequestedTypeCodename = \"article\",\n       // Adding the visitor data into the recommendation request\n        Visitor = visitor \n};\n\n// ALTERNATIVELY you can use the CreateVisitorAsync method to take control of visitor creation\nawait recommendationClient.CreateVisitorAsync(\"clientId\", visitor);\n```\n\n# Searching content\nIn addition to recommending content based on other content, the system offers an option to search for items directly. The results are based on the full-text matching of a search query and can be filtered by content type. Search method returns the same type of result as the recommendation method does, i.e. array of objects with a codename property containing codename of the found item. \n\n```csharp\nusing Kentico.Kontent.Recommendations;\nusing Kentico.Kontent.Recommendations.Models;\n\n//Creates an instance of the recommendation client\nvar recommendationClient = new RecommendationClient(accessToken: \"recommendation_token\", timeoutSeconds: 5);\n\n//Creates a new recommendation request\nvar searchRequest = new SearchRequest {\n        VisitId = \"clientId\",\n        Query = \"this is a search query\",\n        ResultCount = 10,\n        RequestedTypeCodename = \"article\"\n};\n\n//The method returns a requested number of recommended content items (codenames)\nRecommendedContentItem[] foundArticles = await recommendationClient.SearchAsync(searchRequest);\n```\n\n# CookieHelper \nThis package provides a helper class, that let's you setup a very simple yet effective way to distinguish your visitors and recover additional details about them. It works with the .net core _Request_ and _Response_ objects and creates uses **cookies to track visitors**. \n\nAlternatively, the helper let's you reuse **Google Analytics** clientId to identify the visitor inside of the recommendation system.\n\n| Version        | Package  | Downloads |\n| ------------- |:-------------:| :-------------:|\n| netcore2.0+   |      [![NuGet](https://img.shields.io/nuget/v/Kentico.Kontent.Recommendations.CookieHelper.svg)](https://www.nuget.org/packages/Kentico.Kontent.Recommendations.CookieHelper) | [![NuGet](https://img.shields.io/nuget/dt/Kentico.Kontent.Recommendations.CookieHelper.svg)](https://www.nuget.org/packages/Kentico.Kontent.Recommendations.CookieHelper) |\n\n\nInstallation via Package Manager Console in Visual Studio:\n\n```powershell\nPM\u003e Install-Package Kentico.Kontent.Recommendations.CookieHelper \n```\n\nInstallation via .NET CLI:\n\n```console\n\u003e dotnet add package Kentico.Kontent.Recommendations.CookieHelper \n```\n\n\u003e :memo: Keep in mind, that you may be legally bound to disclose this information to your visitors and let them disable tracking cookies when using this package.\n\n\n\u003e :warning: Check if your received *Request* object contains cookies when processing it on your backend. Cross domain calls will block cookies by default, as well as multiple popular javascript http clients won't send them by without proper settings in place ([axios example](https://stackoverflow.com/questions/43002444/make-axios-send-cookies-in-its-requests-automatically)) if you are using ajax to retreive recommendations asynchronously. \n**Check your settings if you are using different domains for your frontend and backend and if you are using ajax to retreive recommendations asynchronously!**\n\n\n```csharp\nusing Kentico.Kontent.Recommendations.CookieHelper;\n\n//Get the tracking cookie either from google analytics or from our custom tracking cookie or create a newone\nvar cookie = RecommendationCookieHelper.GetGoogleTrackingCookie(Request) ?? RecommendationCookieHelper.GetRecommendationTrackingCookie(Request) ??           RecommendationCookieHelper.SetNewRecommendationTrackingCookie(Request, Response, TimeSpan.FromDays(60), \"mydomain.com\");\n\n\n//Generated visitId we can use in the recommendation request\nvar visitId = trackingCookie.VisitId; \n\n//The helper also let's you extract initialized VisitorDetails object\n//It fills out the referrer and IP address\nvar visitor = RecommendationCookieHelper.GetVisitorDetails(Request); \n```\n\n# Tracking visitor-content interactions\nSimply requesting a recommendation will track a default interaction between the visitor and content in a form of a simple visit, however, you can also track more granular visitor–content interactions by yourself via the SDK. \n\n```csharp\nusing Kentico.Kontent.Recommendations;\n\nvar recommendationClient = new RecommendationClient(accessToken: \"recommendation_token\", timeoutSeconds: 5);\n\n//Track content item visit -\u003e visitor with visitId just visited content with itemCodename codename\nawait recommendationClient.TrackVisitAsync(\"visitId\", \"itemCodename\");\n\n//Track conversion -\u003e visitor  just performed a conversion\nawait recommendationClient.TrackConversionAsync(\"visitId\",\"itemCodename\");\n\n//Track portion view -\u003e visitor just read 10% of content item\nawait recommendationClient.TrackPortionViewAsync(\"visitId\", \"itemCodename\", 10);\n```\n\n# Advanced recommendations\nYou are able to use [Filtering](https://docs.recombee.com/reql_filtering_and_boosting.html#reql-filtering) and [Boosting](https://docs.recombee.com/reql_filtering_and_boosting.html#reql-boosting) in order to alter the outcome of your recommendations. The syntax of filters and boosters is written in [ReQL](https://docs.recombee.com/reql.html). The set of properties you can filter on is displayed inside of your Kontent App within the Recommendations module.\n\n```csharp\nusing Kentico.Kontent.Recommendations;\nusing Kentico.Kontent.Recommendations.Models;\n\nvar recommendationSettings = new RecommendationSettings\n{\n   // recommend only items for specific persona\n   Filter = $\"\\\"persona=developer\\\" in 'properties'\",\n   \n   // prefer articles from last 30 days\n   Booster = $\"if 'lastupdated' \u003e= now() - {TimeSpan.FromDays(30).Milliseconds} then 2 else 1\"\n}\n\n\nvar recommendationClient = new RecommendationClient(accessToken: \"recommendation_token\", timeoutSeconds: 5);\n\n//Creates a new recommendation request\nvar recommendationRequest = new RecommendationRequest {\n        VisitId = \"clientId\",\n        CurrentItemCodename = \"current_codename\",\n        ResponseLimit = 2,\n        RequestedTypeCodename = \"article\",\n        RecommendationSettings = recommendationSettings;\n};\n\n```\n\n\n\n# Further information\n* [Relevant documentation](https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/personalize-content-with-ai)\n* [Recommendation API Reference](https://docs.kontent.ai/reference/recommendation-api)\n\n# Get involved\nCheck out the [contributing](CONTRIBUTING.md) page to see the best places to file issues, start discussions, and begin contributing.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimply007%2Fkontent-recommendations-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimply007%2Fkontent-recommendations-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimply007%2Fkontent-recommendations-net/lists"}