Playbooks

Integrating EmailPerks

18min

Introduction

MomentScience EmailPerks makes it easy to embed personalized offers directly in transactional emails. With a simple HTML tag, you can deliver targeted promotions that improve customer engagement and boost conversions. This guide outlines how to set up the EmailPerks tag, adjust its appearance to fit your email layout, and implement cache busting for testing purposes.

Prerequisites

  • MomentScience Account: Ensure you have an active MomentScience account to get your unique API Key. If you don’t have an account, contact us now.
ο»Ώ

Integration Steps

Follow these steps to embed the MomentScience EmailPerks tag into your transactional emails

Generate the EmailPerks Tag

Copy and paste the following general HTML tag template into your email:

HTML Tag Template [Without Tags]
HTML Tag Template [With Tags]
ο»Ώ

Populate the Required Fields

Field

Description

Example Value

{PARTNER-API-KEY}

4b87b13cced4e97f9

{RECIPIENT_EMAIL}

The recipient’s email, provided by your email service provider (ESP)

{PLACEMENT_ID}

A unique identifier for the Offer placement in your email. Each placement in your email should have a unique value across all emails.

orderconf-bottom

{WIDTH}

Width of the Offer in pixels (must match one of the predefined optionsο»Ώ)

600

{HEIGHT}

Height of the Offer in pixels (must match one of the predefined options)

300

{TAGS_SEPARATED_BY_SEMICOLONS}

Tags for Offer targeting or reporting, separated by semicolons (optional)

  • It is shown in the tag template above in the (HTML Tag Template [With Tags]) tab. Read on to learn more about this below!

firstpurchase;loyaltymember

Customize Tag Appearance

You may edit the general tag with in-line styles/CSS as needed to match your overall theme, with the following constraints. The width and height values passed in must be one of the following combinations:

Width (px)

Height (px)

Aspect Ratio

600

460

1:1.3

600

300

1:2

600

150

1:4

If you change the container size, maintain the aspect ratio. For example, if the container width is 300px, the corresponding heights should be 230px, 150px, or 75px.

Example Tag

Example of a fully populated tag

HTML
ο»Ώ

Example of a fully populated EmailPerks tag that includes targeting/reporting tags

HTML
ο»Ώ

When specifying targeting tags, ensure to include the trailing forward slash (/) at the end of both the img src and a href attributes to ensure proper functionality.

ο»Ώ

Targeting Specific Offers

To display a specific offer using an EmailPerks tag, include oid:[OFFER_ID] as one of the targeting tags, replacing [OFFER_ID] with the unique Offer ID found in the MomentScience dashboard.

Example of an EmailPerks Tag Targeting a Specific Offer
ο»Ώ

In the example above, additional tags such as firstpurchaseand loyaltymemberare included alongside the oid:[OFFER_ID] tag.

Ensure the Offer has a creative available for the specific width and height dimensions you're passing. If no creative is available for the Offer, nothing will be displayed in the tag, even if the Offer exists.

Fetching Offer ID

Each offer has a unique ID, which can be found in the MomentScience dashboard.

  1. Navigate to the Offers Page: Go to the Offers Page in the MomentScience dashboard.
  2. Locate the Offer ID: The Offer ID is listed beneath the offer title on this page.

For more details on how to retrieve Offer IDs, refer to the demo below.

ο»Ώ
ο»Ώ

Cache Busting for Testing

Email clients often cache images to improve loading times. This can make it challenging to see changes or updates to the Offer embedded via the MomentScience EmailPerks tag. To ensure that you always load the most recent version of the image during testing,

Why Cache Busting is Important

  • Avoid Caching Issues: Without cache busting, the email client may display an older version of the ad, preventing accurate testing.
  • Verify Changes: Ensures that any updates made to the Offer or its parameters are reflected immediately when the email is opened.

How to Implement Cache Busting

  1. Modify the Image Source (src) Attribute: Append a unique query string to the image URL in the src attribute of the <img> tag. This unique string can be anything that changes with each test, such as a timestamp or a random number.
    1. Example Code: <img src="https://e.pubtailer.com/eimp/{PARTNER-API-KEY}/{RECIPIENT_EMAIL}/{PLACEMENT_ID}/{WIDTH}/{HEIGHT}/{TAGS_SEPARATED_BY_SEMICOLONS}/?cb=[RANDOM_UNIQUE_STRING]"> Replace [RANDOM_UNIQUE_STRING] with a unique identifier for each test. This could be a timestamp (e.g., cb=20240929) or a random number (e.g., cb=12345).
  2. Update the String for Each Test Email: Every time you send a test email, change the value of the cache-busting string. This forces the email client to retrieve the most recent image rather than displaying a cached version.
  3. Sending Test Emails: Use your email service provider (ESP) to send test emails that incorporate the updated cache-busting string. Monitor the emails received to ensure the most recent version of the Offer is displayed.

Common Cache Busting Strategies

  • Timestamp Method: Use the current date and time as a unique identifier.
  • Random Number Method: Generate a random number for each test. This can be a simple script or a manual process.

Conclusion

Embedding MomentScience EmailPerks in your transactional emails enhances customer engagement and boosts conversions. By following the integration steps and customizing your tags, you can effectively deliver personalized offers. Utilize cache busting techniques to ensure you always test the most recent Offer version. For assistance, feel free to reach out to our support team. Start leveraging EmailPerks to make a significant impact on your business today.

ο»Ώ

πŸ“’ If you're running into any issues while going through the integration process, feel free to contact us at [email protected]