Answers.Body: <p>I didn't know you could use webfonts remotely in emails (or, it hadn't occurred to me). Here are some ways you could approach this - pick one! (Or more.)</p>
  
  <h2>Modify the recorded data</h2>
  
  <p>The "visit" records are stored in DB table <code>civicrm_mailing_event_trackable_url_open</code> and the URLs themselves are in <code>civicrm_mailing_trackable_url</code>. By removing matching entries from <code>civicrm_mailing_event_trackable_url_open</code> you'll zero those numbers off the top of your report.</p>
  
  <p>Don't remove the entries in <code>civicrm_mailing_trackable_url</code> or the redirects to webfonts will stop working, breaking the font in future views.</p>
  
  <h2>Modify the recorded data (automated)</h2>
  
  <p>Once you have the query for the above, you could add a "cleanup" job to remove clicks where the URL matches (say) <code>/.*(css|woff)$/</code>. This would mean your reports stay clean - but cleanup jobs are a "code smell" IMO, so it's not a great solution.</p>
  
  <h2>Change the email - embed the font</h2>
  
  <p>You could potentially <a href="https://www.campaignmonitor.com/css/text-fonts/woff-base64-encoded/" rel="nofollow noreferrer">base64 encode the webfont into the email</a> (this should increase the number of people seeing it in the correct font). That would remove the remote request entirely, but it won't work for an email that has flown!</p>
  
  <h2>Change the email - don't use a font</h2>
  
  <p>It's an option ... obviously you went to some effort to put a font in, but I'll include this for completeness :)</p>
  
  <h2>Exclude <code>.(woff|css)</code> URLs from your reports</h2>
  
  <p>You could add an extension which excludes these types of URLs from display in the reports. This feels like a bad approach (you still end up tracking those URLs, slowing down the email, and filling your DB with data you don't need - but then hide the data from your report). But it's possible and might be less work than getting a fix into core, so again ... for completeness.</p>
  
  <h2>Modify CiviCRM - only track clickable URLs</h2>
  
  <p>It seems like CiviCRM is tracking any URL pattern, which suggests civicrm looked for something like <code>/['"]https?://(.*)['"]/</code> - but could perhaps only be looking for <em>links</em>. You could gather some data on this to file a feature request.</p>
  
  <ul>
  <li>Does CiviCRM add link tracking to all URLs in emails, or just some?</li>
  <li>Does CiviCRM add link tracking to <code>&lt;link href="style.css" rel="http://example.org/style.css"&gt;</code> but not <code>&lt;style type="text/css"&gt;@import http://example.org/style.css&lt;/style&gt;</code>? (Maybe it's the href= that confuses Civi?)</li>
  <li>... ask lots of questions, propose an improvement, consider other use cases, help make it happen!</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-05-01T20:57:40.607Z
Answers.LastActivityDate: 2018-05-01T20:57:40.607Z
Answers.UserDisplayName: Chris Burgess
Body: <p>I send a newsletter via CiviMail and in it there is a style link to load a Google font.
  This link gets many hits in the Mailing report, but has no relevance for me.
  Is there a way to exclude this specific link from the Mailing statistics report?</p>
  
Tags: <civimail>
Title: How to exclude a specific link from a Mailing's statistics
ThreadText: # How to exclude a specific link from a Mailing's statistics
  
  (Asked by: username_0 on 2018-05-01)
  
  I send a newsletter via CiviMail and in it there is a style link to load a Google font.
  This link gets many hits in the Mailing report, but has no relevance for me.
  Is there a way to exclude this specific link from the Mailing statistics report?
  
  **Tags:** civimail
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-05-01. Score: 2 | Accepted answer
  
  I didn't know you could use webfonts remotely in emails (or, it hadn't occurred to me). Here are some ways you could approach this - pick one! (Or more.)
  
  ## Modify the recorded data
  
  The "visit" records are stored in DB table `civicrm_mailing_event_trackable_url_open` and the URLs themselves are in `civicrm_mailing_trackable_url`. By removing matching entries from `civicrm_mailing_event_trackable_url_open` you'll zero those numbers off the top of your report.
  
  Don't remove the entries in `civicrm_mailing_trackable_url` or the redirects to webfonts will stop working, breaking the font in future views.
  
  ## Modify the recorded data (automated)
  
  Once you have the query for the above, you could add a "cleanup" job to remove clicks where the URL matches (say) `/.*(css|woff)$/`. This would mean your reports stay clean - but cleanup jobs are a "code smell" IMO, so it's not a great solution.
  
  ## Change the email - embed the font
  
  You could potentially [base64 encode the webfont into the email](https://www.campaignmonitor.com/css/text-fonts/woff-base64-encoded/) (this should increase the number of people seeing it in the correct font). That would remove the remote request entirely, but it won't work for an email that has flown!
  
  ## Change the email - don't use a font
  
  It's an option ... obviously you went to some effort to put a font in, but I'll include this for completeness :)
  
  ## Exclude `.(woff|css)` URLs from your reports
  
  You could add an extension which excludes these types of URLs from display in the reports. This feels like a bad approach (you still end up tracking those URLs, slowing down the email, and filling your DB with data you don't need - but then hide the data from your report). But it's possible and might be less work than getting a fix into core, so again ... for completeness.
  
  ## Modify CiviCRM - only track clickable URLs
  
  It seems like CiviCRM is tracking any URL pattern, which suggests civicrm looked for something like `/['"]https?://(.*)['"]/` - but could perhaps only be looking for *links*. You could gather some data on this to file a feature request.
  
  * Does CiviCRM add link tracking to all URLs in emails, or just some?
  * Does CiviCRM add link tracking to  but not ? (Maybe it's the href= that confuses Civi?)
  * ... ask lots of questions, propose an improvement, consider other use cases, help make it happen!
  
  
  ---
  
  