ChannelMix Attribution GA4 Requirements
Follow these steps to add ChannelMix Timestamp and ChannelMix Client ID to Page Views and Conversions, in support of ChannelMix Attribution reporting. Generalized instructions are provided for clients who use tag management systems other than Google Tag Manager (GTM), followed by more specific instructions for GTM users. By completing these steps, you'll make these values accessible via the GA4 API.
Requirements:
- Send a unique User ID as a User Property on the web landing page Page View events. You may send with all pages but the minimum requirement is to send with the first page_view of any session.
- Send a timestamp as an Event Parameter with all Page View and ChannelMix Conversion events.
For Users Who Do Not Use GTM
If you're not using Google Tag Manager (GTM) but you are sending data to GA4, you can follow these instruction.
function() {
return ''+(+new Date());
}
Use this function above to dynamically generate the ChannelMix Timestamp value each time this value is sent to GA4.
- For all "page_view" and "channelmix_conversion" events sent to GA4, be sure to include the ChannelMix Timestamp as an Event Parameter named "channelmix_timestamp". Use the function provided to send timestamp in the required Unix Epoch format. This value represents the exact time when each event has occurred.
- For the first "page_view" event of all sessions, be sure to send a unique User ID as a User Property named "channelmix_client_id". Ensure that this event is sent from all landing pages.
- In the GA4 Admin section: Defined Custom Dimensions "ChannelMix Timestamp" and "ChannelMix Client ID" as Event Parameter and User Property respectively. See Screenshot 3 below.
For GTM Users
- Import the provided GTM dependencies or generate a new Custom JavaScript Variable named "ChannelMix Timestamp" using the provided function. GTM Export - ChannelMix Timestamp & Client ID.json
- Add the ChannelMix Timestamp Variable to all Page View and Conversion Event Tags as an Event Parameter named "channelmix_timestamp".
- Add the ChannelMix Client ID Variable to the Page View and Conversion Event Tags as a User Property named "channelmix_client_id".
- Define theses Custom Dimension in the GA4 Admin Section.
- Validate with GA4 DebugView.
Screenshots
1. Import
2. Add the Event Parameter to Tags
Demonstrates the required variable values sent with an Event Tag called "GA4 Page View" but these should be included on whatever Tag sends the "page_view" event to GA4. Sometimes this is the GA4 Configuration Tag.
- channelmix_timestamp is sent as an Event Parameter
- channelmix_client_id is sent as a User Property
3. Define Custom Dimensions
- Custom Dimension "ChannelMix Timestamp" is defined as an Event-scoped dimension
- Custom Dimension "ChannelMix Client ID" is defined as a User-scoped dimension
4. Validation via Tag Assistant and GA4 DebugView
Validation of the ChannelMix Timestamp - received by GA4 as an Event Parameter on the page_view event.
Validation of the ChannelMix Client ID - received by GA4 as an Event Parameter on the page_view event.
5. Submit all changes to the Production Container to begin collecting the required values
That concludes the implementation.