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)

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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