Enable tracking for URL's passed as targetData | Community
Skip to main content
Level 2
February 6, 2018

Enable tracking for URL's passed as targetData

  • February 6, 2018
  • 1 reply
  • 8303 views

Hello,

When URL's are passed as targetData from the workflow to the content form they are not marked for personalization and no tracking information is added. Is there a way to ensure they are detected and the proper tracking information is appended?

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Amit_Kumar
Level 10
February 6, 2018

Hi,

use this documentation for your reference and follow the instruction given there then you will be able to track them.

How to track personalized links in emails

Feel free to reach out to us if you need more information.

Regards,

Amit

dboatAuthor
Level 2
February 6, 2018

Hi Amit,

I did read this documentation and at first it seemed like it would work however I am not understanding the implementation. The URL is passed from the workflow (e.g., targetData.myUrl has a value of 'https://www.mywebsite.com/') and can be unique per recipient however the detection of tracking links happens before the personalization process so these URL's are not appended with the respective tracking information.

I wanted to preprocess this targetData so that the tracking analysis would see these links, however the object isn't available in the @value instructions.

Amit_Kumar
Level 10
February 6, 2018

Hi,

what you are doing falls under dynamic vale, so you have two options:

Option 1:  Use <a href="http://<%=targetData.myURL%>"> myURLwill have value without the protocol part, but this is not recommended.

Option 2: Use <%@ value

This instruction gives access to parameters of the delivery that is constant for all recipients.

Syntax:

<%@ value object="myObject" xpath="@myField" index="1" %>

Where:

  • "object": name of the object (example: delivery, provider, and so on).
  • "XPath": XPath of the field.
  • "index" (optional): if "object" is an array (for extra script objects), item index in the array (Starts at 0).

The object can be:

  • "delivery": for the current delivery (see details and restrictions in the subsection below).
  • "provider": for the current delivery provider/routing (nms:externalAccount).
  • An additional script object: if an object is loaded in the context through: Properties > Personalization > Add objects in the execution context.
  • Item of the foreach loop: see Foreach section below.

"delivery" object: For email personalization, the delivery object is accessible in two ways:

  • In JavaScript. For example: <%= delivery.myField %>. In the JavaScript object delivery custom fields are not supported. They work in the preview, but not in the MTA because the MTA can only access the out-of-the-box delivery schema.
  • Through <%@ value object="delivery" pre-processing

For the <%@ value object="delivery" xpath="@myCustomField" %> instruction, there is another limitation for deliveries sent via mid-sourcing. The custom field @myCustomField must be added to the nms:delivery schema on both marketing and mid-sourcing platforms.

Note: for delivery parameters/variables, use the following syntax (using the delivery object):

<%@ value object="delivery" xpath="variables/var[@name='myVar']/@stringValue" %>

did you try these options?

Regards,

Amit