Skip to content

Commit

Permalink
do not overwrite idGoal parameter if found in API metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Sep 10, 2024
1 parent 5670dd5 commit 32629b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ function getReportData(request: GoogleAppsScript.Data_Studio.Request<ConnectorPa
reportParams.enhanced = '1';
}

delete reportParams.apiModule;
delete reportParams.apiAction;

const SHOW_COLUMNS_UNSUPPORTED_METHODS = [
'VisitFrequency.get',
'Contents.getContentPieces',
Expand Down Expand Up @@ -292,7 +295,7 @@ function getReportData(request: GoogleAppsScript.Data_Studio.Request<ConnectorPa
showColumns,
};

if (reportParams.apiModule !== 'Goals') {
if (reportParams.apiModule !== 'Goals' && typeof params.idGoal === 'undefined') {
params.filter_update_columns_when_show_all_goals = '1';
params.idGoal = '0'; // calculate extra metrics for all goals
}
Expand Down

0 comments on commit 32629b8

Please sign in to comment.