Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Move default tracking pixel

LeonieSwart
Level 3
Level 3

Hi

We currently are experiencing the following issue:

Not all of our opens are tracked as the default open tracking pixel for Campaign is at the bottom of the email.
The email content created by our business is sometimes too long so that particular clients like Gmail cut off the bottom of the email.
Due to that the tracking pixel isn't loaded and an open isn't registered.

We've tried to convince business of creating smaller emails but this isn't something they are willing to apply consistently.

How can I move the default tracking pixel to the top of the email?
Or how do you go about too long email content?

I already tried including the Option of the OpenFormula manually at the top of the email, resulting in 2 tracking pixels. But it seems only the bottom one is being taken into account.

Our current workaround is inserting a tracking pixel from Litmus but this isn't ideal as we don't have the data in Campaign using this method.

Thanks!

Leonie

1 Accepted Solution
LeonieSwart
Correct answer by
Level 3
Level 3

I think I have found a solution.

The default tracking pixel is actually the OpenFormula option that is included at the bottom.

First I tried manually including this at the top, but this wasn't successful as the parameter UrlId wasn't being filled in.

After some investigation I came across the definition of UrlId. It's the Primary Key used in table nms:trackingUrl.

Value 1 stands for the value "open".

So I've created a duplicate of the original openFormula but with the UrlId hardcoded on 1. Placing this at the top of the email fixes the issue when the tracking pixel at the bottom isn't loaded.

Also tested the use case where the top and bottom tracking pixel are tracked, expecting this would result in 2 opens being tracked.

But the results showed only 1 open is tracked in this case.

View solution in original post

2 Replies
LeonieSwart
Correct answer by
Level 3
Level 3

I think I have found a solution.

The default tracking pixel is actually the OpenFormula option that is included at the bottom.

First I tried manually including this at the top, but this wasn't successful as the parameter UrlId wasn't being filled in.

After some investigation I came across the definition of UrlId. It's the Primary Key used in table nms:trackingUrl.

Value 1 stands for the value "open".

So I've created a duplicate of the original openFormula but with the UrlId hardcoded on 1. Placing this at the top of the email fixes the issue when the tracking pixel at the bottom isn't loaded.

Also tested the use case where the top and bottom tracking pixel are tracked, expecting this would result in 2 opens being tracked.

But the results showed only 1 open is tracked in this case.

View solution in original post

psheppar
Employee
Employee

I too also had this issue and based on the solution provided previously.  Create the following typology rule to automatically add the pixel just before the body tag to all email using the rule.

 

if (delivery.targets.filteringSchema == "nms:recipient") {

var html = delivery.content.html.source.toLowerCase().indexOf("<body>");
var openFormula = getOption('NmsTracking_OpenFormula');

openFormula = openFormula.replace("$(urlId)","1");

var pixel = openFormula;
var newHTML = insert(html, pixel, delivery.content.html.source)
delivery.content.html.source = newHTML
}

function insert(index, string, originString) {
if (index > 0)
return originString.substr(0, index) + string + originString.substr(index, originString.length);
else
return originString;
};

return true