Follow these steps to add ChannelMix Timestamp and ChannelMix Client ID to Page Views and Conversions, in support of ChannelMix Attribution reporting. Specific instructions are provided for implementation through Google Tag Manager (recommended), followed by generalized instructions for those who use other tracking systems. By completing these steps, you'll make these values accessible via the GA4 API.
- Send a unique ChannelMix Client ID as a User Property with all Page View events.
- Send a ChannelMix Timestamp as an Event Parameter with all Page View and ChannelMix Conversion events.
For GTM Users (Recommended)
- 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.
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 🎉
Click here if you 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.
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 all "page_view" and "channelmix_conversion" events, send a unique User ID as a User Property named "channelmix_client_id". Ensure that this event is sent from all pages viewed.
- In the GA4 Admin section: Defined Custom Dimensions "ChannelMix Timestamp" and "ChannelMix Client ID" as Event Parameter and User Property respectively.