Answers.Body: <p>It's possible to add tokens to a url - I was concerned that the token wouldn't get replaced before CiviCRM sets up the redirect url for tracking links. I've tested this and the token is replaced first, so it's possible to use tokens in a correctly formatted GA campaign url (using <a href="https://support.google.com/analytics/answer/1033867?hl=en" rel="nofollow">https://support.google.com/analytics/answer/1033867?hl=en</a> ) that's still tracked by CiviCRM.</p>
  
  <p>I haven't done this with a 'real' mailout, just test runs - I've various things to sort out on the Google Analytics end, and will update this answer if anything relevant arises.</p>
  
  <p>Obviously there are privacy issues about sending contact info to Google - I'm probably just going to use the CiviCRM ID, but if anyone has any recommendations about which tokens would add value to GA data, do let me know.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-07T17:35:48.260Z
Answers.LastActivityDate: 2016-01-07T17:35:48.260Z
Answers.UserDisplayName: liblogger
Body: <p>I'm in the process of cleaning up our analytics tracking, and I've realised that one of the gaps we have is between the tracked links in our CiviMail mailings and Google Analytics.</p>
  
  <p>The main thing we need to implement is to (remember to) use GA campaigns, but I also wanted to check whether there's anything I'm missing on the CiviCRM side.</p>
  
  <p>One issue is that we have CiviCRM installed on a subdomain without any GA tracking - however, I'm not clear on why the CiviMail tracked links aren't registered by Google Analytics as referrals from the subdomain.</p>
  
  <p>(It may be that there isn't anything I can about this from the CiviCRM and I just need to deal with it from the GA side - I'm happy to close the question if that's the case) </p>
  
Tags: <civimail><links><tracked-links>
Title: Integrating CiviMail tracked links with Google Analytics
ThreadText: # Integrating CiviMail tracked links with Google Analytics
  
  (Asked by: username_0 on 2015-12-10)
  
  I'm in the process of cleaning up our analytics tracking, and I've realised that one of the gaps we have is between the tracked links in our CiviMail mailings and Google Analytics.
  
  The main thing we need to implement is to (remember to) use GA campaigns, but I also wanted to check whether there's anything I'm missing on the CiviCRM side.
  
  One issue is that we have CiviCRM installed on a subdomain without any GA tracking - however, I'm not clear on why the CiviMail tracked links aren't registered by Google Analytics as referrals from the subdomain.
  
  (It may be that there isn't anything I can about this from the CiviCRM and I just need to deal with it from the GA side - I'm happy to close the question if that's the case)
  
  **Tags:** civimail, links, tracked-links
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-01-07. Score: 2
  
  It's possible to add tokens to a url - I was concerned that the token wouldn't get replaced before CiviCRM sets up the redirect url for tracking links. I've tested this and the token is replaced first, so it's possible to use tokens in a correctly formatted GA campaign url (using <https://support.google.com/analytics/answer/1033867?hl=en> ) that's still tracked by CiviCRM.
  
  I haven't done this with a 'real' mailout, just test runs - I've various things to sort out on the Google Analytics end, and will update this answer if anything relevant arises.
  
  Obviously there are privacy issues about sending contact info to Google - I'm probably just going to use the CiviCRM ID, but if anyone has any recommendations about which tokens would add value to GA data, do let me know.
  
  
  ---
  
  