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
BedrockMission!

Learn More

View all

Sign in to view all badges

Tracking URL option vars

Avatar

Avatar
Level 1
chez_elam
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
chez_elam
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
chez_elam
Level 1

24-08-2020

Hi , I am trying to see if I can only filter out certain domains to be tracked in the tracking code. Trying to assign an option variable to a variable and not able to do that .

something like

var pattern = new RegExp(%><%@ include option='Option_whitelistDomains' %><%, 'i');

 

Is this even possible.

 

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1000
Employee
Sukrity_Wadhwa
Employee

Likes

143 likes

Total Posts

866 posts

Correct Reply

35 solutions
Top badges earned
Validate 1000
Validate 500
Validate 250
Validate 100
Validate 25
View profile

Avatar
Validate 1000
Employee
Sukrity_Wadhwa
Employee

Likes

143 likes

Total Posts

866 posts

Correct Reply

35 solutions
Top badges earned
Validate 1000
Validate 500
Validate 250
Validate 100
Validate 25
View profile
Sukrity_Wadhwa
Employee

01-10-2020

Hi @chez_elam,

Were you able to resolve this query? Do let us know.

Thanks

Avatar

Avatar
Affirm 5
Level 2
taplondon_josh
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

5 solutions
Top badges earned
Affirm 5
Boost 5
Affirm 3
Boost 3
Boost 1
View profile

Avatar
Affirm 5
Level 2
taplondon_josh
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

5 solutions
Top badges earned
Affirm 5
Boost 5
Affirm 3
Boost 3
Boost 1
View profile
taplondon_josh
Level 2

25-08-2020

Hi @chez_elam,

You should be able to bring the Option values into a variable like this:

var optVal = getOption('Option_whitelistDomains');

var whitelistDomains = optVal.split(",");

Then create a new reg exp for each domain in the whitelistDomains array and check for a match before applying the tracking parameters.

Thanks,

Josh

Avatar

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

255 likes

Total Posts

371 posts

Correct Reply

150 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Boost 250
MVP
DavidKangni
MVP

Likes

255 likes

Total Posts

371 posts

Correct Reply

150 solutions
Top badges earned
Boost 250
Validate 1
Give Back 5
Give Back 3
Give Back 25
View profile
DavidKangni
MVP

24-08-2020

Hi,

 

I did something like that to avoid appending tracking code to social network links in emails. Basically i'm not tracking facebook , twitter youtube, etc..

 

<% if( typeof strPurlTrackingServer!="undefined" && strPurlTrackingServer.toString() ) { %><%= strPurlTrackingServer %><% } else { %><%@ include option='NmsTracking_ServerUrl' %><% } %>/r/?id=<%=
type.substr(0, 1) + (message.id<0 ? (message.id+4294967296) : message.id).toString(16).toLowerCase()
%>,<%@ value object="delivery" xpath="@idTracking" %>,<%= escapeUrl("$(urlId)") %>
<% if( $(urlstring).match(/http(s)*:\/\/[a-zA-Z0-9]*\.facebook\.com|flickr\.com|twitter\.com|foursquare\.com|pinterest\.com|plus\.google\.com|youtube\.com|instagram.com/) )
{ } else {%>&utm_source=Neolane&utm_medium=email&utm_campaign=<%= delivery.label %>&utm_term=<%= formatDate(new Date(), "%4Y%2M%2D") %><% } %>
<%
if (document.mode == "forward")
{
var d = message.getParameter("d")
if( d )
d = d.split(",")
%>&ap_visitorId=<%=message.getParameter("visitorId") != '' ? message.getParameter("visitorId"):0 %>&ap_category=<%= d[0]?d[0]:'' %>&ap_deliveryId=<%=d[1]?parseInt(d[1],16):0%><%
} %><%
if( typeof proposition != "undefined" && proposition.length == undefined )
{ %>&ap_oid=<%= proposition.offer.id %><%
} %>

 

Hope it helps

Thanks,

David