Skip to content

Commit

Permalink
fix: ga4 v2 config updates (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
utsabc authored Jul 26, 2024
1 parent c878405 commit 0322448
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 176 deletions.
17 changes: 5 additions & 12 deletions src/configurations/destinations/ga4_v2/db-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@
"supportedMessageTypes": {
"cloud": ["track", "group", "page"],
"device": {
"web": ["identify", "track", "page", "group"],
"android": ["identify", "track", "screen"],
"ios": ["identify", "track", "screen"]
"web": ["identify", "page"]
}
},
"supportedConnectionModes": {
Expand Down Expand Up @@ -73,18 +71,13 @@
"oneTrustCookieCategories",
"ketchConsentPurposes",
"eventsMapping",
"sdkBaseUrl"
],
"web": [
"debugView",
"useNativeSDK",
"connectionMode",
"capturePageView",
"useNativeSDKToSend",
"sdkBaseUrl",
"extendPageViewParams",
"overrideClientAndSessionId",
"consentManagement"
"capturePageView",
"debugView"
],
"web": ["useNativeSDK", "connectionMode", "useNativeSDKToSend", "consentManagement"],
"android": ["useNativeSDK", "connectionMode", "consentManagement"],
"ios": ["useNativeSDK", "connectionMode", "consentManagement"],
"unity": ["consentManagement", "connectionMode"],
Expand Down
14 changes: 6 additions & 8 deletions src/configurations/destinations/ga4_v2/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,13 @@
}
},
"capturePageView": {
"type": "object",
"properties": { "web": { "type": "string", "enum": ["rs", "gtag"], "default": "rs" } }
},
"debugView": { "type": "object", "properties": { "web": { "type": "boolean" } } },
"extendPageViewParams": { "type": "object", "properties": { "web": { "type": "boolean" } } },
"overrideClientAndSessionId": {
"type": "object",
"properties": { "web": { "type": "boolean" } }
"type": "string",
"enum": ["rs", "gtag"],
"default": "rs"
},
"debugView": { "type": "boolean" },
"extendPageViewParams": { "type": "boolean" },
"overrideClientAndSessionId": { "type": "boolean" },
"useNativeSDK": {
"type": "object",
"properties": {
Expand Down
141 changes: 73 additions & 68 deletions src/configurations/destinations/ga4_v2/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,78 @@
]
}
]
},
{
"title": "Hybrid mode settings",
"note": "Configure additional settings for hybrid mode here",
"preRequisites": {
"fields": [
{
"configKey": "connectionMode.web",
"value": "hybrid"
}
]
},
"fields": [
{
"type": "singleSelect",
"label": "Choose how to capture pageviews",
"configKey": "capturePageView",
"note": [
"Choose whether you want to send page view events through the RudderStack JS SDK, or through automatic collection on each page load using GA4 Enhanced Measurement (gtag).",
{
"text": "Learn more here ",
"link": "https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag"
},
"about how GA4 measures pages and screens"
],
"options": [
{
"label": "RudderStack JS SDK",
"value": "rs"
},
{
"label": "gtag Automated Capture",
"value": "gtag"
}
],
"default": "rs"
},
{
"type": "checkbox",
"label": "Debug via DebugView",
"configKey": "debugView",
"default": false,
"note": [
"Enabling this allows you to monitor your device mode events in ",
{
"text": "DebugView.",
"link": "https://support.google.com/analytics/answer/7201382"
},
"For hybrid mode, these would be only your page calls"
]
},
{
"type": "checkbox",
"label": "Include URL and Search as Page View properties",
"configKey": "extendPageViewParams",
"note": "Enabling this extends the set of properties automatically collected to include 'URL' and 'search'. Note that GA4 has a limit on the number of unique properties per event name",
"default": false
},
{
"type": "checkbox",
"label": "Override gtag client ID & session ID",
"configKey": "overrideClientAndSessionId",
"note": [
"Override the gtag clientID & sessionID with RudderStack's to ensure attribution is properly unified across page and track events. We recommend turning on the override function. Otherwise, instrument your RudderStack SDK based on instructions ",
{
"text": "here",
"link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/google-analytics-4/setting-up-google-analytics-4-in-rudderstack/#hybrid-mode"
}
],
"default": false
}
]
}
]
},
Expand Down Expand Up @@ -306,74 +378,7 @@
"sdkTemplate": {
"title": "Web SDK settings",
"note": "not visible in the ui",
"fields": [
{
"type": "singleSelect",
"label": "Choose how to capture pageviews",
"configKey": "capturePageView",
"note": [
"Choose whether you want to send page view events through the RudderStack JS SDK, or through automatic collection on each page load using GA4 Enhanced Measurement (gtag).",
{
"text": "Learn more here ",
"link": "https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag"
},
"about how GA4 measures pages and screens"
],
"options": [
{
"label": "RudderStack JS SDK",
"value": "rs"
},
{
"label": "gtag Automated Capture",
"value": "gtag"
}
],
"default": "rs"
},
{
"type": "checkbox",
"label": "Debug via DebugView",
"configKey": "debugView",
"default": true,
"note": [
"Enabling this allows you to monitor your device mode events in ",
{
"text": "DebugView.",
"link": "https://support.google.com/analytics/answer/7201382"
},
"For hybrid mode, these would be only your page calls"
]
},
{
"type": "checkbox",
"label": "Include URL and Search as Page View properties",
"configKey": "extendPageViewParams",
"note": "Enabling this extends the set of properties automatically collected to include 'URL' and 'search'. Note that GA4 has a limit on the number of unique properties per event name",
"default": false
},
{
"preRequisites": {
"fields": [
{
"configKey": "connectionMode.web",
"value": "hybrid"
}
]
},
"type": "checkbox",
"label": "Override gtag client ID & session ID",
"configKey": "overrideClientAndSessionId",
"note": [
"Override the gtag clientID & sessionID with RudderStack's to ensure attribution is properly unified across page and track events. We recommend turning on the override function. Otherwise, instrument your RudderStack SDK based on instructions ",
{
"text": "here",
"link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/google-analytics-4/setting-up-google-analytics-4-in-rudderstack/#hybrid-mode"
}
],
"default": false
}
]
"fields": []
},
"consentSettingsTemplate": {
"title": "Consent settings",
Expand Down
145 changes: 75 additions & 70 deletions src/configurations/destinations/ga4_v2/ui-config.jt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,78 @@
]
}
]
},
{
"title": "Hybrid mode settings",
"note": "Configure additional settings for hybrid mode here",
"preRequisites": {
"fields": [
{
"configKey": "connectionMode.web",
"value": "hybrid"
}
]
},
"fields": [
{
"type": "singleSelect",
"label": "Choose how to capture pageviews",
"configKey": "capturePageView",
"note": [
"Choose whether you want to send page view events through the RudderStack JS SDK, or through automatic collection on each page load using GA4 Enhanced Measurement (gtag).",
{
"text": "Learn more here ",
"link": "https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag"
},
"about how GA4 measures pages and screens"
],
"options": [
{
"label": "RudderStack JS SDK",
"value": "rs"
},
{
"label": "gtag Automated Capture",
"value": "gtag"
}
],
"default": "rs"
},
{
"type": "checkbox",
"label": "Debug via DebugView",
"configKey": "debugView",
"default": false,
"note": [
"Enabling this allows you to monitor your device mode events in ",
{
"text": "DebugView.",
"link": "https://support.google.com/analytics/answer/7201382"
},
"For hybrid mode, these would be only your page calls"
]
},
{
"type": "checkbox",
"label": "Include URL and Search as Page View properties",
"configKey": "extendPageViewParams",
"note": "Enabling this extends the set of properties automatically collected to include 'URL' and 'search'. Note that GA4 has a limit on the number of unique properties per event name",
"default": false
},
{
"type": "checkbox",
"label": "Override gtag client ID & session ID",
"configKey": "overrideClientAndSessionId",
"note": [
"Override the gtag clientID & sessionID with RudderStack's to ensure attribution is properly unified across page and track events. We recommend turning on the override function. Otherwise, instrument your RudderStack SDK based on instructions ",
{
"text": "here",
"link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/google-analytics-4/setting-up-google-analytics-4-in-rudderstack/#hybrid-mode"
}
],
"default": false
}
]
}
]
},
Expand Down Expand Up @@ -306,74 +378,7 @@
"sdkTemplate": {
"title": "Web SDK settings",
"note": "not visible in the ui",
"fields": [
{
"type": "singleSelect",
"label": "Choose how to capture pageviews",
"configKey": "capturePageView",
"note": [
"Choose whether you want to send page view events through the RudderStack JS SDK, or through automatic collection on each page load using GA4 Enhanced Measurement (gtag).",
{
"text": "Learn more here ",
"link": "https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag"
},
"about how GA4 measures pages and screens"
],
"options": [
{
"label": "RudderStack JS SDK",
"value": "rs"
},
{
"label": "gtag Automated Capture",
"value": "gtag"
}
],
"default": "rs"
},
{
"type": "checkbox",
"label": "Debug via DebugView",
"configKey": "debugView",
"default": true,
"note": [
"Enabling this allows you to monitor your device mode events in ",
{
"text": "DebugView.",
"link": "https://support.google.com/analytics/answer/7201382"
},
"For hybrid mode, these would be only your page calls"
]
},
{
"type": "checkbox",
"label": "Include URL and Search as Page View properties",
"configKey": "extendPageViewParams",
"note": "Enabling this extends the set of properties automatically collected to include 'URL' and 'search'. Note that GA4 has a limit on the number of unique properties per event name",
"default": false
},
{
"preRequisites": {
"fields": [
{
"configKey": "connectionMode.web",
"value": "hybrid"
}
]
},
"type": "checkbox",
"label": "Override gtag client ID & session ID",
"configKey": "overrideClientAndSessionId",
"note": [
"Override the gtag clientID & sessionID with RudderStack's to ensure attribution is properly unified across page and track events. We recommend turning on the override function. Otherwise, instrument your RudderStack SDK based on instructions ",
{
"text": "here",
"link": "https://www.rudderstack.com/docs/destinations/streaming-destinations/google-analytics-4/setting-up-google-analytics-4-in-rudderstack/#hybrid-mode"
}
],
"default": false
}
]
"fields": []
},
"consentSettingsTemplate": {
"title": "Consent settings",
Expand Down Expand Up @@ -474,7 +479,7 @@
"placeholder": "properties.price"
},
{
"type": "dynamicDataSelect",
"type": "autoComplete",
"label": "GA4 parameter",
"key": "to",
"placeholder": "value"
Expand Down Expand Up @@ -525,7 +530,7 @@
"placeholder": "e.g $.properties.revenue"
},
{
"type": "dynamicDataSelect",
"type": "autoComplete",
"label": "GA4 parameter",
"key": "to",
"placeholder": "$.event[0].params.value"
Expand Down
Loading

0 comments on commit 0322448

Please sign in to comment.