src/universal-analytics.c
static inline void populateParameterNames(char* params[], const char* custom_params){
  int i, j;
  char* cur;
  params[UA_TRACKING_ID] = "tid";
  params[UA_CLIENT_ID] = "cid";
  params[UA_USER_ID] = "uid";
  params[UA_TRACKING_TYPE] = "t";
  params[UA_DOCUMENT_PATH] = "dp";
  params[UA_DOCUMENT_TITLE] = "dt";
  params[UA_DOCUMENT_LOCATION] = "dl";
  params[UA_DOCUMENT_HOSTNAME] = "dh";
  params[UA_DOCUMENT_REFERRER] = "dr";
  params[UA_DOCUMENT_ENCODING] = "de";
  params[UA_QUEUE_TIME_MS] = "qt";
  params[UA_SESSION_CONTROL] = "sc";
  params[UA_CAMPAIGN_NAME] = "cn";
  params[UA_CAMPAIGN_SOURCE] = "cs";
  params[UA_CAMPAIGN_MEDIUM] = "cm";
  params[UA_CAMPAIGN_KEYWORD] = "ck";
  params[UA_CAMPAIGN_CONTENT] = "cc";
  params[UA_CAMPAIGN_ID] = "ci";
  params[UA_SCREEN_RESOLUTION] = "sr";
  params[UA_VIEWPORT_SIZE] = "vp";
  params[UA_SCREEN_COLORS] = "sd";
  params[UA_USER_LANGUAGE] = "ul";
  params[UA_APP_NAME] = "an";
  params[UA_APP_VERSION] = "av";
  params[UA_CONTENT_DESCRIPTION] = "cd";
  params[UA_SCREEN_NAME] = "cd";
  params[UA_EVENT_CATEGORY] = "ec";
  params[UA_EVENT_ACTION] = "ea";
  params[UA_EVENT_LABEL] = "el";
  params[UA_EVENT_VALUE] = "ev";
  params[UA_NON_INTERACTIVE] = "ni";
  params[UA_SOCIAL_ACTION] = "sa";
  params[UA_SOCIAL_NETWORK] = "sn";
  params[UA_SOCIAL_TARGET] = "st";
  params[UA_EXCEPTION_DESCRIPTION] = "exd";
  params[UA_EXCEPTION_FATAL] = "exf";
  params[UA_TRANSACTION_ID] = "ti";
  params[UA_TRANSACTION_AFFILIATION] = "ta";
  params[UA_TRANSACTION_REVENUE] = "tr";
  params[UA_TRANSACTION_SHIPPING] = "ts";
  params[UA_TRANSACTION_TAX] = "tt";
  params[UA_TRANSACTION_CURRENCY] = "cu";
  params[UA_ITEM_CODE ] = "ic" ;
  params[UA_ITEM_NAME] = "in";
  params[UA_ITEM_VARIATION] = "iv";
  params[UA_ITEM_PRICE] = "ip";
  params[UA_ITEM_QUANTITY] = "iq";
  params[UA_TIMING_CATEGORY] = "utc";
  params[UA_TIMING_VARIABLE] = "utv";
  params[UA_TIMING_LABEL] = "utl";
  params[UA_TIMING_TIME] = "utt";
  params[UA_TIMING_DNS] = "dns";
  params[UA_TIMING_PAGE_LOAD] = "pdt";
  params[UA_TIMING_REDIRECT] = "rrt";
  params[UA_TIMING_TCP_CONNECT] = "tcp";
  params[UA_TIMING_SERVER_RESPONSE] = "srt";
  params[UA_VERSION_NUMBER] = "v";
 
  /* Populate dimension space */
  for(i = 0; i < UA_MAX_CUSTOM_DIMENSION; i++){
    cur = (char*) (custom_params + (i * UA_CUSTOM_PARAM_LEN));
    sprintf(cur, "cd%d", i + 1);
    params[ i + UA_START_CDIMENSIONS ] = cur; /* link parameter name */
  }

  /* Populate metric space */
  for(j = 0; j < UA_MAX_CUSTOM_METRIC; j++){
    cur = (char*) (custom_params + ((i + j) * UA_CUSTOM_PARAM_LEN));
    sprintf(cur, "cm%d", j + 1);
    params[ j + UA_START_CMETRICS ] = cur; /* link parameter name */
  }
  
}
/* List of parameter names (strings) corresponding to our field indexes;
 * these are also protocol-constants for Measurement Protocol v1.
 * We may eventually migrate these to a separate protocol module. */
