Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Understanding 'type' in Tracking URL configuration

Avatar

Level 5

Hi,

I want to understand the tracking URL formula.

The code is:

<% 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 (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 %><%

} %>

I finally get the URL in the sms as 'https://myinstance.instance.com/r/?id=s1baa09,4856a0d0,484ab5ba '

I see that this is generated using

/r/?id=<%=

type.substr(0, 1) + (message.id<0 ? (message.id+4294967296) : message.id).toString(16).toLowerCase()

%>,<%@ value object="delivery" xpath="@idTracking" %>,<%= escapeUrl("$(urlId)")

I want to know what does this mean type.substr(0, 1)

Is that substring of tracking URL type or substring of delivery type or anything else. Where can I find this information?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

The 'h' prefix is short for 'htmlContent' there.

Possible values are the first letters of:

  • htmlContent
  • textContent
  • smsContent
  • androidMessageContent
  • iosMessageContent
  • lineMessageContent
  • facebookMessageContent
  • twitterMsgContent
  • mmsContent (?)
  • pdfContent (?)

Extracted from nms:delivery's content elements.

Thanks,

-Jon

View solution in original post

8 Replies

Avatar

Level 5

In the URL, if I change 'https://myinstance.instance.com/r/?id=s1baa09,4856a0d0,484ab5ba ' to 'https://myinstance.instance.com/r/?id=h1baa09,4856a0d0,484ab5ba ', the url is working.

So what is the difference?

changing the text id=s1... to id=h1... where to configure this in AC?

Avatar

Correct answer by
Community Advisor

Hi,

The 'h' prefix is short for 'htmlContent' there.

Possible values are the first letters of:

  • htmlContent
  • textContent
  • smsContent
  • androidMessageContent
  • iosMessageContent
  • lineMessageContent
  • facebookMessageContent
  • twitterMsgContent
  • mmsContent (?)
  • pdfContent (?)

Extracted from nms:delivery's content elements.

Thanks,

-Jon

Avatar

Level 5

Hi wodnicki

Thanks for your explanation.

We want to locate where it is configured exactly in data schema or any other configurations. Please help us to find this.

We want to find where these types are configured:

  • htmlContent
  • textContent
  • smsContent, etc

Thanks.

Avatar

Level 5

Hi all,

I've received the following URL in sms text.

URL1: 'https://myinstance.instance.com/r/?id=s1baa09,4856a0d0,484ab5ba'

When I click the URL, that's not working. But if I change the type 's' to 'h', it's working.

URL2: 'https://myinstance.instance.com/r/?id=h1baa09,4856a0d0,484ab5ba'

Since this is a sms, URL1 is correct but not working whereas URL2 is working. Any suggestion/comments please.

Avatar

Level 4

Hi

It is defined as part of nms:deliveryData Schema:

<element label="HTML content" name="html" ref="contentDef"/>

<element label="Text content" name="text" ref="contentDef"/>

<element label="SMS content" name="sms" ref="contentDef"/>

contendDef is defined as

  <element desc="Definition of a content for a given message format" label="Content"

           name="contentDef">

    <attribute advanced="true" enum="trackingType" expr="''" label="Default URL tracking"

               name="trackingType" type="byte" xml="true"/>

    <attribute advanced="true" enum="nms:trackingUrlInfo:urlType" expr="''" label="Default URL types"

               name="urlType" type="byte" xml="true"/>

    <element desc="Content associated with this format." label="Content" localizable="true"

             name="source" type="CDATA"/>

    <element desc="Name of the file used the last time this content was loaded."

             label="File" name="sourceFile" type="string"/> <!-- ### to use or to remove ??? + isn't it an attribute -->

    <element label="Configuration of URLs of the content" name="urlConfig" ref="urlConfig"/>

    <element label="Configuration of images referenced in the content" name="imageConfig"

             ref="imageConfig"/>

  </element>

Avatar

Level 4

Tracking URL's are explained here: How to track personalized links in emails

For tracking detection, Adobe Campaign embeds Tidy to parse the HTML source and detect the pattern. It lists all the URLs of the content so that they can be tracked individually. Adobe Campaign uses Tidy again to replace the URL (http://myurl.com) with a URL pointing to the Adobe Campaign redirection server.

For example, in the initial content: http://myurl.com/a.php?name=<%=escapeUrl(recipient.lastName)%> is replaced for one particular recipient with: http://emailing.customer.com/r/?id=h617791,71ffa3,71ffa8&p1=Bare

Where:

  • "h" means HTML content (or "t" for text content).
  • 617791 is the message ID / broadLog ID (hexadecimal).
  • 71ffa3 is the NmsDelivery ID (hexadecimal).
  • 71ffa8 is the NmsTrackingUrl ID (hexadecimal).
  • p1, p2, and so on, are all the parameters to substitute in the URL.

Since SMS tracking is not supported OOTB, setting link type to "s" has no meaning. Set it to "t" to indicate a text message.

Avatar

Level 5

Hi DimaKudryavtsev

Thanks for your reply.

How do we set the type from 's' to 't' while creating delivery? Where will I be able to change this. Your thoughts on this please.

Avatar

Level 4

Hi. You can not change the type of delivery. But you can change click formula used to generate the link.

The easiest way would be to do something like that. Try to replace:

type.substr(0, 1)

with

(type.substr(0, 1) == 'h' ? 'h' : 't')

BTW, you will still get pretty long and strange-looking tracking URL that might look suspicious for your customer. Some SMS providers actually provide you with their own way of tracking SMS links by automatically replacing them with some short URL. Check with your SMS provider if it supports something like that.