Note
Orders are uploaded from the store from the server side of the site. Uploading is configured by the store developer using the API.
Uploaded orders may contain:
- external ID (externalId);
- internal ID (id);
- order number (number).
From the store in Google Analytics 4, data is uploaded from the customer side, directly from the computer of the store visitor.
This data consists of transactions containing order information.
The code that uploads transactions should only be executed when the user confirms the order.
Transactions contain a unique (within the store) identification number (transaction ID). It must match the external or internal ID, or the order number in the data uploaded to the system. This is required to link Google Analytics 4 transactions data to the data inside the system.
Actions required to integrate with Google Analytics 4
Open the module of integration with Google Analytics 4 in the marketplace of the system and activate it.
Copy the provided access key and it into your Google Analytics project.
To do this, add the user to the Google Analytics 4 account by going to Administrator > Account settings > Resource access control.
Paste the access key from the module settings into the "E-mail addresses" field. The user to be added must have Reader rights.
Specify to which data, that is uploaded from the store to the system, the transaction ID corresponds.
To add the settings for receiving data for the store of the system, click the "Add store" button.
In the window that opens you should fill in the following data:
- select Store of the System (mandatory field) from the drop-down list;
- specify the Google Analytics 4 Resource identifier in the integration module (mandatory field).
To get the resource identifier, skip to Google Analytics 4: "Administrator" > "Account settings" > "Resource settings" and copy the "Resource identifier".
Note
If the resource identifier is removed for a store in settings, then the data flow identifier is also cleared.
If you want to filter by flows, you need to specify the Flow identifier. To get it, go to Google Analytics 4 as follows: "Administrator" > "Account Settings" > "Data flows". Copy the flow identifier.
This completes the setup of integration with Google Analytics 4.
To check the integration functioning go to the order list. Display the "source" parameter in the order list and save it. The source should be displayed for the orders in the list.