How do I set up an ad in Google DFP that can be included in an email newsletter? - html-email

I'd like to include a few ad spots in my newsletter and I think Google DFP can be used to managed ads in emails. The code that it generates requires Javascript which I can't include in my HTML email template. How do I set up the ad in Google DFP and how do I generate the code to display the ad in my HTML email?

Since email coding is limited to XHTML 1.0, your options are limited. I'll be honest, DFP is a really, really bad platform for serving ads in email. I manage a team that sends out ~2B emails per year for a large lifestyle media company and it's been a challenge for us simply because it's such a manual process. There are really good alternatives in the space if your needs merit a specialized solution.
If you're not sending a lot of volume it is achievable (albeit hacky). Like you eluded to in your question - email is not capable of utilizing JavaScript so you're limited to straight HTML through an image request and no-script beaconing. You'll need to leverage a 1x1 with query parameters to designate the newsletter name, ad type, brand or whatever else you wish to track.
Here is a rough example:
<a href="http://adserver.yoursite.com/clicktracker.ng/site=yoursite&newsletter=03_10_15_Yourbrand&ad=Big_Box&issue=315">
<img src="ad_creative/ESP redirect" width="300" height="250" border="0" alt="advertisement">
</a>
You'll need a standard image tag that uses key-values to target the ad to the newsletter you'll be publishing on. Good luck!

Related

How to display images within html email content in gmail?

In yahoomail and html email, the images are loading but not in gmail. I observed that in gmail, the image urls are altered.
For example,
Image URL in yahoo/Hotmail : http://qaecmwcs.qacorp.moneygram.com/sites/Satellite?blobcol=urldata&blobkey=id&blobnocache=true&blobtable=MungoBlobs&blobwhere=1515690635784&ssbinary=true
Url for the same image in Gmail : https://ci5.googleusercontent.com/proxy/2B2Fyk0aboH-eiikaxVWdIC9DXbJzhZEuWKm5yPwUeXf3SdYRuoKBGT-HeCFRlNcg7VTzljtSsEhHkikFMGPac35C6Az2Fc2wsdig3xj0S3g1bEIABaMx9RKnTjYuqagP1hUGNl3GG4f2aHy26wHrINZkdn5Wv3y6zcvbWHUL8rabUcjHuCO05i8RM31x8iFJmUorccqIJM6P9f6-eLIaQ5GpZYCrKPJws72HfM2-AsXcg=s0-d-e1-ft#http://qaecmwcs.qacorp.moneygram.com/sites/Satellite?blobcol=urldata&blobkey=id&blobnocache=true&blobtable=MungoBlobs&blobwhere=1515690635784&ssbinary=true
When I manually remove the additional url part in the image src,from DevTools then I am able to see the image. Can any one please let me know how I can handle this in gmail?
If you want an image to work in email, it has to be viewable by your audience. The image path should be straightforward and simple. What you have posted over and over in your questions are images that are not accessible to the general public, so they will never work for an email.
Image Path
This is how an image should be formatted:
<img src="staticpath" alt="imagename" class="imageclass" />
<img src="https://www.w3schools.com/images/w3schools_green.jpg" width="104" height="142" alt="W3Schools.com">
<img src="https://placehold.it/600x600" height="600" width="600" />
More information:
https://www.w3schools.com/html/html_images.asp
Image Descriptors
As a best practice, an image path should end in a descriptor that defines what the format of the image. Images that work well with emails include .jpg .png .gif.
More Information:
https://litmus.com/blog/png-gif-or-jpeg-which-ones-should-you-use-in-email
Email Templates
Your email templates should follow the basic practices of a well-formatted html page. Email development is not Web development because email clients do not support current html 5 or css 3 standards. So it can be very hit and miss to create a complex email.
The following email templates will give you a good idea how an email should be created, how images should look, how image classes work.
Email template Examples:
http://tedgoas.github.io/Cerberus/
https://foundation.zurb.com/emails/docs/v1.0.5/index.html
Please take the time to read through this answer, read through the attached examples.
Best Practices & Considerations when writing HTML Emails
Good luck with your images.
The firewall was blocking the images from displaying. When client opened the firewall then the images within the server are loaded.

Google DFP ads Image not loading

The issue I am running into is rather simple, the creative URL's are not clicking through within certain email clients (most often Gmail). More specifically, in GMail the creative can sometimes click to a blank page where the redirect URL will just sit idly and for some users, it will redirect to the appropriate URL.
I identified that the creative will not click through if the 'img src' and 'href' URL's are not identical (think /ad & /jump & /adx), furthermore I've identified that Google also prepends their content server location to some URI's (Google Content Server URI's look something like this "https://ci3.googleusercontent.com/proxy/....#") thus this makes the img src completely different...yay! We've looked at adding and removing co=1 / 0 --> this hasn't done anything for us.
We also tried hosting the Ads on our server and clicking the email to go to our domain. But on our domain DFP Ad images are not loading and add the style attribute (style="display:none;") on the image and due to that link also not working and we came across the same issue that if the 'img src' and 'href' URL's are not identical Ads will not work.
Can someone help me here and let me know why display:none is being added on the Ads?

