Attribution File Setup for Google Analytics 4
These instructions provide an overview on how to create a Google Analytics 4 (GA4) account, an Attribution File, and its delivery to Connexity. It is critical to provide daily delivery of attribution data files for ecommerce transactions from Connexity campaign clicks. These “source of truth” data provide signals needed to inform the ad placement and budget optimization that keeps your campaign delivering on performance goals and ultimately growing over time.
Links to Important Parts of this Article:
- Step 1 - Create a Google Analytics 4 Account
- Step 2 - Create a GA4 Property and Set Up Ecommerce Events
- Step 3 - Create Report and Set Up Delivery
- Step 4 - Test and Verify
1. Create a Google Analytics 4 Account
Create a Google Analytics 4 account by going to the Google Analytics website and click Start Measuring. Detailed instructions on creating a new GA4 account can be found from Google. If you already have a GA4 account, please skip to the next step.
2. Create Property and Set Up Ecommerce Events
Create a new property for Connexity in GA4 using these instructions here. After your property has been created, you will need to set up ecommerce events that Connexity uses to optimize your campaigns.
In Google Tag Manager
- Go to Tags and select New
- Click the Tag Configuration and Choose Google Analytics: GA4 Event
- In the Tag Configuration select your Google Analytics 4 Configuration tag.
- In the Event Parameters, add all the required Connexity events to be tracked:
-
Dimensions
- Date
- Transaction ID
- Search terms
- Source
- Session manual term
-
Metrics
- Purchase Revenue/Revenue/Product Revenue
-
Dimensions
Important notes:
- Ensure your Connexity property setup includes all of the required daily attribution metrics. Check here for the full list.
- Which Revenue metric that you select is based on your UTM parameter (If you are using utm_term, add the metric “Revenue”; If you are using utm_content, add the metric “Product Revenue”) This is very important as each metric calculates revenue differently and will skew revenue reporting.
- Follow these instructions below to complete setting up ecommerce events
GA4 Ecommerce Event Completed Setup Example
Once all required ecommerce events are set up and linked to the respective GA4 property, then your data should start flowing into GA4 and the attribution report can be generated.
3. Create Report and Set Up Delivery
We will use a custom script designed for Connexity by Google that will create and deliver a daily attribution report to Connexity for processing. The script is created in a Google sheet that will execute commands to create and deliver attribution from your GA4 property to Connexity.
Note: Unlike the previous version of UA, GA4 does not yet have a streamlined method of delivering data reports directly from the platform. We will update instructions when Google is able to provide a better solution, but at this time the custom script file is the most viable solution to deliver attribution reports to Connexity.
- First, access the custom Google script file template link that your Account Manager has shared with you via Google. If you have not received this file please contact your Account Manager.
- Next, allow permissions for Google to access your GA4 account and data. Navigate to the GA4 Scheduled Report Menu > Authorize Permissions.
- Follow the authorization prompts to give Google access to your GA4 Data. Please allow all permissions for this to work properly.
Note: It's important to understand that this script was built directly by a developer at Google for Connexity. It was designed to stringent Google standards and has been fully verified. By granting these permissions you'll give access to data that is already being utilized by Google in GA4. No other parties are gaining access to your data other than Google and potentially Connexity.
- Once all permissions are authorized you will need to update your Property ID field in the file. Find your GA4 Property ID by going to your GA4 property and clicking on the Admin tab (bottom left of page.)
- In the left navigation menu, click on Property Settings and look for your GA4 Property ID listed on the right side (Property ID: XXXXX)
- Copy this value and paste it into the Property ID section of the file.
- The final step is to schedule an automated report for daily delivery. In the document menu, click on GA4 Scheduled Report Menu > Create/Remove GA4 Scheduled Report and you're all set!
- For reference, the additional menu items will perform the following actions:
-
- Create/Remove GA4 Scheduled Report if you have already set up an automation, this will remove/cancel this automated delivery. Otherwise, this will initiate the delivery automation.
- Check status GA4 Scheduled Report will check whether the report schedule is configured.
- Run and send GA4 Report will send a report instantly.
-
Note: You may receive an error message via email if this was scheduled by a user that does not have admin level permissions. The user scheduling reports in the GA4 property needs admin level permissions for this report to be delivered properly.
Connexity has already pre-filled all the fields in this file for your account to properly track attribution, so please do not modify any other fields unless instructed by your Account Manager. Detailed information on fields are provided for your reference at the end of this documentation.
4. Test and Verify
Please contact your Connexity Account Manager after you create your property and set-up delivery of your attribution file. During this stage our team will verify the attribution file is valid and that the data is correctly routed into our system and into the merchant platform.
Your Account Manager may ask you to place a test order to verify the attribution tracking is working as expected from implementation in GA4.
Once you and your Account Manager have established that the attribution file data is correct and your delivery method is functioning properly, you are all set on the Connexity network. Please contact your Account Manager if you have any additional questions.
Note: If you receive the following error message from a scheduled email:
"GoogleJsonResponseException: API call to analyticsdata.properties.runReport failed with error: User does not have sufficient permissions for this property. To learn more about Property ID, see https://developers.google.com/analytics/devguides/reporting/data/v1/property-id."
This means the template was scheduled by someone who does not have admin level permissions. A user in your GA4 property with admin level permissions will need to authorize and schedule the delivery of the report again.
Completed Fields For Reference (Do not modify fields)
Field | Example/Option |
Email Recipients | This field should already be populated with the correct email, but you can add additional users to receive the report by adding their email, separated by a comma. |
Email Subject |
Update your merchant name and ID for the subject line. You can find your MID here after logging into your account. Example: MerchantName – 12345 – Connexity Attribution Report |
Email Body | Leave default message or update to your needs. |
Start/End Date | Set by default for the following day. If you need to change this contact your Account Manager. |
- Metrics and Dimensions will refine the required data sent to Connexity. By default, the required fields are already added to these sections; There is no need to modify these fields unless you are adding additional metrics and/or dimensions.
Required Field | In Connexity Report Template (Google API name) |
Purchase Revenue | purchaseRevenue |
Date |
date |
Source | source |
Transaction ID | transactionId |
Session Manual Term OR Session Manual Ad Content |
manualTerm OR |
- For Dimensions, verify you are using the correct term Manual Term or Manual Ad Content. This is dependent on how your Connexity click ID is being passed on URL string.
Note: The naming convention of the Metrics and Dimensions are specific to the Google API documentation. Please verify with the Connexity Technical Account Manager to ensure that the proper field is added to the template when additional metrics/dimensions are included.
- Dimension Filters, will filter the report for Connexity data. Update the Source or whichever dimension is being used to filter for Connexity traffic, to the respective value. In the example below, it’s filtering for utm_source=connexity,rd.bizrate.com as a default. If there are any questions about filtering, please feel free to reach out to Connexity. This concludes the report set-up.