Email Campaign Implementation Guide

In order for Salesforce DMP to collect data from emails, a tracker needs to be included in the email body. Salesforce DMP has two types of trackers that you can use for this: Event trackers or Campaign trackers.   The difference between the two has to do with what you are using the emails for, and how the data is reported on within the Salesforce DMP Platform. If the emails that you are sending would be considered part of an email marketing campaign, then you should use the Campaign Impression and Click Tracker option, because then the data will be treated like campaign data. If the emails are more transactional – like say a welcome email for when a new user registers an account – then you should use Event Pixels with Event Click Trackers, if need be. If the former applies to you continue reading below, it the latter please click here: to learn about using event pixels to capture email opens and clicks.

Campaign Trackers

Events are the best way to track transactional emails, but if you send out email marketing campaigns, then you should use the Salesforce DMP Campaign Trackers. If you track emails using a Salesforce DMP Impression Tracker, you will be able to see the data in the Campaign Performance reports in the platform. If you want to be able to do things like compare how your email marketing impacts your paid search marketing, or vice versa, you need to use an Impression Pixel with a unique Salesforce DMP Configuration ID for the email marketing. (You can, by the way, include both Event Pixels and Impression and Click Trackers in a single email in order to benefit from both.)

By using the Impression Pixel, when a person opens their email, it will register as an impression in the Campaign Performance reports. With the Click Tracker, when they click on a link in the email, it will count as a click in the Campaign Performance reports as well. The Impression Pixel can be included anywhere in the body content of an email, but it can only be used with the HTML version of the email content. The text version of the email would not only show the code, but also never make the request for the image.

Impression Pixels for Emails

The format for the Salesforce DMP Impression Pixel is shown below. The values for the Advertiser ID, Campaign ID, Placement ID, Site ID, Ad ID, and Creative ID are all values that you choose. If you would like to treat all email campaigns as one over-arching campaign, you could hard-code a value in for the Campaign ID and use that value in the Impression Pixel for all of your emails. If you’d like to be able to differentiate between different campaigns, then you would need to provide different campaign IDs. 

<img src='http://beacon.krxd.net/1x1_ad_impression.gif?confid=xxxxxx&advertiserid=[REPLACE_WITH_ADVERTISER_ID]&campaignid=[REPLACE_WITH_CAMPAIGN_ID]&placementid=[REPLACE_WITH_PLACEMENT_ID]&siteid=[REPLACE_WITH_SITE_ID]&adid=[REPLACE_WITH_AD_ID]&creativeid=[REPLACE_WITH_CREATIVE_ID]' width=0 height=0 style='display:none;' />

While the example above uses the HTTP protocol, HTTPS is also a supported protocol for all Salesforce DMP URLs. The example also uses the location "http://beacon.krxd.net/1x1_ad_impression.gif". The inclusion of the "1x1_" string means that this request will return a "200 OK" response code with a 1x1 pixel sized image. Normally, Salesforce DMP pixels returns a response code of "204 No Content", meaning that the request was successful, but no actual content needs to be returned. Not all email clients properly handle a 204 response code, so we're using the "1x1_ad_impression.gif" in our samples here. If you would prefer the "204 No Content" response, you can remove the "1x1_" string, so the location would look like "http://beacon.krxd.net/ad_impression.gif".

The Impression Pixel is used with various different marketing channels, so it supports collecting data that might not be pertinent with an email campaign – such as a Placement ID or Site ID. Most of the fields in the Impression Pixel are optional. The only required fields are the ConfID and the Campaign ID – although we do suggest you include an Advertiser ID, even if it’s just a hard-coded value for the email channel.

Please note: Not all characters are accepted in the values for these fields. The fields included in our Campaign Trackers are ID fields, because that is what would normally be submitted by an ad server. Since they are IDs, it is expected that the values will only contain alphanumeric characters (Aa-Zz,0-9), although underscores (_) and dashes (-) are accepted as well. If you need to include non-supported characters, please talk to your Salesforce DMP Solutions Team, and Salesforce DMP will review whether the additional characters can be supported.

If you submit a value with an unaccepted character, than the Salesforce DMP servers won't be able to process it, and none of the data will be collected for that impression. This includes whitespace characters, such as spaces and tabs. All of these trackers are URLs, and URLs can not include unencoded whitespace characters.

Salesforce DMP can also translate these ID values into human-readable names in the platform, if you provide us with a translation from the IDs to the names you would like shown.

Since the data collected is used in the Campaign Performance reports, you want to use values that would make sense to your company when the reports are reviewed. If you don’t include a field, such as say the Site ID, than when you clicked into a report that looked at sites, you wouldn’t see any data for your email campaigns. That’s fine, and in some situations, might be the best option. With that in mind, you should decide which if any of the optional fields you’d like to use.