How can an email reply or forward be composed in html emails?

I'm creating a simple email client and I'm having trouble with Reply and Forward in html emails.
When I have the user compose the reply message, how do I append that content to the top of the message? I have done some investigating with how outlook does it by injecting the new message content into a paragraph or div or something like that.
How is it done in general, i.e. gmail, yahoo, etc. How do they figure out where to inject the reply content in the html?
I'm using c# so ideally there is some c# library that can handle this? If not then some idea how it's done generally so I can create a solution for it.
I've read wikipedia's Posting Style article and it gives a good overview of the general idea but nothing about how to do it in html.
Some Background
When composing HTML email, it is important to recognize that email clients have rather limited support for HTML and the level of support varies across email clients.
Because of that, although <div> and CSS are the correct layout tools for web pages, that is not true for HTML email. Even today, use <table> for layout control for HTML emails.
Additionally, the only reliable means to apply CSS is to the HTML elements with a style= attribute on each element. CSS declarations in a <head> section are often ignored by the email client. When crafting HTML email, I actually use CSS in the <head> and, once it looks correct, use this page to convert the HTML to use style= attributes. There are other options.
Not only will the <head> tag often be ignored, but so will any <body> tag.
Solving Your Problem
I would suggest placing the text included in the reply within a table (with a single <tr> and single <td>), and applying an inline CSS style to that table. That allows you to apply formatting, such as placing a colored bar down the left-hand side, italicizing the text, etc.).

Some HTML attributes are not working in email.(border, cellspacing...)

Here's an email template with HTML.
And I tried to copy it in web browswer and paste in Outlook 2007.
But it looks different because border="0" cellpadding="0" cellspacing="0" doesn't work in email.
For the worse, it varies from the each email system(Outlook, Gmail, hanmail...).
Is there any way to work HTML perfectly in every email system?
Thanks, always.
=======================
This is what it should be.
And this is from DAUM Hanmail,
and Gmail.
You see, Html Email has its pros and cons, and these might even vary with the email client too.
Here are some known limitations (some might nolonger be true though):
Large email bodies may not be sent to NotifyLink devices as HTML when Smart Retrieval is enabled (NotifyLink Enterprise Server: Contol Option Rules) or the body size is set to a limit that does not accommodate the email body size. The email will sent in plain text.
Forwarding an HTML email from the device results in the forwarded email showing the original message twice, once in plain text and once in HTML format, when viewed on Oracle Beehive v1.5.x, Scalix, Sun, and Zimbra mail servers.
Using the Retrieve or Retrieve All options will not retrieve a full HTML picture email. This may be due to a bug with the BlackBerry OS v5.0.
An HTML message viewed on the device that includes a phone number will not allow the phone number to be selected for dialing.
The bodies of messages sent using ActiveSync's SmartForward or SmartReply commands will always be in plain text format.
Body text that has been copied and pasted from a MS Word document into emails sent to the device in HTML format are cut off when the email has been sent from a Kerio mail server.
Read more here...
How to Code Html Email correctly
And More Here...
I am afraid that not all email clients render HTML emails in the same way. Even between different version of Microsoft Outlook there are several differences.
You may find interesting the next article
http://www.campaignmonitor.com/css/
Hope this helps.

using form buttons for spamproof email-addresses

I have been looking at some methods for spamproof email methods here. I'd like to propose a more simple approach: Since I need a couple of different email addresses I considered just using a selectbox with JS or serverside redirect, as per examples on here.
Because google doesn't spider forms (dixit Matt Cutts), and spam-harvester script don't either (I think????) this would make sense to do.
I would love to be able to do this without using a script. So why not use one form per email?
<form action="mailto:test#domain.tld" method="get">
<input type="submit" value="test#domain.tld"/>
</form>
It seems the button text can be copied but not pasted, so that's a disadvantage.
Is this approach any good? or any other recommendations?
A robot uses the text of the page to get the email. It does not care if that text is in a button or within the body so using a button will not help.
Outside of using javascript, the only solution I know of would be written text, an image or Flash.
Create an image with your email or write out the email like: "test at domain dot tld"
Flash could provide you with a more secure (but not 100%) way of allowing people to click on an email but would not work on iPhone browsers and those that do not have the plug-in.
Another way is to use a simple captcha to before displaying the email in the PHP code.
Email: (1+2 = ?) then test#domain.tld
Because:
The email address is still in the page, and thus easily harvestable
mailto: URIs as form actions often fail
The reason server side form handlers stop email addresses being harvested is because the email address is not exposed to the user.