Ads In Email

Overview

Many publishers discover their most loyal and engaged audiences not only on their websites or apps but also within their email newsletters. In recent years, email-based communities have experienced remarkable growth, presenting a prime monetization opportunity. However, current tools for trafficking, managing, serving, and reporting on email-based advertising fall short. Our API-driven email advertising solution empowers you to deliver enhanced reporting to your advertisers and equip your sales team with sophisticated targeting and selling capabilities, unlocking the full potential of your email audience.

Below is a guide to integrating your email list with the BuySellAds Ad Serving API.


Integration Methods

Per Email Address

When you request an ad for each email address you send to, you end up with a web-like ad experience for your email list where each user will potentially see a different ad. Please review the following pro’s and con’s with this approach:

ProCon
Ad variability: Each email send will see a variety of different ads vs only one ad for the entire email list.Latency: Please see our Speed chart below that provides estimated latency by list size. Depending on the size of your list this may be more of a concern.
Pricing flexibility: You can sell ads into your email newsletter with greater pricing flexibility vs having to sell the entire send to the same advertiser at a static rate. You can layer in different pricing similar to how you might sell ads on the web.Integration work: You will likely spend more time with your engineering team on the integration.
Fluid dates vs fixed dates: You can more easily sell multi-send PPC and impression based campaigns. If you provide guaranteed performance minimums, this prevents a lot of manual work and helps optimize your inventory for sell-through.
A/B Testing: You will be able to offer advertisers the ability to A/B test creatives.

Per Send

This method requests the ad for the entire list send vs for each email address as it sends. This means that you will send the same ad to your entire list on each send. There are pro’s and con’s to this approach:

ProCon
Simple Integration. This method of integration has no real latency concern and thus is very straight-forward.Fixed dates. You can only schedule a specific ad per email send date and that ad is sent to the entire list.
No A/B testing. A/B testing would have to take place over multiple sends to the same list vs within the same send.
No ad variability. The same ad will be shown to every user on your list for each send.

Creative Format

Similar to the integration methods, there are two options for the creative format, and each with its own set of Pro’s and Con’s.

Native Creative

This method provides for a highly custom image + text (or text only) creative format that you can style to look exactly like the native text of your email design/template.

ProCon
Highly custom. You defined each of the elements for the creative format, and the ad will adapt to your underlying email style/template.Integration work. You will need the flexibility with your email service provider to make an external request before the send in order to fetch the creative(s).

Static Image Creative

This is the default method used for the majority of email service providers who do not make it easy to pull in content from a 3rd party.

ProCon
Quick and easy. All you have to do is copy+paste an href that wraps an image tag into your template.Images sometimes get blocked. Some email clients will have images set to not show by default.
It won’t look exactly like your email template. It can be pretty close, but it won’t be the same as native text in your email.

Forming the request

Please refer to the Get Ads Endpoint for making requests. The requests and responses are the same for email based ad serving - the only difference is the values you use for useragent and the optional addition of a hashed email address value. For useragent you will want to pass the string "email" as the value. For forwardedip you will want to pass the users IP that you have detected from a previous interraction with your website, email list, etc. If you do not pass a value for forwardedip the target location for the request will be "unknown" and you will not be able to serve geo-targeted ads for the request.


Hashing Email Addresses

One of the primary use cases for email based advertising is that we can serve ads to specific users based on a hashed version of their email address. This can be a powerful way to increase email CPMs by 10x or more, depending on the use case. Of course, the tradeoff is that the match rate across your list will likely be relatively low with a small set of advertisers. This is why we offer a network based buying solution for advertisers for you to tap into, since it is not always practical or worthwhile to do direct deals with email newsletters to only match a small subset of a list.

Email hash parameter

  • Name
    email_hash
    Type
    string
    Description

    A concatenated SHA256 hash of the zones Secret Email Hash and the users email address.

Here is what a fully formed request should look like:

Request

GET
/ads/CVADC53U.json
curl -G https://srv.buysellads.com/ads/CVADC53U.json \
  -d useragent=Mozilla%2F5.0%20%28Macintosh%3B%20Intel%20Mac%20OS%20X%2010_15_7%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F94.0.4606.71%20Safari%2F537.36 \
  -d forwardedip=198.51.100.123
  -d email_hash=c4d4f98e4b4e8b4cd0b3c0d65984d19dd8f3b3e655039f6b1d6f12e0e81f6c12

To hash an email address, you will first need your zones Secret Hash Key. Login to your BuySellAds account, select the email zone you are integrating, and click to copy the secret hashing key.

Hash the email address

<?php
$email = "example@example.com"; // Replace this with the email address you want to hash
$secret_key = "your-secret-key"; // Replace this with your own secret key

// Check if the email address is valid
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
    // Concatenate the secret key and the email address
    $email_with_key = $secret_key . $email;

    // Hash the email address with the secret key using the SHA-256 algorithm
    $hashed_email = hash("sha256", $email_with_key);

    // Output the hashed email address
    echo "Hashed Email: " . $hashed_email;
} else {
    echo "Invalid email address";
}
?>