Surveys in the AMP version of the email
Surveys are one of the most common and useful tools in marketing. They allow you to interact directly with your audience, get feedback and better understand your customers' needs. For companies, it is an opportunity not only to improve products and services, but also to build trust with consumers by showing them that their opinions matter.
AMP surveys in emails take this process to the next level. Unlike traditional surveys that require going to external platforms, AMP emails allow customers to answer questions right in the body of the email. This saves users time, makes the process as convenient as possible, and increases the likelihood of participation.
The enKod functionality allows you to send AMP emails, but you'll need a third-party tool to build them.
Below we will take a closer look at the process of creating an AMP email and sending it via enKod.
Step 1: Build an email in a third-party service or plugin
We recommend a block editor PixCraft, Working with it does not require any code knowledge, it is intuitive and simple. Let's explore working with AMP emails on its example.
To build an email in PixCraft, you need to go to the Email block editor in the “Emails” section and click on the “New Email” button:
In the block editor that opens, in the AMP section, select the component you want (in our case it's Form) and configure the texts and poll options you want. You can read more about working with PixCraft surveys at their documentation.
Step 2: Get an AMP version of the email
Right after creating the email, you will be presented with the details and statistics page. You need to go to the “Export” section and select the “Download amp” option.
Step 3. Check the correct syntax of the AMP version
You need to open the file downloaded at the 2nd step amp.html
file using Notepad or any code editor (for example: Brackets, Visual Studio Code). Highlight all the code, copy it and paste it into the Gmail validator.
The correctness of the AMP version will be automatically checked. If successful, you will see a green PASS:
If your version has errors, you will see a red FAIL, and the erroneous lines will be highlighted inside the validator text area.
Sometimes there is an error of banning custom JavaScript. To eliminate the error, it is enough to delete the following a line from the inserted code:
<script type="text/javascript" src="https://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=5VbQ64Ce-opeUzUVOdrDvYjIeHiLPXR6CGMKqKakEkDUWyrUTNwjS7eEvI4u7bwNz_r0NgXyXYJFKmHv_80rjEEPi_awz_xgsKJx4e7WUbg" charset="UTF-8"></script>
The validated code must be copied from the validator text area.
Step 4: Paste the AMP code into our AMP area
In the enKod platform go to section Mailings → Messages and open the edit window for the Email you need. Take note, to open the AMP editor, you need to create an HTML version of the email beforehand. You can build it in our inbuilt editor or copypaste a built HTML-version from PixCraft.
Open the AMP editor window and paste the code copied in step 3.
Step 5: Specify email in an email address generation
In order for the survey statistics to be recorded in the PixCraft platform, you need to find the default value for the email address field in the copied code (${email}
in PixCraft) and replace it with the enKod variable - {{subscriber_email}}
.
For example, in the line:
<input type="hidden" name="email" value="${email}">
You need to replace ${email}
to {{subscriber_email}}
and get the result as:
<input type="hidden" name="email" value="{{subscriber_email}}">
Step 6: Send AMP
Your email is ready and you can send it using any sending method available in enKod: via script, instant, scheduled, event-driven, etc.
Step 7. Track statistics in the personal cabinet of your chosen service
In PixCraft, to check if a survey has been completed, go to the Emails section → click on the desired email template → open the Statistics → Components section, point to the desired component (for surveys, this is the Form) and click on the “Go to component” button.
Component statistics can also be found through Components → click on the component used in the required email.
The data collected in the survey will open in a new window:
Optional: export data or customise webhooks for uploading
This step is optional.
In PixCraft, you can upload survey results by clicking the the "Export" button in the statistics section of the component, or you can set up an automatic upload using the webhooks.