Since campaigns are used in nearly all of the marketing reports, you need to include a Campaign ID to see marketing data in the platform. Many email marketing systems don’t strictly use the idea of a campaign, so you might be wondering what to use instead. It’s fine to use either hard-coded values or related concepts in the place of the campaign. For example, when Email Studio in the Salesforce Marketing Cloud sends out an email campaign, it assigns a Job ID to the email send. So if it made sense for you, you could submit the Job ID for the campaign ID field instead. What values you use – or don’t use - for fields really depends on how you’d like to be able to differentiate the activity in the campaign reporting.

The Conf ID is the Salesforce DMP Configuration ID for the email marketing channel. You can enter whatever values you would like for the other fields, but the Conf ID must be the correct value for your account. To find the correct value, login to the Salesforce DMP. Then select Sites from under the Manage menu. You will find the Conf ID in the Config column.

This screen lists all of the Sites and Media Tags that are configured for your account. The Sites are configured to generate Salesforce DMP Control Tags. Media Tags are configured so Salesforce DMP can identify the source of different media traffic. There should be a different media tag for your Display campaigns, versus your Paid Search campaigns, versus your Email marketing campaigns, and so on. In the listing, look for the media tag listing for the email channel. Right next to the channel column is the Config column. That text string is your Salesforce DMP Conf ID for your email marketing channel.

If you don’t see the Sites menu option, it means you’re not set up as an administrator for your account. If you can see the Sites and Media Tags listings, but don’t see a media tag set up for your email marketing channel, it may be that one hasn’t been configured as of yet. In either case, reach out to your Salesforce DMP Solutions team for help.

Since there are a lot of variations between the various email marketing systems and what fields you might choose to include in an Impression Pixel, it’s not easy for Salesforce DMP to generate the pixel code for you through the platform. However, if you reach out to your Salesforce DMP Solutions team, they will be able to help generate both the Impression and Click Tracker tags.

To deploy the Impression Pixel, you include it in the body of the HTML version of your emails. When a user opens an email and loads the images, a request is sent to the Salesforce DMP servers and the data is collected into the platform.

Campaign Click Trackers for Emails

The Salesforce DMP Click Tracker is a redirect script that allows Salesforce DMP to register that someone clicked on a link before redirecting that user to the final destination. The full format of a Campaign Click Tracker is:

http://apiservices.krxd.net/click_tracker/track?kxconfid=xxxxxx&kxadvertiserid=[REPLACE_WITH_ADVERTISER_ID]&kxcampaignid=[REPLACE_WITH_CAMPAIGN_ID]&kxplacementid=[REPLACE_WITH_PLACEMENT_ID]&kxsiteid=[REPLACE_WITH_SITE_ID]&kxadid=[REPLACE_WITH_AD_ID]&kxcreativeid=[REPLACE_WITH_CREATIVE_ID]&clk=

The most basic format for the Campaign Click Tracker is:

http://apiservices.krxd.net/click_tracker/track?kxconfid=xxxxxx&kxadvertiserid=[REPLACE_WITH_ADVERTISER_ID]&kxcampaignid=[REPLACE_WITH_CAMPAIGN_ID]&clk=

As with the Impression Pixel, you can choose to include or discard the optional fields for the Placement, Site, Ad and Creative IDs – but we do recommend that you include an Advertiser ID and a Campaign ID, even if they're only a hard-coded values for all of your email campaigns. This data is used in the reporting in the Salesforce DMP platform, so what you choose for these values should reflect how you would like to view the reports. For instance, if you would like to be able to distinguish between clicks on different links in an email, you might want to pass in different creative IDs for each link. If you only want to track the overall clicks on any portion of the email, though, then you can use the same values for the Click Tracker in all of the links.

Please note: Again, not all characters are accepted in the values for these fields. The fields included in our Click Trackers are ID fieldis, and a Click-through URL field at the end of the tracker. It is expected that the values for the ID fields will only contain alphanumeric characters (Aa-Zz,0-9), although underscores (_) and dashes (-) are accepted as well.

For the Click-through URL field (that is, the &clk= field) the expectation is that the URL will be properly url-encoded. The Salesforce DMP Click Tracker will take the url-encoded Click-through URL, decode it, and then redirect the browser to the unencoded URL. This is the way click trackers generally work, so if you are trying to chain together two different click trackers, you may need to double encode the Click-through URL. It's important to test that the click trackers are working as you would expect.

For more information about URL encoding, you can visit: http://www.w3schools.com/tags/ref_urlencode.asp

