$hierarchy = $key . "," . $key3 . "," . $key5 . "," . $key7 . "," . $key9 . "," . $key11 . "," . $key13 . ",null,null,null,null,null,null," . $keyCountry;
                                                 $idHierarchy = insertHierarchy($mysqli, $hierarchy);
                                                 $dataMetrics = checkMetrics($mysqli, $metrics, $value14, $dataMetrics = array());
                                                 $flag = insertDataMetrics($mysqli, $idHierarchy, $key13, $dataMetrics, $processDate);
                                             } elseif ($key14 == "isp" || $key14 == "operating_system" || $key14 == "social_class" || $key14 == "browser" || $key14 == "age" || $key14 == "gender" || $key14 == "cluster") {
                                                 foreach ($value14 as $key15 => $value15) {
                                                     foreach ($value15 as $key16 => $value16) {
                                                         if ($key16 == "metrics") {
                                                             //echo "*#*#JERARQUIA OTROS - ".$key14.": ".$key15."->".$key13."->".$key11."->".$key9."->".$key7."->".$key5."->".$key3."->".$key."\n";
                                                             print_r("type: " . $key14 . "\n");
                                                             //print_r("idWeborama:".$key15."\n");
                                                             //print_r($value16);
                                                             $hierarchy = $key . "," . $key3 . "," . $key5 . "," . $key7 . "," . $key9 . "," . $key11 . "," . $key13 . "," . $key15 . ",null,null,null,null,null," . $keyCountry;
                                                             $idHierarchy = insertHierarchy($mysqli, $hierarchy);
                                                             $dataMetrics = checkMetrics($mysqli, $metrics, $value16, $dataMetrics = array());
                                                             $flag = insertDataMetrics($mysqli, $idHierarchy, $key15, $dataMetrics, $processDate);
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
                                                 $hierarchy = $key . "," . $key3 . "," . $key5 . "," . $key7 . "," . $key9 . "," . $key11 . "," . $key13 . ",null,null,null,null,null,null," . $keyCountry;
                                                 $idHierarchy = insertHierarchy($connSqlsrv, $hierarchy);
                                                 $dataMetrics = checkMetrics($connSqlsrv, $metrics, $value14, $dataMetrics = array());
                                                 $flag = insertDataMetrics($connSqlsrv, $idHierarchy, $key13, $dataMetrics, $processDate);
                                             } elseif ($key14 == "isp" || $key14 == "operating_system" || $key14 == "social_class" || $key14 == "browser" || $key14 == "age" || $key14 == "gender" || $key14 == "cluster") {
                                                 foreach ($value14 as $key15 => $value15) {
                                                     foreach ($value15 as $key16 => $value16) {
                                                         if ($key16 == "metrics") {
                                                             //echo "*#*#JERARQUIA OTROS - ".$key14.": ".$key15."->".$key13."->".$key11."->".$key9."->".$key7."->".$key5."->".$key3."->".$key."\n";
                                                             print_r("type: " . $key14 . "\n");
                                                             //print_r("idWeborama:".$key15."\n");
                                                             //print_r($value16);
                                                             $hierarchy = $key . "," . $key3 . "," . $key5 . "," . $key7 . "," . $key9 . "," . $key11 . "," . $key13 . "," . $key15 . ",null,null,null,null,null," . $keyCountry;
                                                             $idHierarchy = insertHierarchy($connSqlsrv, $hierarchy);
                                                             $dataMetrics = checkMetrics($connSqlsrv, $metrics, $value16, $dataMetrics = array());
                                                             $flag = insertDataMetrics($connSqlsrv, $idHierarchy, $key15, $dataMetrics, $processDate);
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }