This file contains 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 class AnalyticsDownloadEventAggregator : ObservableAggregator<DownloadEventIndexable> | |
{ | |
public AnalyticsDownloadEventAggregator(string name) : base(name) | |
{ | |
} | |
protected override IEnumerable<DownloadEventIndexable> ResolveIndexables(AggregationPipelineArgs args) | |
{ | |
if (args.Context.Contact == null) | |
{ |
This file contains 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" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<group groupName="analytics.aggregation"> | |
<pipelines> | |
<interactions> | |
<!-- Custom Download Aggregator --> | |
<processor type="YourNamespace.AnalyticsDownloadEventAggregator, YourAssemblyName"> | |
<param desc="name">DownloadAggregationObservable</param> |
This file contains 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" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<contentSearch> | |
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch"> | |
<indexes hint="list:AddIndex"> | |
<index id="sitecore_analytics_index" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider"> | |
<locations hint="list:AddCrawler"> | |
<!-- Custom Download Crawler --> | |
<crawler type="YourNamespace.AnalyticsDownloadCrawler, YourAssembly"> |
This file contains 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
$categoryCountProps = @{ | |
Parameters = @( | |
@{ Name = "categoryCount"; Title = "Number of categories"; Tab = "Categories" } | |
) | |
Title = "Categories" | |
Description = "Add the number of categories required" | |
OkButtonName = "Proceed" | |
CancelButtonName = "Abort" | |
Width = 600 | |
Height = 400 |
This file contains 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
$categoriesCount = [int]$categoryCount | |
$counter = 1 | |
$pattern = "" | |
for($i = 0; $i -lt $categoriesCount; $i++){ | |
$catName = "Category$i" | |
if($i -eq $categoriesCount - 1){ |
This file contains 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
$categoryCountProps = @{ | |
Parameters = @( | |
@{ Name = "categoryCount"; Title = "Number of categories"; Tab = "Categories" } | |
) | |
Title = "Categories" | |
Description = "Add the number of categories required" | |
OkButtonName = "Proceed" | |
CancelButtonName = "Abort" | |
Width = 600 | |
Height = 400 |
This file contains 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
Import-Function -Name CleanQueryPath | |
$paths = @("/sitecore/content/My Site/Site 1/home=en-GB") | |
foreach($path in $paths){ | |
$results = @(); | |
$splitter = $path -split "=" | |
$editorials = Get-Item -Path master: -Query "$(CleanQueryPath -Path $splitter[0])//*[@@templateid='{5963CF27-6FC4-4C70-96E5-3BA55136E23C}' or @@templateid='{90F7233C-341D-4359-8CD6-D9ADF8A18BE4}']" -Language $splitter[1] | |
This file contains 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
function CleanQueryPath { | |
param([Parameter(Mandatory=$true)] $Path) | |
$pathComponents = $Path.Split('/') | |
$cleansedPath = [System.Linq.Enumerable]::Select($pathComponents, [Func[string,string]]{ | |
param($x) | |
if(($x -like "* *") -or ($x -like "*-*")) { | |
return "#$($x)#" | |
} | |
else { |
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using Sitecore.Analytics.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.Extension.Analytics.Entities; | |
using Sitecore.StringExtensions; | |
public class Tagger | |
{ |
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Xml.Linq; | |
using Sitecore.Analytics.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.Diagnostics; | |
using Sitecore.Extension.Analytics.Entities; | |
using Sitecore.SecurityModel; |