Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two different affiliate networks sending me traffic, all tracked using UTM codes;

network A

  • medium=affiliates
  • source=affiliatenetworkA

network B

  • medium=affiliates
  • source=affiliatenetworkB

If I want to also dynamically track the individual URLs of the sites within each network, how can I do that (without having to give each site a separate UTM code)?

share|improve this question

Instead of adding a new line of code, wouldn't it be easier to look at Referrar URL report filtered to networkA and networkB Domains?

share|improve this answer

You could use JavaScript to set the one of the UTM parameters to be the referrer. For example to set the keyword parameter with the referrer you would use:

ga('set', 'campaignKeyword', document.referrer);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.