List of parameter names (strings) corresponding to our field indexes;
these are also protocol-constants for Measurement Protocol v1.
We may eventually migrate these to a separate protocol module.
List of parameter names ( strings ) corresponding to our field indexes ; these are also protocol - constants for Measurement Protocol v1 . We may eventually migrate these to a separate protocol module .
static inline void populateParameterNames(char* params[], const char* custom_params){
  int i, j;
  char* cur;
  params[UA_TRACKING_ID] = "tid";
  params[UA_CLIENT_ID] = "cid";
  params[UA_USER_ID] = "uid";
  params[UA_TRACKING_TYPE] = "t";
  params[UA_DOCUMENT_PATH] = "dp";
  params[UA_DOCUMENT_TITLE] = "dt";
  params[UA_DOCUMENT_LOCATION] = "dl";
  params[UA_DOCUMENT_HOSTNAME] = "dh";
  params[UA_DOCUMENT_REFERRER] = "dr";
  params[UA_DOCUMENT_ENCODING] = "de";
  params[UA_QUEUE_TIME_MS] = "qt";
  params[UA_SESSION_CONTROL] = "sc";
  params[UA_CAMPAIGN_NAME] = "cn";
  params[UA_CAMPAIGN_SOURCE] = "cs";
  params[UA_CAMPAIGN_MEDIUM] = "cm";
  params[UA_CAMPAIGN_KEYWORD] = "ck";
  params[UA_CAMPAIGN_CONTENT] = "cc";
  params[UA_CAMPAIGN_ID] = "ci";
  params[UA_SCREEN_RESOLUTION] = "sr";
  params[UA_VIEWPORT_SIZE] = "vp";
  params[UA_SCREEN_COLORS] = "sd";
  params[UA_USER_LANGUAGE] = "ul";
  params[UA_APP_NAME] = "an";
  params[UA_APP_VERSION] = "av";
  params[UA_CONTENT_DESCRIPTION] = "cd";
  params[UA_SCREEN_NAME] = "cd";
  params[UA_EVENT_CATEGORY] = "ec";
  params[UA_EVENT_ACTION] = "ea";
  params[UA_EVENT_LABEL] = "el";
  params[UA_EVENT_VALUE] = "ev";
  params[UA_NON_INTERACTIVE] = "ni";
  params[UA_SOCIAL_ACTION] = "sa";
  params[UA_SOCIAL_NETWORK] = "sn";
  params[UA_SOCIAL_TARGET] = "st";
  params[UA_EXCEPTION_DESCRIPTION] = "exd";
  params[UA_EXCEPTION_FATAL] = "exf";
  params[UA_TRANSACTION_ID] = "ti";
  params[UA_TRANSACTION_AFFILIATION] = "ta";
  params[UA_TRANSACTION_REVENUE] = "tr";
  params[UA_TRANSACTION_SHIPPING] = "ts";
  params[UA_TRANSACTION_TAX] = "tt";
  params[UA_TRANSACTION_CURRENCY] = "cu";
  params[UA_ITEM_CODE ] = "ic" ;
  params[UA_ITEM_NAME] = "in";
  params[UA_ITEM_VARIATION] = "iv";
  params[UA_ITEM_PRICE] = "ip";
  params[UA_ITEM_QUANTITY] = "iq";
  params[UA_TIMING_CATEGORY] = "utc";
  params[UA_TIMING_VARIABLE] = "utv";
  params[UA_TIMING_LABEL] = "utl";
  params[UA_TIMING_TIME] = "utt";
  params[UA_TIMING_DNS] = "dns";
  params[UA_TIMING_PAGE_LOAD] = "pdt";
  params[UA_TIMING_REDIRECT] = "rrt";
  params[UA_TIMING_TCP_CONNECT] = "tcp";
  params[UA_TIMING_SERVER_RESPONSE] = "srt";
  params[UA_VERSION_NUMBER] = "v";
  for(i = 0; i < UA_MAX_CUSTOM_DIMENSION; i++){
    cur = (char*) (custom_params + (i * UA_CUSTOM_PARAM_LEN));
    sprintf(cur, "cd%d", i + 1);
    params[ i + UA_START_CDIMENSIONS ] = cur; 
  }
  for(j = 0; j < UA_MAX_CUSTOM_METRIC; j++){
    cur = (char*) (custom_params + ((i + j) * UA_CUSTOM_PARAM_LEN));
    sprintf(cur, "cm%d", j + 1);
    params[ j + UA_START_CMETRICS ] = cur; 
  }
}
static inline void populateParameterNames ( char * params [ ] , const char * custom_params ) { int i , j ; char * cur ; params [ UA_TRACKING_ID ] = " " ; params [ UA_CLIENT_ID ] = " " ; params [ UA_USER_ID ] = " " ; params [ UA_TRACKING_TYPE ] = " " ; params [ UA_DOCUMENT_PATH ] = " " ; params [ UA_DOCUMENT_TITLE ] = " " ; params [ UA_DOCUMENT_LOCATION ] = " " ; params [ UA_DOCUMENT_HOSTNAME ] = " " ; params [ UA_DOCUMENT_REFERRER ] = " " ; params [ UA_DOCUMENT_ENCODING ] = " " ; params [ UA_QUEUE_TIME_MS ] = " " ; params [ UA_SESSION_CONTROL ] = " " ; params [ UA_CAMPAIGN_NAME ] = " " ; params [ UA_CAMPAIGN_SOURCE ] = " " ; params [ UA_CAMPAIGN_MEDIUM ] = " " ; params [ UA_CAMPAIGN_KEYWORD ] = " " ; params [ UA_CAMPAIGN_CONTENT ] = " " ; params [ UA_CAMPAIGN_ID ] = " " ; params [ UA_SCREEN_RESOLUTION ] = " " ; params [ UA_VIEWPORT_SIZE ] = " " ; params [ UA_SCREEN_COLORS ] = " " ; params [ UA_USER_LANGUAGE ] = " " ; params [ UA_APP_NAME ] = " " ; params [ UA_APP_VERSION ] = " " ; params [ UA_CONTENT_DESCRIPTION ] = " " ; params [ UA_SCREEN_NAME ] = " " ; params [ UA_EVENT_CATEGORY ] = " " ; params [ UA_EVENT_ACTION ] = " " ; params [ UA_EVENT_LABEL ] = " " ; params [ UA_EVENT_VALUE ] = " " ; params [ UA_NON_INTERACTIVE ] = " " ; params [ UA_SOCIAL_ACTION ] = " " ; params [ UA_SOCIAL_NETWORK ] = " " ; params [ UA_SOCIAL_TARGET ] = " " ; params [ UA_EXCEPTION_DESCRIPTION ] = " " ; params [ UA_EXCEPTION_FATAL ] = " " ; params [ UA_TRANSACTION_ID ] = " " ; params [ UA_TRANSACTION_AFFILIATION ] = " " ; params [ UA_TRANSACTION_REVENUE ] = " " ; params [ UA_TRANSACTION_SHIPPING ] = " " ; params [ UA_TRANSACTION_TAX ] = " " ; params [ UA_TRANSACTION_CURRENCY ] = " " ; params [ UA_ITEM_CODE ] = " " ; params [ UA_ITEM_NAME ] = " " ; params [ UA_ITEM_VARIATION ] = " " ; params [ UA_ITEM_PRICE ] = " " ; params [ UA_ITEM_QUANTITY ] = " " ; params [ UA_TIMING_CATEGORY ] = " " ; params [ UA_TIMING_VARIABLE ] = " " ; params [ UA_TIMING_LABEL ] = " " ; params [ UA_TIMING_TIME ] = " " ; params [ UA_TIMING_DNS ] = " " ; params [ UA_TIMING_PAGE_LOAD ] = " " ; params [ UA_TIMING_REDIRECT ] = " " ; params [ UA_TIMING_TCP_CONNECT ] = " " ; params [ UA_TIMING_SERVER_RESPONSE ] = " " ; params [ UA_VERSION_NUMBER ] = " " ; for ( i = 0 ; i < UA_MAX_CUSTOM_DIMENSION ; i ++ ) { cur = ( char * ) ( custom_params + ( i * UA_CUSTOM_PARAM_LEN ) ) ; sprintf ( cur , " " , i + 1 ) ; params [ i + UA_START_CDIMENSIONS ] = cur ; } for ( j = 0 ; j < UA_MAX_CUSTOM_METRIC ; j ++ ) { cur = ( char * ) ( custom_params + ( ( i + j ) * UA_CUSTOM_PARAM_LEN ) ) ; sprintf ( cur , " " , j + 1 ) ; params [ j + UA_START_CMETRICS ] = cur ; } }
List of parameter names (strings) corresponding to our field indexes;
 these are also protocol-constants for Measurement Protocol v1.
List of parameter names ( strings ) corresponding to our field indexes ; these are also protocol - constants for Measurement Protocol v1 .
/* Populate dimension space */ /* link parameter name */ /* Populate metric space */ /* link parameter name */