Modifying Email Codes
Preventing Caching in the Email Ad Code
Browsers will cache images for Email ad code if the same URL is used for multiple email campaigns. To avoid this, you should make the URL unique each time you send a campaign.
Because the last part of the URL generated by our ad code page consists of a randomly generated string, just change that part, and the ads will serve properly without being cached.
For example, if the code you generate looks like this:
<a href="https://e-<networkId>.adzerk.net/s/redirect/14889/0/4/89011487">
<img border="0" src="https://e-<networkId>.adzerk.net/s/14889/0/4/89011487" /></a>
then a great way to ensure the URL is unique is to use a time or date, like this:
<a href="https://e-<networkId>.adzerk.net/s/redirect/14889/0/4/newsletter05212012">
<img border="0" src="https://e-<networkId>.adzerk.net/s/14889/0/4/newsletter05212012" /></a>
This string has to be the same in both URLs. Otherwise, the link will not work.
Additionally, the code at the end of the URL should be unique per ad in a given newsletter. So if you have three ads in a newsletter, set the codes to be:
- newsletter05212012ad1
- newsletter05212012ad2
- newsletter05212012ad3
Adapting Kevel's Email Ad Code for Gmail
If you serve email ads to recipients who use Gmail, be advised that Google proxies calls to images. This means that Google uses their own IP address in place of the unique IP address of the recipient. Since Kevel can’t record an email ad impression without registering a user’s IP address, this breaks email ads in Gmail.
An alternate way to identify unique users is to pass in a custom value unique to each recipient. That modified ad code looks like this:
<a href="https://e-<networkId>.adzerk.net/s/redirect/53763/0/4/56880432?key=1234">
<img border="0" src="https://e-<networkId>.adzerk.net/s/53763/0/4/56880432?key=1234" /></a>
The value of Key
must be unique for each user and email sent. Key
must also match in both the anchor and image tags.
If your Kevel account uses UserDB, you are required to use a user's userKey as the
key
value. This is the only way to sync UserDB data and email ad requests.
Your email client should have a way of automating a unique code that you can append to the URLs as Key
. For example, in MailChimp you can use merge tags to generate a string that includes the user’s email with the Unix timestamp in microseconds: |EMAIL||DATE:y/m/d/u|**
Passing Query Strings in Email Ad Code
You can also append a single querystring to Kevel's email ad tags, which will pass that value to the ad's landing page on a click. For example,
a href="https://e-<networkId>.adzerk.net/s/redirect/53763/0/4/56880432?UserId=5678"><img border="0" src="https://e-<networkId>.adzerk.net/s/53763/0/4/56880432?UserId=5678" /></a>
When the add is clicked, the querystring is passed intact:
http://www.adzerk.com/?UserId=5678
Force Targeting in Email Ad Code
You can force target email ad code so that an email ad placement only serves a particular:
- Campaign
- Flight
- Ad
To do this, you must add a query parameter to the URL of the image:
<a href="https://e-<networkId>.adzerk.net/s/redirect/12345/0/5/campaign">
<img border="0" src="https://e-<networkId>.adzerk.net/s/12345/0/5/campaign?CampaignId=123456" />
<a href="https://e-<networkId>.adzerk.net/s/redirect/12345/0/5/flight">
<img border="0" src="https://e-<networkId>.adzerk.net/s/12345/0/5/flight?FlightId=123456" />
<a href="https://e-<networkId>.adzerk.net/s/redirect/12345/0/5/ad">
<img border="0" src="https://e-<networkId>.adzerk.net/s/12345/0/5/ad?FlightCreativeId=123456" />
Note that you can combine query parameters to use force targeting with other email ad code features, like passing in UserDB keys:
<a href="https://e-<networkId>.adzerk.net/s/redirect/12345/0/5/ad?key=awesomeuser">
<img border="0" src="https://e-<networkId>.adzerk.net/s/12345/0/5/ad?FlightCreativeId=123456&key=awesomeuser" />
Updated about 4 years ago