@katebutler opened this Pull Request on June 24th 2019 Member

Have implemented this for the "no data tracked yet" page and page 7 of the installation process. Now trying to figure out an elegant solution for the tracking codes page in the admin panel - the JS is generated dynamically on the client-side here so would need to update the mailto body dynamically too, also seems like some of the other content from the email would be unneeded in this case.

Fixes #12630

@katebutler commented on June 25th 2019 Member

I've written a spec for the no data page (which provide coverage for the template) - but none for the tracking code generator yet. This seems to have pretty minimal coverage (just one spec in UIIntegration to check that the page loads) so maybe I should add some more while I'm here?

@katebutler commented on June 27th 2019 Member

Works in Thunderbird but some email clients (e.g. Outlook, Apple Mail) print the actual HTML tags in the message body rather than rendering it. [This answer](https://stackoverflow.com/questions/5620324/mailto-link-with-html-body/46699855#46699855) suggests a solution that works for Outlook but will still not work intuitively in Apple. The RFC says that the body is intended to be plaintext only, so I don't think it is actually possible to use a mailto link to generate an email that will render as HTML in all clients.
Instead I think we are going to need a much simpler email (just the actual JavaScript and maybe one link to the tracker code generator). The <script type="text/javascript"> will need to be removed off the JS block due to the inconsistency between clients - if they are escaped then Apple Mail prints the escaped version, but if they aren't then Thunderbird renders it like an actual <script> tag so that it doesn't appear in the message body.

@tsteur commented on June 28th 2019 Member

Would it help to put a "

" around it? We would then need to say something like "Without the 
" though... but at least we could have maybe the full tag in there?
@tsteur commented on July 16th 2019 Member

@katebutler is this still WIP or can it be reviewed?

@katebutler commented on July 22nd 2019 Member

Have rewritten the email templates in plain text.

@tsteur commented on August 8th 2019 Member

@katebutler not sure you had a look at this comment? https://github.com/matomo-org/matomo/pull/14569#discussion_r308049483 just tried it and it wasn't showing any more text than before

Powered by GitHub Issue Mirror