Hello guys, I’m looking for the method that return the value of ‘Custom Variable value’ (If you have a custom variable like ‘User’ the value of that should be the user name, I need that value), someone known where is it, I can’t find it.
you can use CustomVariables.getCustomVariables with parameter &expanded=1
or you can call CustomVariables.getCustomVariablesValuesFromNameId with parameter &idSubtable=X where X is the value of idsubtable in the API response from the first call CustomVariables.getCustomVariables
I meant something like this $newRowToAdd[“custom_var_v1”] on core/ArchiveProcessing/Day.php but still doesn’t work (This give me an error), that Array ($newRowToAdd) is generated in this method public function getArrayInterestForLabel($label), in each loop is taking new values and calling updateInterestStats giving her new values in order to show it, but, how can take only the custom var key and value values?
object(Piwik_DataTable)#105 (14) { [“rows”:protected]=> array(0) { } [“parents”:protected]=> NULL [“currentId”:protected]=> int(1) [“depthLevel”:protected]=> int(0) [“indexNotUpToDate”:protected]=> bool(true) [“rebuildIndexContinuously”:protected]=> bool(false) [“tableSortedBy”:protected]=> bool(false) [“queuedFilters”:protected]=> array(3) { [0]=> array(2) { [“className”]=> string(22) “ReplaceSummaryRowLabel” [“parameters”]=> array(0) { } } [1]=> array(2) { [“className”]=> string(18) “ReplaceColumnNames” [“parameters”]=> array(0) { } } [2]=> array(2) { [“className”]=> string(21) “ColumnCallbackReplace” [“parameters”]=> array(2) { [0]=> string(5) “label” [1]=> string(10) “lambda_41” } } } [“rowsCountBeforeLimitFilter”:protected]=> int(0) [“enableRecursiveSort”:protected]=> bool(false) [“enableRecursiveFilters”:protected]=> bool(false) [“rowsIndexByLabel”:protected]=> array(0) { } [“summaryRow”:protected]=> NULL [“metadata”:protected]=> array(0) { } }
The object is created, but I don’t know how can get the custom variables now, I need to take the name from the user recorded on the db, I follow the code but it’s in another level, superior to mine, and I tried to modify it but I can’t take the user name from the table, I need some help with this,