Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7732735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:48:18+00:00 2026-06-01T06:48:18+00:00

According to every source I’ve found, in order to manually tag links for campaign

  • 0

According to every source I’ve found, in order to manually tag links for campaign tracking in Google Analytics 3 fields are required – utm_campaign, utm_source, and utm_medium. However, I get mixed results when I don’t use the latter two.

If I set utm_campaign and utm_source, the campaign is tracked in GA with a medium value of (not set). This seems to work dependably.

If I set utm_campaign in the href of an anchor tag on another site and leave out utm_source, the campaign source shows up as the referring domain when using the GA debugging script but no campaign name is listed nor does not seem to track properly when I look at the reports in Google Analytics. For example, if on http://www.referringsite.com i have an anchor that looks like

<a href="http://www.mysite.com?utm_campaign=test">click me</a>
The debug tool will show Campaign Source: referringsite and the parameter Campaign Name is not listed.

What is going on here? When do I need to use these parameters and when can I leave them out? My ultimate goal is to allow the referrer to be used as the campaign source when utm_source is not explicitly set, and to leave utm_medium out altogether (which it appears I can do without issue). Can someone explain concretely what has to be used when and where, as well as how to achieve the desired effect of using httpReferrer as the implicit campaign source?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:48:19+00:00Added an answer on June 1, 2026 at 6:48 am

    utm_source is typically required if Google Analytics is to recognize any other utm parameters.

    To set __utmz cookie (the one that contains source and campaign informations), analytics javascript first checks if a utm_source parameter exist. If not, the script passes through “standard” source setting and doesn’t check other parameters like utm_campaign.

    But you can achieve the desired effect with some javascript.

    In your page, detect there is a utm_campaign parameter without utm_source.
    You can use something like :

    function isParameterInUrl(param){
        var url = document.location.href;
        var reg = new RegExp('(\\?|&|^)'+param+'=(.*?)(&|$)');
        matches = url.match(reg);
        if (matches[2] != undefined) {
            return true;
        } else {
            return false;
        }
    }
    

    Then set utm_source with :

    var re_hostname = new RegExp('^(?:f|ht)tp(?:s)?\://([^/]+)', 'im');
    var referrer = document.refferer;
    _gaq.push(['_setCampSourceKey', referrer.match(re)[1].toString();]);
    

    Be sure to insert your code before the _tackPageView call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to re-order the result of Tally[Characters[2723198931]] according to its every element's first
According to the computer language benchmark game, the LuaJIT implementation seems to beat every
According to, http://www.freshvanilla.org:8080/display/www/Java+Interview+Questions Under Which class is the superclass of every class? null seems
According to what I have found so far, I can use the following code:
I have a table which get new data inserted every minute or so. According
According to the javadoc: Replaces every subsequence of the input sequence that matches the
according to this article: http://net.tutsplus.com/tutorials/other/top-20-mysql-best-practices/ using ORDER BY RAND() is a bad idea because:
According to the iPhone Human Interface Guidelines every app needs a launch image. My
According to this discussion , the iphone agreement says that it doesn't allow loading
According to the manual , git dcommit will create a revision in SVN for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.