If you are running campaigns in Google Analytics, you have probably run into the issue that the URL is too long or not very user friendly.
Here is an example of a campaign URL:
There are URL shorteners like the one google has that will help you with that, but there is a simpler way to do this and as the same time keep all your campaign information in order: you can use the Campaign Code parameter and load the remaining campaign data afterwards in Google Analytics.
Your new campaign URL will look like:
Benefits of using campaign code instead of all the other parameters:
- Shorter URL
- Not need to use the URL shortener on Twitter or other social media
- All campaign information is stored on an Excel file for future needs
- Avoid misspelling by using Excel validation tools
- Keep your campaign categorization internally only
Let’s go through the steps:
Creata a Data Upload Task
First of all we will create the data upload task.
As usual, log in Google Analytics and click on Admin:
Select the Account and property and click on “Data Import”:
Click on “New Data Set”:
On the Data set type, select “Campaign Data”:
and click “Next step” at the bottom. On the Data set details dialogue:
- Give a name to the campaign data
- Select the views it should apply to
- Click Next step
On the Data set schema dialogue, select as follows by clicking on Select one dropdown box:
Click “Yes” to Overwrite data import and Save:
Download the CSV Template to upload your data or download it from us
[otw_shortcode_button href=”http://trantor.synology.me/curbal/wp-content/uploads/2015/08/Campaign-ID-details-template.csv” size=”large” icon_type=”general foundicon-down-arrow” icon_position=”left” shape=”radius” color_class=”otw-greenish” target=”_blank”]Download CSV Template[/otw_shortcode_button]
Now, click on the link that was created after you saved:
and at the bottom, you will find two new buttons:
- Get schema: will download a CSV template that you can use to import the data
- Get Custom Data Source ID: allows you to load the data through the Management API.
We will focus on the “Get schema” file as not everybody uses the API.
If you click on “Get Schema”, you will get a CSV file that you can use as template to load your data afterwards. It looks like this:
Load Campaign Data
To load your campaign data, you just add in the next rows separated by commas your campaign info, for example:
Click on Manage uploads:
and click on Upload file:
Choose file to import and click “upload”,
If your upload is unsuccessful, you will get a message from Google analytics:
Otherwise, you will see this:
How will your campaign URL be constructed now? You will use the campaign code only:
Reporting, where can I find the imported data?
As usual, the data will be available in the Adquision > All Traffic or Channel reports. Be patient as it takes some time for Google to process the data!