Data import is a feature of Google Analytics. It can be used to import a number of types of data. The aim of this blog is to enable you to import non Google advertising costs into GA.
Remember you can only add to existing â€œhitsâ€ (visits and actions) with data import. There has to be a visit in GA for you to associate the cost/click/impression data to.
Before you get started
There are a few things you need in place before you can use cost data import:
- UTM Parameters in place
- A data set created in Analytics
- Data to import
What can I import with Cost data import?
There are a number of elements that can be imported. There are three core elements:
At least one of these must be imported. Other dimensions include Campaign, Ad Group, and Keyword. These allow for more granular data.
To use data import you will need to use UTM parameters for any non Google . Ensure you use UTM down to the level you wish to upload costs for (if you want to add cost by campaign you need to use utm_campaign).
Set up your data set
- Navigate to Data Import (sign into GA Account – Admin – Property column, Data Import)
- Select â€œ+ New Data Setâ€
- Data Set Type – â€œCost Dataâ€
- Name and select the views the data should be imported to
- Recommendation: Create a new view to include imported data
- Add the data you want
- Impressions, Clicks or Costs (at least one required)
- You then have the option to provide other dimensions/metrics
- For import behaviour choose summation*
- You will now be given the â€œSchemaâ€, this is the headings for your file, it will look something like this;Â ga:date,ga:medium,ga:source,ga:adClicks,ga:adCost,ga:impressions,ga:campaign
*Important note: Uploads can be deleted, so theyâ€™re generally low risk. However, if you select overwrite rather than summation, any data overwritten cannot be replaced.
Basic Process for Importing Data
If this is you first data import, you will need to set up a data set first. See below for instructions. You will also need to be using UTM parameters (details also below)
1.Â Download the data Â required for your data set.
- Go to the relevant platform and export the data, or use supermetrics.
2. Format the data
- Create a new file and copy the data over (if you use the same file make sure you delete all unnecessary data)
- If you are using a previous file as a template you may want to change the date format before copying across to avoid the date being changed.
- Add columns for medium and source
- Name the headings as per the data set schema
- Format the data (format – cell – custom – YYYYMMDD)
- Save your file as a .csv
(consider naming conventions, see point 4)
It should now look something like this;
3. Import the data
- Navigate to your data set (GA Account – Admin – Property column, Data Import)
- Select â€œManage uploadsâ€ for the data set we created
- Check: Are there previous uploads? If no go to e
- Check: Do you need to delete previous uploads?
- Choose the file created in step 2
- It will upload and show if completed or there were â€œerrorsâ€
- If complete the data should be in the account (allow a few hours for the data to settle in)
- If you have errors check the message
4. Ongoing uploads (start from step 1)
It is possible to delete uploads, however to reduce upload size naming conventions for files to incorporate dates included (without the original file uploaded there is no way to download or see what it contained).
Below are some possible processes for ongoing uploads:
Process 1 for ongoing uploads:
Delete and replace
- This process deletes previous uploads and replaces with a new upload.
- Create a template file for the data. Each time an upload is made this file is used. Data can be added to or replaced* with data from the media platform. Â
- Follow above process, but in step 3 delete the previous upload before importing a new one.
* Reasons to replace include some platforms â€œcleaningâ€ data, more relevant if data is downloaded with low latency (i.e. if you download data from yesterday it is more likely to be revised than data downloaded 30 days after). Click and cost revisions tend to be extremely low.
Process 2 for ongoing uploads:
Step by step
- This process uploads data files for different date ranges periodically
In this process naming convention is vital. The following file updated to start from when the last file ended, without overlap or gap.
- Step 0 – Check for previous upload. If none,
- Create your file, name it to contain the relevant dates and the platform, (e.g. nongooglcostfacebook20150101-20153101.csv would relate to Facebook from 1st Jan 2015 to 31st March 2015)
- Step 1 – Check for previous upload. Find last date of the upload from the file name
- Step 2 – Use the basic process for importing data
- Step 3 – Save the file in a public place to allow the raw file to be seen