Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Chris Beardsley
Added: Jun 7, 2018 7:58 AM
Views: 19
Tags: no tags
  1. function(){
  2.   var topLevelDomain = window.location.hostname.split('.')[1]
  3.   switch(topLevelDomain){
  4.     case 'se':
  5.       return 'UA-2332505-5';
  6.       break;
  7.     case 'fi':
  8.       return 'UA-2332505-18';
  9.       break;
  10.     case 'no':
  11.       return 'UA-2332505-11';
  12.       break;
  13.     case 'dk':
  14.       return 'UA-2332505-6';
  15.       break;
  16.   };
  17. }