Skip to content

Commit ce0b3e6

Browse files
Merge pull request #6348 from segmentio/DOC-857
Adding replace function to consent mode docs [DOC-857]
2 parents e55d36e + 0610cd2 commit ce0b3e6

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/connections/destinations/actions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ If necessary, click **New Mapping** to create a new, blank action.
193193

194194
The coalesce function takes a primary value and uses it if it is available. If the value isn't available, the function uses the fallback value instead.
195195

196+
### Replace function
196197

198+
The replace function allows you to replace a string, integer, or boolean with a new value. You have the option to replace up to two values within a single field.
197199

198200
### Conditions
199201

src/connections/destinations/catalog/actions-google-analytics-4-web/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ To enable consent mode for your Google Analytics 4 Web destination:
113113
* Ad User Data Consent State
114114
* Ad Personalization Consent State
115115
You can manually select `Granted` or `Denied` from the dropdown menu for Advanced consent mode settings, and type in `granted` or `denied` for basic consent mode settings.
116-
5. *(Option 2)* Under the **Select mappings** section, create an event variable to directly grab the value from the payload (for example, `properties.adStorageConsentState`). Ensure it translates to `granted` or `denied`. You can use an insert function to translate to `granted` or `denied`. Use the replace function if it's a string. Do this for these fields:
116+
5. *(Option 2)* Under the **Select mappings** section, create an event variable to directly grab the value from the payload (for example, `properties.adStorageConsentState`). Ensure it translates to `granted` or `denied`. You can use an insert or [replace function](/docs/connections/destinations/actions/#replace-function) to translate other values to `granted` or `denied`. Do this for these fields:
117117
* Ads Storage Consent State
118118
* Analytics Storage Consent State
119119
* Ad User Data Consent State

src/connections/destinations/catalog/actions-google-analytics-4/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ To enable consent mode for your Google Analytics 4 Cloud destination, you must u
7575
2. Go to the **Mappings** tab of the destination.
7676
3. Select the mapping you want to edit.
7777
4. Under the **Select mappings** section, find **Ad User Data Consent State**.
78-
5. Select the **Event Variables** tab and create an event variable to directly grab the value from the payload. Ensure it translates to `GRANTED` or `DENIED`. You can use an insert function to translate to `GRANTED`or `DENIED` if your consent values are booleans. You can use the replace function if it's a string.
78+
5. Select the **Event Variables** tab and create an event variable to directly grab the value from the payload. Ensure it translates to `GRANTED` or `DENIED`. You can use an insert or [replace function](/docs/connections/destinations/actions/#replace-function) to translate other values to `GRANTED`or `DENIED`.
7979
6. Repeat step 5 for **Ad Personalization Consent State**.
8080

8181

src/connections/destinations/catalog/actions-google-enhanced-conversions/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ To enable consent mode for your Google Ads Conversions destination, you must upd
8787
1. Navigate to **Connections > Destinations** and select your Google Ads Conversion destination.
8888
2. Go to the **Mappings** tab of the destination.
8989
3. Select the mapping you want to edit.
90-
4. In the **Select mappings** section, for **Ad User Data Consent State** and **Ad Personalization Consent State**, select the **Event Variables** tab and create an event variable to directly grab the value from the payload. Ensure it translates to `GRANTED`, `DENIED`, or `UNSPECIFIED`. You can use an insert function to translate to `GRANTED`, `DENIED`, or `UNSPECIFIED` if your consent values are booleans. You can use the replace function if it's a string.
90+
4. In the **Select mappings** section, for **Ad User Data Consent State** and **Ad Personalization Consent State**, select the **Event Variables** tab and create an event variable to directly grab the value from the payload. Ensure it translates to `GRANTED`, `DENIED`, or `UNSPECIFIED`. You can use an insert or [replace function](/docs/connections/destinations/actions/#replace-function) to translate other values to `GRANTED`, `DENIED`, or `UNSPECIFIED`.
9191

9292
If you send `DENIED` for any of the two consent states, it results in an error and the data won't send to Google. For more information, see [FAQ about the EU user consent policy for Customer Match upload partners](https://support.google.com/google-ads/answer/14310715?hl=en){:target="_blank"}.
9393

0 commit comments

Comments
 (0)