Unfortunately in default Google Analytics setup, traffic source from social media are fragmented, i.e. one source is spitted into several rows. This makes it hard to analyze the sources efficiency.

Fortunately it is easy to fix this with the following Google Analytics filters. These filters merge all the rows of one social network. Additionally, you can change the Medium from referral to social to make the Medium more meaningful.

Merge Facebook Referrals

  • Filter type: Search and Replace
  • Filter field: Campaign Source
  • Search String: (^.+\.|^)facebook\.com$
  • Replace String:  facebook.com

Merge Instagram Referrals

  • Filter type: Search and Replace
  • Filter field: Campaign Source
  • Search String: (^.+\.|^)instagram\.com$
  • Replace String:  instagram.com

Merge Twitter Referrals

  • Filter type: Search and Replace
  • Filter field: Campaign Source
  • Search String: (^.+\.|^)twitter\.com$|^t.co$
  • Replace String:  twitter.com

Merge Pinterest Referrals

  • Filter type: Search and Replace
  • Filter field: Campaign Source
  • Search String: (^.+\.|^)pinterest\.com$
  • Replace String:  pinterest.com

Rewrite Medium to Social for Social Referrals

  • Filter type: Advanced
  • Field A -> Extract A
    • Campaign Source: youtube|stumbleupon|netvibes|groups\.google|weebly\.com|groups\.yahoo|linkedin\.com| lnkd\.in|facebook\.com|twitter\.com|instagram\.com|pinterest\.com
  • Field B -> Extract B
    • Campaign Medium: referral
  • Output To -> Constructor
    • Campaign Medium: social
  • Checked:
    • Field A Required
    • Field B Required
    • Override Output Field

 

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close