Skip to content

Commit 9f4d552

Browse files
authored
Fix old merge conflicts (#2851)
* Makefile: Fix catalog-capi and capi targets * catalog_capi.js: Remove use of deprecated safeDump * Fix old merge conflicts
1 parent 512d7a7 commit 9f4d552

File tree

8 files changed

+13
-58
lines changed

8 files changed

+13
-58
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ catalog: catalog-papi
6262
# uses the old configapi
6363
.PHONY: capi
6464
capi: vendor/bundle
65-
@node scripts/catalog-capi.js
65+
@node scripts/catalog_capi.js
6666

6767
# shorter alias
6868
.PHONY: catalog-capi
6969
catalog-capi: vendor/bundle
70-
@node scripts/catalog-capi.js
70+
@node scripts/catalog_capi.js
7171

7272
# uses the new public api
7373
.PHONY: catalog-papi

scripts/catalog_capi.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,14 @@ const updateSources = async () => {
303303
var todayDate = new Date().toISOString().slice(0,10);
304304
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
305305
output += "# sources last updated " + todayDate + " \n";
306-
output += yaml.safeDump({ items: sourcesUpdated }, options);
306+
output += yaml.dump({ items: sourcesUpdated }, options);
307307
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/sources_capi.yml`), output);
308308

309309
// Create source-category mapping yaml file
310310
var todayDate = new Date().toISOString().slice(0,10);
311311
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
312312
output += "# source cateogries last updated " + todayDate + " \n";
313-
output += yaml.safeDump({ items: sourceCategories }, options);
313+
output += yaml.dump({ items: sourceCategories }, options);
314314
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories_capi.yml`), output);
315315
}
316316

@@ -413,14 +413,14 @@ const updateDestinations = async () => {
413413
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
414414
var todayDate = new Date().toISOString().slice(0,10);
415415
output += "# destination data last updated " + todayDate + " \n";
416-
output += yaml.safeDump({ items: destinationsUpdated }, options);
416+
output += yaml.dump({ items: destinationsUpdated }, options);
417417
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destinations_capi.yml`), output);
418418

419419
// Create destination-category mapping yaml file
420420
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
421421
var todayDate = new Date().toISOString().slice(0,10);
422422
output += "# destination categories last updated " + todayDate + " \n";
423-
output += yaml.safeDump({ items: destinationCategories }, options);
423+
output += yaml.dump({ items: destinationCategories }, options);
424424
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/destination_categories_capi.yml`), output);
425425
}
426426

src/_data/catalog/destination_categories.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
<<<<<<< HEAD
3-
# destination categories last updated 2022-05-05
4-
=======
52
# destination categories last updated 2022-05-02
6-
>>>>>>> master
73
items:
84
- display_name: A/B Testing
95
slug: a-b-testing

src/_data/catalog/destinations.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
<<<<<<< HEAD
32
# destination data last updated 2022-05-05
4-
=======
5-
# destination data last updated 2022-05-02
6-
>>>>>>> master
73
items:
84
- id: 60b5d0a01f3726b85dc05aab
95
display_name: 2mee

src/_data/catalog/regional-supported.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# AUTOGENERATED LIST OF CONNECTIONS THAT SUPPORT REGIONAL
2-
<<<<<<< HEAD
32
# Last updated 2022-05-05
4-
=======
5-
# Last updated 2022-05-02
6-
>>>>>>> master
73
warehouses:
84
- id: WcjBCzUGff
95
display_name: Azure SQL Data Warehouse

src/_data/catalog/source_categories.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
<<<<<<< HEAD
32
# source cateogries last updated 2022-05-05
4-
=======
5-
# source cateogries last updated 2022-05-02
6-
>>>>>>> master
73
items:
84
- display_name: A/B Testing
95
slug: a-b-testing

