sitecoresitecore8

Map a Sitecore visitor to a custom Channel


I have some affiliate sites, which link to my Sitecore website.

I created a custom Channel for these affiliate sites. What I want to do is map those visitors to the custom Channel, based on the Referred HTTP header, so I can personalise components based on the Channel.

Sitecore doesn't document this portion very well in my opinion, and I can't find much on the internet either.

How do I do this? Do I need program my own Pipeline, or is this default functionality in Sitecore?

EDIT: There should be a way to this with interactionChannelMappings Here is some xml from the Sitecore.Social.config file

 <interactionChannelMappings>
     <!-- 41-91-05: Online/Social Community/Facebook Social Community -->
     <channel channelId="{A9F2D058-95A5-4461-B1E5-8502D2303AF1}">
        <!-- Facebook -->
        <channelMapping urlReferrerHost="www.facebook.com" />
        <!-- Facebook for mobile -->
        <channelMapping urlReferrerHost="m.facebook.com" />
        <!-- Facebook's Link Shim -->
        <channelMapping urlReferrerHost="l.facebook.com" />
        <!-- Facebook's Link Shim for mobile -->
        <channelMapping urlReferrerHost="lm.facebook.com" />
     </channel>  
 </interactionChannelMappings>

It looks like wildcards. But where exactly do I put this (I don't want it in the Sitecore.Social.config file. And what other code do I need? I can't find any documentation on the Sitecore website other than this


Solution

  • This is what I was looking for: Create own Channel Item, for example:

    /sitecore/system/Marketing Control Panel/Taxonomies/Channel/Online/Affiliates/Site2

    Create own Traffictype:

    /sitecore/system/Settings/Analytics/Traffic Type/Affiliate

    Add the channel mapping to Sitecore.Analytics.Compatibility.config:

    <add trafficType="TRAFFIC-ID" channel="{CHANNEL-ITEM-GUID}" />
    

    create a new .config with:

    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
      <sitecore>
        <social>
          <interactionChannelMappings>
            <channel channelId="{CHANNEL-ITEM-GUID}">
              <!-- affiliate wildcards -->
              <channelMapping urlReferrerHost="site2.com" />
            </channel>
          </interactionChannelMappings>
        </social>
      </sitecore>
    </configuration>
    

    Visits coming from site2.com should now be automatically be mapped to the newly created custom channel