The URL for the final destination must be included in the Click Tracker after the &clk= field at the end. With out it, the Click Tracker won’t redirect people, and your consumers won’t end up where you want them to go. To deploy the Click Tracker, you would add it to the links in the HTML body of your email. So if your link looked like:

<a href=”http://www.example.com”>See our new site</a>

With a Campaign Click Tracker, this link would now look like:

<a href=”http://apiservices.krxd.net/click_tracker/track?kxconfid=xxxxxx &kxadvertiserid=12345&kxcampaignid=67890&clk=http%3A%2F%2Fwww.example.com”> See our new site</a>

User Matching

If you would like Salesforce DMP to be able to send a list of users to your email marketing system, in order to send out a targeted email message for instance, than the first step is user matching needs to happen between how Salesforce DMP identifies people and how your email marketing system identifies people. This is normally done by including user matching pixels in your email campaigns. The format for this pixel is:

<img src='http://beacon.krxd.net/1x1_usermatch.gif?partner=xxxxxx&partner_uid=yyyyyy' width=0 height=0 style=’display:none’ />

The xxxxxx string will be the partner name Salesforce DMP has assigned to your email marketing system account and key, and the yyyyyy portion will be the Partner ID that the email marketing system has assigned to the user (typically something like the subscriber ID or a hashed email address). If you need user match pixels, please contact your Salesforce DMP Solutions team, and we will set them up for you.

The example user matching pixel above uses the HTTP protocol, but HTTPS is also a supported protocol for all Salesforce DMP URLs.

Implementing the Trackers

These instructions are the generalized instructions for how to implement the trackers in any email system. There are also specific instructions that will walk you through how to implement the trackers in Salesforce Marketing Cloud's Email Studio, SendGrid, and MailChimp.

The user match, impression, and event pixels all need to be included in the body of the HTML version of your email. If they are included the text version, they would never be fired, and Salesforce DMPwould never receive the data. Not to mention, the pixel code would be visible - and probably distracting - to your subscribers.

If at all possible, we suggest that you use email templates, so you can include these pixels in the template instead of having to include them manually to each email. You don't want to include these pixels in the <head></head> section of your HTML email (assuming you use full HTML document structure code) because some email systems, such as Gmail, automatically remove that section of code.

The exact placement of the pixels in the email body doesn't matter too much, but we suggest you include them at the top of the email. The Click Tracker must be added to the <a href= of any link you want the clicks tracked from. You can use the same Click Tracker to track all of the links, or you can choose to only track some of the links. If you don't want to use the Click Tracker at all, it may be possible to collect the click data off of the landing page, if it includes Salesforce DMP tracking as well. Contact your Salesforce DMP Solutions Team to discuss this further.

An alternative to using an <img tag to make the pixel call to Salesforce DMP is to use a <span tag instead, and set the background image of the span to the Salesforce DMP pixel you are using. In other words, instead of using:

<img src='http://beacon.krxd.net/1x1_ad_impression.gif?confid=xxxxxx&advertiserid=123&campaignid=456' width=0 height=0 style='display:none;' />

You could use:

<span style="background-image:url(' http://beacon.krxd.net/1x1_ad_impression.gif?confid=xxxxxx&advertiserid=123&campaignid=456'); display:inline-block; width:0px; height:0px"></span>

This can help if you run into any display issues in older email clients.

That's all that's really involved in adding the trackers to your emails. The only other tip we can offer is to make sure to send test versions of your email out, and try and check them in as many email clients and scenarios as you can. Unfortunately, there's a lot more variation on how email clients display content than with web browsers.

Things To Note

Here are a few items to keep in mind when collecting data from emails:

  • JavaScript is not supported in the majority of email clients, so you always want to use the pixel version of a tag.
  • Most webmail clients, such as Gmail, block external calls for CSS style sheets, so you want to embed your CSS into the email or put the CSS styling inline.
  • Gmail strips out the <head></head> tags from an HTML email, so you always want to include the trackers in the body of the email.
  • Email clients are not as universally consistent about how they display HTML and CSS. Because of this, you always want to send test campaigns and look at the test emails in a variety of different browsers.
  • If you want to track email campaigns without using an ad_impression.gif pixel, it is possible to collect some campaign information using UTM parameters in the click-through URLs instead. For more information on how to do this, please talk to your Solutions team.
  • Many email clients cache images. Because of this, Salesforce DMP would be able to see the first time a user opened an email, but not necessarily every time they opened an email. Since that first open is usually the most important, this isn’t usually a problem, but is something to keep in mind.
  • People who read the text only versions of emails will not be tracked because there isn’t a mechanism to send the data back to the Salesforce DMP servers in that scenario.
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk