2

I have noticed that in our CiviMail ''Mail clickthroughs' reports, styling links are sometimes being reported as 'clicks' when they are loaded which is skewing our click rate reporting.

E.g. The report shows one of the clickthrough URLs as:

https://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic

Which is presumably being caused by the following in the email template being automatically loaded:

<style type="text/css"> @import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic); </style>

Have I just implemented the code wrong in the email, or is this a general problem with using references to external styles/fonts in CiviMail?

Apologies if I'm just being really thick here...

1 Answer 1

4

Interesting. I can understand that CiviCRM would see it is an click-through link.

Although external CSS and fonts is very normal for web sites, it is not for emails.

Both Mailchimp and Campaign Monitor advise you to only use inline CSS.

The reason for this is that it is hardly predictable what different mail readers do with the external css. To have a reliable idea how your email will look for your Mailing subscribers it is better to avoid external css.

I would advise you to follow the email rules as shown on the Mailchimp and Campaign Monitor pages for CiviCRM too.

http://templates.mailchimp.com/getting-started/html-email-basics/

https://www.campaignmonitor.com/dev-resources/guides/coding/

Addition:

Campaign Monitor and Mailchimp do a last minute check and make all css'es inline just before sending. They both have published their inline css tool for us to use. The MailChimp version is the best in my experience:

http://templates.mailchimp.com/resources/inline-css

2
  • I did wonder about the usage in email, but wierdly enough the template was adapted from a Campaign Monitor one (and so I assumed they'd know what they were doing!).
    – Ollie M
    Commented Jan 28, 2016 at 18:33
  • 1
    The reason is that Campaign Monitor and Mailchimp do a last minute check and make all css'es inline just before sending. The MailChimp version is the best imo, we can use it too :) templates.mailchimp.com/resources/inline-css
    – Catorghans
    Commented Jul 21, 2016 at 20:03

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.