In order to earn the Shopper Identity Protection and Issue-Free Orders certifications, you’ll first need to install the conversion tracking code.
To install the conversion tracking code, add the following code to your purchase confirmation page, filling out the bracketed content with the real values.
class="trustedsite-track-conversion" //required. mcafeesecure-track-conversion is also accepted
data-email="firstname.lastname@example.org" //required for automatic opt-in method only
data-country="US" //two letter codes, see eg https://www.iban.com/country-codes
data-state="CA" //two letter codes, see eg https://pe.usps.com/text/pub28/28apb.htm
data-ifodays="20" //integer denoting whole days before the email will be sent
In the example above, values that are not marked as required are optional. For the service to work properly, you'll need to provide at least the order ID.
The offset date is an optional argument that can be given when including conversion.js which specifies the number of days before the order’s Issue-Free Orders email should be sent. If not set, the email will be sent after 7 days by default.
Including the optional values (other than ifodays) means that the forms for non-automatic opt-ins will have the values pre-filled in for the user, improving the user experience.
While the exact procedure may vary depending on your site's infrastructure, you can use the two examples below as a general guidance for how to customize the code:
data-orderid=“<%= current_user.last_order_id %>”
data-email="<%= current_user.email %>"
data-firstname="<%= current_user.first_name %>"
data-lastname="<%= current_user.last_name %>"
data-orderid=“<?php current_user.last_order_id ?>”
data-email="<?php current_user.email ?>”
data-firstname="<?php current_user.first_name ?>”
data-lastname=“<?php current_user.last_name ?>”
After installing the code, you will need to select a customer opt-in method in order to enable Shopper Identity Protection and Issue-Free Orders. To do this:
- Log in to your account.
- If you have multiple sites in your account, click the one you want to manage in your Site List.
- From the site overview page, under Set Up click Set Up Conversion Tracking.
- Copy and paste the code to your purchase confirmation page, filling out the bracketed content with real values.
- Select an opt-in method for Shopper Identity Protection from the drop-down menu.
Once you have the conversion tracking code installed and you have made some sales, you can begin tracking purchases from the Overview page in your TrustedSite dashboard.