Share
Contents
GA4 Data Import is the function provided by Google that allows companies to merge data accessible in GA4 with data from other sources such as CRM, Paid Ad Platforms (Facebook Ads, Bing Ads, etc.), SFTP servers and many others.
What are the benefits of importing data into Google Analytics 4?
After you import data into Google Analytics 4, you can use it in GA4 to find additional insights about your business performance. You can use imported data to create segments or audiences as well.
The main benefits of importing data into GA4 are the following:
- You will have the data in one place. You can segment it, merge and build different reports in GA4 (GA4 Explore) using external and internal data. It allows you to have a complete view of your business.
- You can import offline events that happened in your physical stores with the information in GA4. It will give you the complete picture of the users’ journey.
- You can have the complete data on your Paid Ads, including impressions, clicks, and associated costs. For instance, you can upload Facebook (Meta) and Bing Ads data into Google Analytics 4. After having these metrics there, you can quickly analyse paid ads performance using GA4 only.
- You can improve your SEO (content strategy) by providing additional attributes in GA4, such as author, publish date, number of words, tags, etc.
And though this list includes critical benefits you can get importing external data into Google Analytics 4, it’s incomplete. You can get much more from having external data there.
Now that you understand the power of using the GA4 data import feature, let’s discuss what kind of data you can import in GA4 more carefully.
What kind of data can you upload into GA4?
There are 5 types of data you can import in GA4:
- Cost data. The data about your Facebook Ads, TikTok Ads, Bing Ads or other paid ads you run.
- Item data (or Product data). The data about your products, such as colour, variants, brands, etc.
- User Data by User ID. This is the data you can store in CRM or another storage. An example of the data is loyalty program status.
- User Data by Client ID. This is the data about your prospects. They are still not your clients, and you don’t have a user id to use the previous data import type. For instance, it can some data related to phone calls.
- Offline event data. This can include any event data from sources that don’t have an internet connection and can’t send data into GA4 in real-time. An example of this data is a purchase event in your physical shop.
To simplify the import process and help you upload data correctly, Google provides templates for each data type. You can download them using the links below:
- Cost data template
- Item data template
- User Data by User ID template
- User Data by Client ID template
- Offline event data template
There is another thing worth mentioning. Google Analytics 4 merges internal and imported data differently depending on the type of imported data.
How does GA4 join your data?
Understanding how GA4 joins internal and external data will help you to fix potential future errors in the reports you built some time ago. So, there are two types of joining data in GA4:
- Collection/Processing time
The main idea is that your imported data is merged with the GA4 data as if it was initially collected with the GA4 data. If you delete this data, no further joins will happen, but the joins that were done already will be in GA4. User data (type #3 and #4) and Offline data (type #5) are the types of data merged using Collection/Processing time. If you want to delete the data entirely, you must use the data deletion request tab in GA4.
- Reporting/Query time
Cost data and item data follow this joint way. GA4 joins imported data with the GA internal data to show you the merged singular view whenever you create a report. It means that if you delete your import data in GA4, you won’t be able to build new reports and use reports you made before.
Now that we know the types of data we can upload in GA4 and GA4 joint types, let’s discuss how the data should look to be imported into Google Analytics 4 successfully. It’s a critical step, and you need to do it. Otherwise, your data won’t be imported, or you will need to delete it afterwards using a data deletion request.
How to prepare your data right before importing it into Google Analytics 4
As mentioned, your data should have the correct format. If it does not have it, Google Analytics 4 will show an error or won’t upload data.
Depending on the data you want to import, the data format differs. I recommend that you use the official Google templates. It doesn’t matter whether it’s a CSV manual import or an SFTP import; you will need to have data in CSV anyway. Therefore, download the one you need using the links below.
- CSV template for ad cost data
- CSV template for item data
- CSV template for user data
- CSV template for offline events
After you have a template, checked the structure of it and formatted your data according to it, it’s time to upload it in Google Analytics 4.
How to import data into Google Analytics 4? What data import ways GA4 offers?
Google Analytics 4 started offering two data import methods on October 14, 2022.
- CSV file data import
- SFTP data import
Uploading data into Google Analytics 4 using a CSV file
The first one allows you to import data from a CSV file. It has apparent drawbacks because you must upload data regularly and manually. For Paid Ads data, you will need to upload it daily, weekly or monthly. However, to have a complete view of this GA4 feature, let’s look at the steps you should take to upload ads cost data using a CSV file, but you can use these steps for any other data as well:
Time needed: 30 minutes
- Navigate to GA4 -> Admin -> Data Import
- Click on “Create data source” button
- Provide the source details data:
1. Name the data import. For instance, “Ads Cost Data Import” or anything else.
2. Select the data type – “Cost data”.
3. Choose CSV as an import source
4. Click on “Upload CSV”. Select the file on your PC.
5. Click on button “Next” - Map analytics fields with import fields and click on button “Import”
- Your data has been imported successfully!
Uploading data into Google Analytics 4 using a SFTP server
The second method allows you to upload a file from an SFTP server, connect GA4 with your server, and periodically upload the data from that server, for instance, every week on Monday between 2 – 3 am. You need to keep that file on the SFTP server up-to-date. Of course, I recommend you set up the second method.
- Navigate to GA4 -> Admin -> Data Import
- Click on “Create data source” button
- Name the data import. For instance, “Facebook Ads Data”
- Select the data type. For instance, “Cost data”.
- Choose SFTP as an import source
- Provide SFTP settings (user name, server URL, server key) and schedule the function to run on a specific date. For instance, my SFTP server has the following URL: sftp://193.17.184.242:222//home/mwhcnkdzap/uploads/bing_ads_cost.csv
- Click on button “Next”
- Map analytics fields with import fields.
- Copy the public key and enable it in your SFTP server. Click “Import Now”.
- Your data has been imported successfully!
Why can I not import data in GA4 from the SFTP server? | Common Mistakes
The most challenging part of SFTP data import is verifying your key and formatting the URL right.
The first part relies on your understanding of how public (or private) keys work and how to enable the public key of Google Analytics 4 in your SFTP server. Depending on your SFTP server, the process can differ but usually looks similar.
For instance, I use CyberFolks hosting provider, and they include an SFTP server in their offering. In order to enable GA4 public key, I made the following steps:
- Activated SFTP server in my hosting account
- Generated private and public keys on my Macbook
- Added the public key of my MacBook on the SFTP server
- Connected to my SFTP server using Terminal and added GA4 public key to “~/.ssh” “authorized_keys” file and saved it
- Upload the file into the right directory on SFTP server
- Clicked on “Import” in Google Analytics 4
The second part is an SFTP-server URL. It generally has three parts to consider for uploading data-import files. For example:
sftp://193.17.184.242:222//home/mwhcnkdzap/uploads/bing_ads_cost.csv has the following parts:
- Domain: 193.17.184.242
- Port: 222
- Home director of the specific user: //home/mwhcnkdzap/
- File path: /uploads/bing_ads_cost.csv
There are many SFTP servers, and each of them can have a unique setup, but you can read the most common setup options in the official Google documentation. If you need assistance with it, you can contact me.
Final Word
To summarize, you can import five types of data into Google Analytics 4: cost data, item data, user data by user_id, user data by client_id and event data.
Google provides two ways of importing external data into Google Analytics 4. You can upload data manually using a CSV file or connect GA4 with your SFTP server and use a scheduling feature to upload data automatically.
Although I highly recommend using the SFTP method, you can stick to a CSV file import if you don’t have access to the developer. Along the way, you can follow my instructions on importing Bing Ads and Meta Ads (Facebook Ads) cost data in Google Analytics.
If you have any questions or need help setting up the SFTP data import, please don’t hesitate to comment below or contact me.
Frequently Asked Questions
GA4 provides an import data feature. You should follow the next steps to import data in GA4:
1. Navigate to GA4 -> Admin -> Data Import
2. Click on “Create data source” button
3. Name the data import. For instance, “ads_cost_data”
4. Select the data type. For instance, “Cost data”.
5. Choose a CSV as an import source
6. Click on “Upload CSV”. Select the file on your PC.
7. Click on button “Next”
8. Map analytics fields with import fields.
9. Click on button “Import.”
10. Your data has been imported successfully!
After you import data into Google Analytics 4, you can use it in GA4 to find additional insights about your business performance. You can also use imported data to create segments.
GA4 allows you to import 5 types of data:
1. Cost data
2. Item data
3. User data by user_Id
4. User data by client_id
5. Offline event data
You can import data from a CSV file or SFTP server.
You Might Also Like
Written By
Ihar Vakulski
With over 8 years of experience working with SaaS, iGaming, and eCommerce companies, Ihar shares expert insights on building and scaling businesses for sustainable growth and success.
KEEP LEARNING
Most companies that run paid ad campaigns always aspire to optimise them as much as possible to increase the number of conversions and decrease the…
If you use Google Ads to run campaigns and use Google Analytics 4 to analyse website user behaviour, it’s an excellent idea to link GA4…
Leave a Comment
Your email address will not be published. Required fields are marked *
Stay Updated About Every New GA4 Feature
Subscribe to this newsletter to learn more about new Google Analytics 4 features and adjustments.
No SPAM and only relevant content guaranteed!