Skip to content

Commit bfaa70f

Browse files
devin-ai-integration[bot]octavia-squidington-iiisuisuixia42
authored
fix(source-google-analytics-data-api): use GA4 "today" keyword for timezone-correct end dates (AI-Triage PR) (#73632)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com> Co-authored-by: suisuixia42 <suisui.xia@airbyte.io>
1 parent 1f52c79 commit bfaa70f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

airbyte-integrations/connectors/source-google-analytics-data-api/manifest.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ dynamic_streams:
953953
- type: AddFields
954954
fields:
955955
- path: [ "endDate" ]
956-
value: "{% raw %}{{ stream_slice.end_time or format_datetime(config['date_ranges_end_date'] if config.get('date_ranges_end_date') else now_utc(), '%Y-%m-%d') }}{% endraw %}"
956+
value: "{% raw %}{{ stream_slice.end_time or format_datetime(config['date_ranges_end_date'] if config.get('date_ranges_end_date') else day_delta(1), '%Y-%m-%d') }}{% endraw %}"
957957
{% endif %}
958958
# This mapping adds metrics to the request parameters, but first transforms
959959
# them from a list of values into a list of dicts (e.g., {'name': <metric_name>})
@@ -991,7 +991,7 @@ dynamic_streams:
991991
992992
{% if not ns.cursor %}
993993
- startDate: "{{ config.get('date_ranges_start_date', day_delta(-730, '%Y-%m-%d')) }}"
994-
endDate: "{{ format_datetime(config['date_ranges_end_date'] if config.get('date_ranges_end_date') else now_utc(), '%Y-%m-%d') }}"
994+
endDate: "{{ config.get('date_ranges_end_date', 'today') }}"
995995
{% else %}
996996
- startDate: "{{ '{{ stream_slice.start_time }}' }}"
997997
endDate: "{{ '{{ stream_slice.end_time }}' }}"
@@ -1038,7 +1038,7 @@ dynamic_streams:
10381038
datetime_format: "%Y-%m-%d"
10391039
end_datetime:
10401040
type: MinMaxDatetime
1041-
datetime: "{% raw %}{{ format_datetime(config['date_ranges_end_date'] if config.get('date_ranges_end_date') else now_utc(), '%Y-%m-%d') }}{% endraw %}"
1041+
datetime: "{% raw %}{{ config.get('date_ranges_end_date') or day_delta(1, '%Y-%m-%d') }}{% endraw %}"
10421042
datetime_format: "%Y-%m-%d"
10431043
{% endif %}
10441044
# This section is a bit tricky due to two levels of interpolation:

airbyte-integrations/connectors/source-google-analytics-data-api/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ data:
1212
connectorSubtype: api
1313
connectorType: source
1414
definitionId: 3cc2eafd-84aa-4dca-93af-322d9dfeec1a
15-
dockerImageTag: 2.9.25
15+
dockerImageTag: 2.9.26
1616
dockerRepository: airbyte/source-google-analytics-data-api
1717
documentationUrl: https://docs.airbyte.com/integrations/sources/google-analytics-data-api
1818
externalDocumentationUrls:

docs/integrations/sources/google-analytics-data-api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ The Google Analytics connector is subject to Google Analytics Data API quotas. P
280280

281281
| Version | Date | Pull Request | Subject |
282282
|:---------------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
283+
| 2.9.26 | 2026-02-25 | [73632](https://github.com/airbytehq/airbyte/pull/73632) | fix(source-google-analytics-data-api): use GA4 today keyword for timezone-correct end dates (AI-Triage PR) |
283284
| 2.9.25 | 2026-02-24 | [73750](https://github.com/airbytehq/airbyte/pull/73750) | Update dependencies |
284285
| 2.9.24 | 2026-02-17 | [73404](https://github.com/airbytehq/airbyte/pull/73404) | Update dependencies |
285286
| 2.9.23 | 2026-02-10 | [73067](https://github.com/airbytehq/airbyte/pull/73067) | Update dependencies |

0 commit comments

Comments
 (0)