Playbooks

Integrating EmailPerks

18min

Introduction

MomentScience EmailPerks allows you to seamlessly embed personalized offers directly into your transactional emails. With just a simple HTML tag, you can deliver targeted promotions that enhance customer engagement and drive conversions. This guide walks you through setting up the EmailPerks tag, customizing its appearance to match your email layout, and aligning it with your brand identity.

Prerequisites

Before you begin, ensure you have the following:

  • MomentScience Account: You’ll need an active MomentScience account to access your unique API key. If you don’t have an account yet, contact us to get started.


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.

orderconf-bottom

{WIDTH}

Width of the Offer in pixels (must match predefined options)

600

{HEIGHT}

Height of the Offer in pixels (must match 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

{CACHE_BUSTER}

A required dynamic value that prevents email clients from caching the offer. More details on this are provided below.

1700000000

Customize Tag Appearance

You can modify the tag using inline styles or CSS while adhering to the following predefined dimensions:

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 specified width and height. If no creative is available, the tag will not display anything.

Fetching Offer ID

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

  1. Navigate to the Offers Page in the MomentScience dashboard.
  2. Locate the Offer ID listed beneath the offer title.

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




Cache Busting

Email clients often cache images, which can result in outdated offers being displayed. To ensure fresh content is loaded every time an email is opened, you must include a cache-busting parameter (cb=) in both the <a> and <img> tags.

Why Cache Busting is Required

  • 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

To implement cache busting, append a unique cb= value to the end of both the <a> and <img> tags. This value should be dynamic and change with each email send or test. Here’s how to do it:

  1. Add cb= to the<a> Tag:
    1. Append ?cb=[UNIQUE_VALUE] to the hrefattribute.
  2. Add cb=to the <img>Tag:
    1. Append ?cb=[UNIQUE_VALUE] to the srcattribute.
  3. Replace [UNIQUE_VALUE]:
    1. Use a unique identifier for each email or test. This could be:
      1. A timestamp (e.g., cb=20240929).
      2. A random number (e.g., cb=12345).
      3. A dynamic value generated by your email service provider (ESP).
  • Ensure the cb= parameter is added to both the <a> and <img> tags. Omitting it from either tag may result in caching issues.
  • Always use a unique value for cb= to ensure the email client fetches the latest version of the offer.

Conclusion

EmailPerks makes it easy to add targeted offers to transactional emails using a simple HTML tag. By following this guide, you can customize your offers, ensure correct display sizes, and implement cache busting for fresh content. With the right targeting and tracking setup, EmailPerks helps drive engagement and revenue from every email you send.



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