Tracking email transactions

The Transactions page is a summary of the tiniest transaction details. This data will help you track the page with the slowest response time, the most dissatisfying Apdex score, or the highest throughput. All these measurements are key indicators to find the source of the optimization problem. Here’s an overview of the Transactions page:

The Transaction trace tab will give you hints on where your overloading comes from. It’s a very helpful feature to define which pages of your website have potential performance issues.

External services monitoring

Using external services is often tricky. Even if you lose control to a third-party application, New Relic will provide you feedback on the performance of these APIs. Like the HTTP transaction with your server, you can also track the time consumption, the average response time, or the throughput RPM (requests per minute) of an external service:

Configuring customized alerts

New Relic can alert you when your server is overloaded with custom notifications. You will be notified when your Apdex score is under the threshold you have configured. For example, if your Apdex score is under 0.7 (which means less than 70% of the requests are “satisfied”), you will get an alert by e-mail or on your mobile phone explaining the current issue.

Service Level Agreement reports

Service Level Agreement (SLA) reports will allow you monitor day-by-day metrics on your websites. Your SLA reports are available via Reports | SLA. New Relic is useful for tracking user satisfaction through the load time and the Apdex score. These measures are relevant because they give you insights into what the user experience was at any given moment. The SLA reports provide such data to you on a daily basis. Tracking the variations in your loading time or Apdex score is essential in order to monitor your optimization process.

Web scenarios

A web scenario is a series of visited pages (steps) executed one after another. It closely resembles the behavior of a real visitor to your website. When a step has an error, the web scenario stops and does not perform the following steps. Red bars  will appear on the graphs. Web scenarios are the main feature of Quanta computing and are really helpful to ensure that, in addition to the eventual errors a page can generate, the page itself renders the expected content.

Testing our code by sending the e-mail

Go to the page of an event and fill in the form we prepared. When you submit it, Magento will send the e-mail immediately.

We can now create and control the availability of our events with regards to Magento’s stores and translate the contents of our pages and e-mails. In the next tutorial, we will see how to optimize MTE and our code for speed, and how to measure conversion rates.

Translation of e-mail templates: creating and translating the e-mails

We will add a new form in the Details page to share the event to a friend. The first step is to declare your e-mail template.

  1. To declare your e-mail template, create a new [extension_path]/etc/ email_templates.xml file and add the following code:

<?xml version=”1.0″?> <configxmlns:xsi=”” xsi: noNamespaceSchemaLocation=”urn:magento:module:Magento_Email:etc/ email_templates.xsd”> <template id=”ticketblaster_email_email_template” label=”Share Form” file=”share_form.html” type=”text” module=”Blackbird_ TicketBlaster” area=”adminhtml”/> </config>

  1. Next, create the corresponding template by creating the [extension_path]/ view/adminhtml/email/share_form.html file and add the following code:

    <!–@subject Share Form@–> <!–@vars { “”:”Sharer Email”, “varevent.title”:”Event Title”, “varevent.venue”:”Event Venue” } @–><p>{{trans “Your friend %email is sharing an event with you:” email=$}}</p> {{trans “Title: %title” title=$event.title}}<br/> {{trans “Venue: %venue” venue=$event.venue}}<br/><p>{{trans “View the detailed page: %url” url=$event.url}}</p>


The e-mail template is ready; we will also add the ability to change it in the system configuration and allow users to determine the sender’s e-mail and name:

  1. Create the [extension_path]/etc/adminhtml/system.xml file and add the following code:

<?xml version=”1.0″?> <configxmlns:xsi=”” xsi: noNamespaceSchemaLocation=”urn:magento:module:Magento_Config:etc/ system_file.xsd”>
<system> <section id=”ticketblaster” translate=”label” type=”text” sortOrder=”100″ showInDefault=”1″ showInWebsite=”1″ showInStore=”1″> <label>Ticket Blaster</label> <tab>general</tab> <resource>Blackbird_TicketBlaster::event</resource> <group id=”email” translate=”label” type=”text” sortOrder=”50″ showInDefault=”1″ showInWebsite=”1″ showInStore=”1″> <label>Email Options</label> <field id=”recipient_email” translate=”label” type=”text” sortOrder=”10″ showInDefault=”1″ showInWebsite=”1″ showInStore=”1″> <label>Send Emails To</label> <validate>validate-email</validate> </field> <field id=”sender_email_identity” translate=”label” type=”select” sortOrder=”20″ showInDefault=”1″ showInWebsite=”1″ showInStore=”1″> <label>Email Sender</label> <source_model>Magento\Config\Model\Config\Source\Email\Identity</ source_model> </field> <field id=”email_template” translate=”label comment” type=”select” sortOrder=”30″ showInDefault=”1″ showInWebsite=”1″ showInStore=”1″> <label>Email Template</label> <comment>Email template chosen based on theme fallback when “Default” option is selected.</comment> <source_model>Magento\Config\Model\Config\Source\Email\Template</ source_model> </field> </group> </section> </system> </config>

  1. Create the [extension_path]/etc/config.xml file and add the following code:

<?xml version=”1.0″?> <configxmlns:xsi=”” xsi: noNamespaceSchemaLocation=”urn:magento:module:Magento_Store:etc/ config.xsd”> <default> <ticketblaster> <email>