• Take UTM Parameters to the next Level with “utm_id”

    August 10, 2020

    Note: This article discusses an advanced UTM parameter tactic that involves importing custom data into Google Analytics. If you are not familiar with UTM parameters consider reading UTM Parameters: Demystify Your Marketing In Minutes first.

    UTM parameters are a quick, easy, and free way to collect additional data about your marketing endeavors in order to get a better understanding of what is and isn’t working. However, for all of the wonders they can work, UTMs aren’t perfect. One of their big disadvantages is their length, which can actually be problematic for two reasons:

    1. UTM parameters can make a URL really long, which can be unsightly and cumbersome, especially on social media platforms.
    2. The length makes errors more likely to occur.

    Luckily, there’s an UTM parameter tactic that can take care of both of those problems: utm_id.


    With utm_id you can replace some or all of the other UTM tags. Using utm_id could be the difference between








    Here’s how to implement utm_id:

    Phase 1: Planning

    Think about the utm parameters you currently use or would like to use. What similarities are there? For instance, let's say for your monthly newsletter, you always use a source of “constant-contact,” a medium of “email,” and a campaign of “newsletter.” You could use utm_id to replace all of those parameters because they're the same every time.


    Tip: If you’ve been keeping a record of your UTMs start there.


    Make a list of UTM parameters that stay constant during your marketing endeavors. Keep in mind that if one part of the UTM changes (ex. utm_campaign is different but the source and medium are always the same) you can still use utm_id to replace the parameters that stay constant and then tack on the changing variable.


    So for example, if your source was "constant-contact” and your medium was “email,” but the campaign changed each time, you could add utm_id=email to your url AND utm_campaign=insert-campaign.


    It might look like this: https://yoursite.com/?utm_id=email&utm_campaign=spring-promo.


    While just using utm_id would be ideal, you've still shortened the URL and reduced the risk of errors by cutting out the source and medium.


    Once you have a list of UTM parameters that you think you can replace with utm_id, figure out what id you'll use.


    Tip: Follow the best practices outlined in UTM Parameters: Demystify Your Marketing In Minutes when creating your ids.

    Phase 2: Setting Up the Data Import

    Now that you know what IDs you want to use, it’s time to prepare Google Analytics to accept them.


    WARNING: Whenever you manipulate Google Analytics, whether uploading custom data, creating filters, etc., there’s the potential for things to go wrong. If you pollute your Google Analytics data you will not be able to retroactively clean it up. Therefore, if you do not have a raw Google Analytics view that you never edit as a data backup, you should create a new view before trying this. When you copy a view in Google Analytics only the settings are brought over, not the data, so at first the view will essentially be blank but data will start populating. You can test your data import on this view before deploying it on your “main” view.

    1. Login to Google Analytics.
    2. In the “Admin” area, under the “Property” column, click “Data Import.”
    3. Click “Create.”
    4. Choose “Campaign Data,” and click “Continue.”
    5. Give this data import a name such as “UTM Ids.”
    6. Select a view to use.
    7. Click “Continue.”
    8. In the “Key” table you should see “Campaign Code.” If not, go back and make sure you selected “Campaign Data” as specified in step 4.
    9. In the “Imported Data” table, click the “Select Key” drop down and choose what you’d like to import.
    10. You will most likely want to select “Source,” “Medium,” and “Campaign;” however, you can also select “Ad Content” and/or “Keyword” if your utm_content and utm_term tags always stay the same as well.
    11. Under the “Overwrite hit data” section, select “Yes,” and click “Save.”



    Phase 3: Format Data for Import

    Note: I initially attempted to complete steps 7 through 10 of Phase 3 with "Numbers" on my Mac. However, while Google Analytics said the import was successful all of my utm_id traffic showed up as “direct” traffic. I’m not sure why this happened. However, I was successful using both Google Sheets and TextEdit.

    1. Login to Google Analytics. 
    2. In the “Admin” area, under the “Property” column, click “Data Import.” You should now see the data set you created during phase 2. 
    3. Click “Manage Uploads.” 
    4. Click “Get Schema.” 
    5. Click “Download Schema Template.” 
    6. Click “Done.” 
    7. Open the CSV file in your preferred spreadsheet software or in a text edit document. (I recommend using Google Sheets!)
    8. Column A should be “ga:campaignCode;” place the IDs you want to use in that column. 
    9. Fill in the other columns. 
    10. Export your file as a CSV.

    Phase 4: Import Data into Google Analytics

    1. Login to Google Analytics. 
    2. In the “Admin” area, under the “Property” column, click “Data Import.” 
    3. Click “Manage Uploads.” 
    4. Click “Upload File.” 
    5. Upload the CSV file you created in Phase 3. 
    6. If Google Analytics accepts the file, after a moment or two, you’ll see a green checkmark with “Completed” in the “Status” column.

    You’re now ready to deploy utm_id parameters. However, it may be wise to do a soft rollout and complete some testing before you go UTM crazy….

    Phase 5: Check Your Work

    It can take up to 24 hours for Google Analytics to take your utm_id data and connect it with traffic to the website. This means if you try to check your work immediately using Realtime analytics, you’ll likely see the traffic coming in as “Direct.” Don’t panic! Wait a few hours and check “Campaigns” under “Acquisitions” to see if UTM data is coming in accurately. If you still aren’t seeing campaign data, wait up to 24 hours. If after that time you still aren’t seeing campaign data something has gone awry.


    You’ll want to check your data import for issues as well as the URL you used. As I mentioned above, I could not get this to work using a CSV exported from Numbers on my Mac. I have not tested Excel but there could be a similar issue there. Try Google Sheets if you haven’t already.

    You're Not Limited to "utm_id"

    I already mentioned this briefly above, but you do not have to use just utm_id on your URLs. If your campaign changes or you want to use a content parameter (utm_content), you can append that to the utm_id parameter.


    Your end URL might look like this: https://yoursite.com/?utm_id=email&utm_content=spring-promo


    Being able to append an additional parameter to your utm_id assumes that when you set up your schema file you did not specify a campaign (or whatever parameter you're trying to add). If you did specify that parameter and now you want to use a different one, you'll need to set up a new ID.


    While adding additional parameters does start to make the URL long and unwieldy again, doing so is an option.


    Implementing utm_id requires more work up front than just using the standard utm parameters; however, it may save you time down the road, make URLs look better, and prevent costly errors.