# CID Marketing Source Code

When the cid parameter is detected in the URL the analytics script does the following:

  • Prepends the channel category to the string, following the mapping defined below.
  • Replaces : with |.
  • Formats the date with a legible format mm/dd/yyyy, if the date is not already formatted.

# No CID

If the user comes to the site without a cid in the URL, it is created automatically based on the referrer history. If the user came directly to the page, the channel Direct is specified. If the user came from a referring website, then the logic is determined based on the URL of the referrer; the logic is specified below. The default Referral channel is specified if no match is found. If the user has come from a search engine, we attempt to read the search query from the referrer URL and pass that into the CID.

# Channel to Category, Source Code, and Search Term Mapping

  • channel: 'Corporate_Sponsorships', category: 'Corporate_Sponsorships'
  • channel: 'Direct', category: 'Web'
  • channel: 'DRTV', category: 'DRTV'
  • channel: 'Email', category: 'Email'
  • channel: 'Email_Digital_Acquisition', category: 'Email'
  • channel: 'Email_Lead_Gen', category: 'Email'
  • channel: 'Mail', category: 'Mail'
  • channel: 'Mobile_Apps', category: 'Mobile'
  • channel: 'Mobile_Web', category: 'Mobile'
  • channel: 'Texting', category: 'Mobile'
  • channel: 'Event', category: 'Other'
  • channel: 'Mobile', category: 'Mobile'
  • channel: 'Print', category: 'Other'
  • channel: 'Public_Information', category: 'Other'
  • channel: 'Radio', category: 'Radio'
  • channel: 'Radio_PSA', category: 'Radio'
  • channel: 'Social_Philanthropy', category: 'Other'
  • channel: 'Phone', category: 'Phone'
  • channel: 'TV_to_Web', category: 'TV'
  • channel: 'TV_PSA', category: 'TV'
  • channel: 'Digital_Display_Advertising', category: 'Web'
  • channel: 'Drive_to_Web', category: 'Web'
  • channel: 'Employee_Engagement', category: 'Web'
  • channel: 'Gamers_and_Youtubers', category: 'Web'
  • channel: 'Non_Paid_Digital_Acquisition', category: 'Web'
  • channel: 'Paid_Digital_Acquisition', category: 'Web'
  • channel: 'Paid_Search', category: 'Web'
  • channel: 'Peer_to_Peer_Fundraising', category: 'Web'
  • channel: 'Social_Network', category: 'Web'
  • channel: 'Social_Network_SCUS', category: 'Web'
  • channel: 'Other', category: 'Web'
  • channel: 'Referral', category: 'Web'
  • channel: 'Organic_Search', category: 'Web'
  • channel: Any with DRTV string in it, category: 'DRTV'
  • channel: Default, category: 'Web'

# Domain to Channel & Source Code Mapping

  • domain: 'facebook.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Facebook'
  • domain: 'twitter.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Twitter'
  • domain: 'plus.google.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Google+'
  • domain: 'instagram.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Instagram'
  • domain: 'snapchat.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Snapchat'
  • domain: 'pinterest.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Pinterest'
  • domain: 'linkedin.com', sourceCodeChannel: 'Social_Network', sourceCode: 'LinkedIn'
  • domain: 'youtube.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Youtube'
  • domain: 'myspace.com', sourceCodeChannel: 'Social_Network', sourceCode: 'MySpace'
  • domain: 'livejournal.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Livejournal'
  • domain: 'blogspot.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Blogspot'
  • domain: 'wordpress.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Wordpress'
  • domain: 'digg.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Digg'
  • domain: 'reddit.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Reddit'
  • domain: 'stumbleupon.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Stumbleupon'
  • domain: 'yelp.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Yelp'
  • domain: 'tumblr.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Tumblr'
  • domain: 'flixster.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Flixster'
  • domain: 'vimeo.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Vimeo'
  • domain: 'flickr.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Flickr'
  • domain: 'dailymotion.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Dailymotion'
  • domain: 'photobucket.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Photobucket'
  • domain: 'fotolog.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Fotolog'
  • domain: 'classmates.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Classmates'
  • domain: 'myyearbook.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Myyearbook'
  • domain: 'mylife.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Mylife'
  • domain: 'cafemom.com', sourceCodeChannel: 'Social_Network', sourceCode: 'Cafemom'
  • domain: 'yahoo.com', sourceCodeChannel: 'Organic_Search', sourceCode: 'Yahoo', searchTerm
  • domain: 'google.com', sourceCodeChannel: 'Organic_Search', sourceCode: 'Google'
  • domain: 'bing.com', sourceCodeChannel: 'Organic_Search', sourceCode: 'Bing', searchTerm
  • domain: 'ask.com', sourceCodeChannel: 'Organic_Search', sourceCode: 'Ask', searchTerm
  • domain: 'gogo.com', sourceCodeChannel: 'Organic_Search', sourceCode: 'Gogo'
  • domain: 'baidu.com', sourceCodeChannel: 'Organic_Search', sourceCode: 'Baidu'
  • domain: 'duckduckgo.com', sourceCodeChannel: 'Organic_Search', sourceCode: 'Duckduckgo'
  • domain: 'kidrex.org', sourceCodeChannel: 'Organic_Search', sourceCode: 'Kidrex', searchTerm
  • domain: other, sourceCodeChannel: 'Referral'
  • domain: none, sourceCodeChannel: 'Direct'