src/_data/catalog/sources.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
<<<<<<< HEAD
32
# sources last updated 2022-05-05
4-
=======
5-
# sources last updated 2022-05-02
6-
>>>>>>> master
73
items:
84
- id: 8HWbgPTt3k
95
display_name: .NET

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

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,50 +64,29 @@ Segment’s spec doesn't have an equivalent event for every Google Analytics 4 r
6464
#### Custom Events
6565
In addition to recommended events, you can also send custom events using the [Custom Event action](/docs/connections/destinations/catalog/actions-google-analytics-4/#custom-event). Custom events are events that you name. Custom events don't appear in most standard reports; you need to set up custom reports for meaningful analysis. To create custom events in the Google Analytics 4 web interface, see Google’s [Modify and create events through the user interface](https://support.google.com/analytics/answer/10085872){:target='_blank'}.
6666

67-
<<<<<<< HEAD
68-
> warning ""
69-
> Don’t create custom events that already correspond to the pre-built mappings that Segment has. Use the standard events defined in [GA4’s doc](https://developers.google.com/analytics/devguides/collection/ga4/reference/events){:target="_blank"} with their corresponding actions.
67+
warning ""
68+
Don’t create custom events that already correspond to the pre-built mappings that Segment has. Use the standard events defined in [GA4’s doc](https://developers.google.com/analytics/devguides/collection/ga4/reference/events){:target="_blank"} with their corresponding actions.
7069

71-
> info "Event naming limitations"
72-
> Google Analytics 4 requires that all event names contain only alpha-numeric characters and underscores, and must start with an alphabetic character. Segment replaces spaces in Event Names with an underscore, so that these events are accepted by GA4. For example, Segment renames an event named `Home Profile` to `Home_Profile`. In some cases, GA4 may reject an event outright, due to unsupported characters. For example, an event named `Home | Profile` will be silently rejected due to the pipe character.
73-
>
74-
> In all cases, event names in GA4 are case sensitive. The Custom Event action includes a **Lowercase Event Name** option, to ensure consistency of all events sent to Google. For more information, see Google's articles [Google Analytics 4 event name rules](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules){:target='_blank'} and [Event name limitations](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=firebase){:target="_blank"}.
70+
info "Event naming limitations"
71+
Google Analytics 4 requires that all event names contain only alpha-numeric characters and underscores, and must start with an alphabetic character. Segment replaces spaces in Event Names with an underscore, so that these events are accepted by GA4. For example, Segment renames an event named `Home Profile` to `Home_Profile`. In some cases, GA4 may reject an event outright, due to unsupported characters. For example, an event named `Home | Profile` will be silently rejected due to the pipe character.
7572

76-
#### Custom Dimensions and Metrics
77-
With Google Analytics 4, you must create custom dimensions and metrics within the Google Analytics 4 interface and link parameters to the corresponding dimension or metric. When you create the dimension or metric, you can either select a parameter from the list of already collected fields or enter the name of the parameter you plan to collect in the future. Custom dimensions can be either event-scoped or user-scoped, and custom metrics must be event-scoped.
78-
=======
79-
> info "Event naming limitations"
80-
> Google Analytics 4 requires that all event names contain only alpha-numeric characters and underscores, and must start with an alphabetic character. Segment replaces spaces in Event Names with an underscore, so that these events are accepted by GA4. For example, Segment renames an event named `Home Profile` to `Home_Profile`. In some cases, GA4 may reject an event outright, due to unsupported characters. For example, an event named `Home | Profile` will be silently rejected due to the pipe character.
81-
>
82-
> In all cases, event names in GA4 are case sensitive. The Custom Event action includes a **Lowercase Event Name** option, to ensure consistency of all events sent to Google. For more information, see Google's articles [Google Analytics 4 event name rules](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules){:target='_blank'} and [Event name limitations](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=firebase){:target="_blank"}.
73+
In all cases, event names in GA4 are case sensitive. The Custom Event action includes a **Lowercase Event Name** option, to ensure consistency of all events sent to Google. For more information, see Google's articles [Google Analytics 4 event name rules](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules){:target='_blank'} and [Event name limitations](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=firebase){:target="_blank"}.
8374

8475
#### Custom Dimensions and Metrics
85-
With Google Analytics 4, you must create custom dimensions and metrics within the Google Analytics 4 interface and link parameters to the corresponding dimension or metric. When you create the dimension or metric, you can either select a parameter from the list of already collected fields or enter the name of the parameter you plan to collect in the future. Custom dimensions can be either event-scoped or user-scoped, and custom metrics must be event-scoped.
86-
>>>>>>> master
76+
With Google Analytics 4, you must create custom dimensions and metrics within the Google Analytics 4 interface and link parameters to the corresponding dimension or metric. When you create the dimension or metric, you can either select a parameter from the list of already collected fields or enter the name of the parameter you plan to collect in the future. Custom dimensions can be either event-scoped or user-scoped, and custom metrics must be event-scoped.
8777

8878
To send parameters to Google Analytics 4, use the Event Parameters or User Properties object available on every action. Only pass flat key-value pairs in the Event Parameters and User Properties objects. Keep in mind that Google silently drops any events that include nested parameters.
8979

9080
To achieve parity with Universal Analytics, you should create the same custom dimensions that you defined in Universal Analytics. Additionally, in Google Analytics 4, you should recreate many of the values that you tracked as event dimensions in Universal Analytics, particularly event category and event label. For more information, see [Google Analytics 4 Custom dimensions and metrics](https://support.google.com/analytics/answer/10075209){:target='_blank'}.
91-
<<<<<<< HEAD
9281

9382
#### Tracking Active Users and Sessions
9483
The Google Analytics 4 reports only display active users who engage with your site for a non-zero amount of time. To ensure users are rendered in reports, Segment sets the `engagement_time_msec` parameter to 1 by default. If you track engagement time on your Segment events, you can use the **Engagement Time in Milliseconds** field mapping to set `engagement_time_msec` to a different value.
9584

96-
=======
97-
98-
#### Tracking Active Users and Sessions
99-
The Google Analytics 4 reports only display active users who engage with your site for a non-zero amount of time. To ensure users are rendered in reports, Segment sets the `engagement_time_msec` parameter to 1 by default. If you track engagement time on your Segment events, you can use the **Engagement Time in Milliseconds** field mapping to set `engagement_time_msec` to a different value.
100-
101-
>>>>>>> master
10285
If you choose to integrate with Google Analytics 4 client-side (using Gtag outside of Segment) _and_ also use Segment's Google Analytics 4 destination to send events through the API, you can track sessions server-side. When using Gtag, [Google generates a `session_id` and `session_number` when a session begins](https://support.google.com/analytics/answer/9191807?hl=en){:target='_blank'}. The `session_id` and `session_number` generated on the client can be passed as Event Parameters to stitch events sent through the API with the same session that was collected client-side.
10386

10487
> info "Session tracking limitations"
10588
> Session tracking server-side only works if you're also sending data to Google Analytics 4 client-side. This is because the `session_id` must match a value that was previously collected on the client. For events to stitch properly, they must arrive within a 48 hour window of when the client-side events arrived.
106-
<<<<<<< HEAD
107-
>
108-
=======
109-
>
110-
>>>>>>> master
89+
11190
> Google doesn't currently support passing other reserved fields, such as [predefined user dimensions](https://support.google.com/analytics/answer/9268042?hl=en&ref_topic=11151952){:target='_blank'} or device-specific information, to the Measurement Protocol API.
11291
11392
#### User Identification
@@ -119,11 +98,7 @@ There are certain scenarios where sending a User-ID can be helpful. For example,
11998
- **Use the Gtag-generated Client ID.** Gtag will set a Client ID automatically. The Client ID is stored in a cookie and can be fetched on the web client. To tie data between client-side and server-side, pass the Gtag-generated Client ID to Segment as a property and use that value as the Client ID in the Google Analytics 4 destination mappings.
12099
- **Use the Segment `userId` for User-ID.** The Segment `userId` should be your company’s canonical user identifier. By setting Google's User-ID to the same value as `userId` on client-side and server-side, you can benefit from cross-platform analytics.
121100
In addition, if you use [Firebase to send mobile data to Google Analytics 4](/docs/connections/destinations/catalog/actions-google-analytics-4/#mobile-data), using the same User-ID across web and mobile will ensure users are stitched together across devices.
122-
<<<<<<< HEAD
123101

124-
=======
125-
126-
>>>>>>> master
127102
#### Validating and Comparing Data
128103
Google recommends a period of dual-collection with both Universal Analytics and Google Analytics 4. This dual-collection approach lets you build a historical record in Google Analytics 4 while continuing to depend on Universal Analytics until you're ready to fully switch over.
129104

0 commit comments

Comments
 (0)