Search code examples
sitecoresitecore-dms

Sitecore 7.2 DMS get traffic name by traffic ID


I'm struggling to get traffic type name from Sitecore DMS analytics tracker by traffic ID. Is there a way to do this?

I get the ID:

int id = Tracker.CurrentVisit.TrafficType

Then I was trying to play with

Tracker.SharedData.TrafficTypes

to find traffic name but no luck.

Thanks!


Solution

  • As far as I know, there is nowhere that stores a "traffic type name". I think the best you can do is look here:

    /sitecore/system/Settings/Analytics/Traffic Type

    Find the Traffic Type item with the Value field that matches the one you're looking for and use the name or display name of the item.

    Alternatively you could create your own custom mapping items.