This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string culture = "int"; | |
| string name = "Integration"; | |
| //Create Culture & Region Info with an existing Language Culture (Eg: en-GB) | |
| CultureInfo cultureInfo = new CultureInfo("en-US"); | |
| RegionInfo regionInfo = new RegionInfo(cultureInfo.Name); | |
| CultureAndRegionInfoBuilder cultureAndRegionInfoBuilder = new CultureAndRegionInfoBuilder(culture, CultureAndRegionModifiers.None); | |
| cultureAndRegionInfoBuilder.LoadDataFromCultureInfo(cultureInfo); | |
| cultureAndRegionInfoBuilder.LoadDataFromRegionInfo(regionInfo); | |
| cultureAndRegionInfoBuilder.CultureEnglishName = cultureAndRegionInfoBuilder.CultureNativeName = name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static List<Item> GetMostViewed(int count, int daysToInclude, List<Guid> templateIDs, List<Guid> mostViewedExcludeGuids) | |
| { | |
| var sqlServerDataApi = new SqlServerDataApi(Sitecore.Configuration.Settings.GetConnectionString("reporting")); | |
| // Base Query | |
| var query = @"SELECT TOP " + count.ToString() + @" | |
| A.ItemId, | |
| A.DailyCount, | |
| A.LastViewDate | |
| FROM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
| <sitecore> | |
| <pipelines> | |
| <group groupName="analytics.aggregation"> | |
| <pipelines> | |
| <interactions> | |
| <processor type="Website.Logic.Analytics.Views.ViewAggregationProcessor, Website" /> | |
| </interactions> | |
| </pipelines> | |
| </group> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| using Sitecore.Analytics.Aggregation.Pipeline; | |
| using Sitecore.Diagnostics; | |
| namespace Website.Logic.Analytics.Views | |
| { | |
| public class ViewAggregationProcessor : AggregationProcessor | |
| { | |
| protected override void OnProcess(AggregationPipelineArgs args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
| <sitecore> | |
| <pipelines> | |
| <endAnalytics> | |
| <processor type="Website.Logic.Analytics.Views.ViewPageEventProcessor, Website" patch:before="processor[@type='Sitecore.Analytics.Pipelines.EndAnalytics.SaveDuration, Sitecore.Analytics']"/> | |
| </endAnalytics> | |
| </pipelines> | |
| </sitecore> | |
| </configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Sitecore.Analytics.Aggregation.Data.Model; | |
| using System; | |
| namespace Website.Logic.Analytics.Views | |
| { | |
| public class ViewValue : DictionaryValue | |
| { | |
| internal static ViewValue Reduce(ViewValue left, ViewValue right) | |
| { | |
| var viewValue = new ViewValue(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Sitecore.Analytics.Aggregation.Data.Model; | |
| namespace Website.Logic.Analytics.Views | |
| { | |
| public class ViewKey : DictionaryKey | |
| { | |
| public Guid ItemId { get; set; } | |
| public DateTime Date { get; set; } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Sitecore.Analytics.Aggregation.Data.Model; | |
| namespace Website.Logic.Analytics.Views | |
| { | |
| public class ViewFact : Fact<ViewKey, ViewValue> | |
| { | |
| public ViewFact() : base(ViewValue.Reduce) | |
| { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Sitecore.Analytics; | |
| using Sitecore.Diagnostics; | |
| using Sitecore.Pipelines; | |
| using Website.Logic.Common.Extensions; | |
| using Sitecore.Data; | |
| using Newtonsoft.Json; | |
| namespace Website.Logic.Analytics.Views | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER TABLE [dbo].[Fact_Views] DROP CONSTRAINT [FK_Fact_Views_Items] | |
| GO | |
| /****** Object: Table [dbo].[Fact_Views] Script Date: 8/22/2016 8:44:14 AM ******/ | |
| DROP TABLE [dbo].[Fact_Views] | |
| GO | |
| /****** Object: Table [dbo].[Fact_Views] Script Date: 8/22/2016 8:44:14 AM ******/ | |
| SET ANSI_NULLS ON | |
| GO |
NewerOlder