Property token of the page is not identified by Target VEC

This article addresses an issue where VEC is not able to recognize the property token of the page correctly and displays a warning message No property token found on this page while creating the activity in Adobe Target.

The resolution involves creating a Launch custom code action that defines the window.targetPageParams function with at_property before loading the Target library or firing a global mbox request.

Description description

Environment

Adobe Target

Issue/Symptoms

VEC is not able to recognize the property token of the page correctly.

VEC displays a warning message No property token found on this page  while creating the activity.

Let’s first see how at_property is used during Authoring and Delivery.

Authoring

When you load a page/SPA in VEC, VEC scans the page to find the window.targetPageParams function, if it finds this function, it will execute it and try to extract the at_property value, and based on this value, determine the workspace for this property. If VEC can’t find this function or this function is missing, then VEC will default to the default workspace.

Delivery

During delivery Target edge doesn’t consider where the at_property value is coming from. As long as the property value is passed in the request, it will work correctly.

How does it work in Launch?

Having these two modes of operation outlined, it’s necessary to explain what happens in Launch.

In Launch, you can add parameters to Launch actions in any way that you want, hence usually at_property is passed as a parameter to Fire global mbox request.

This works great for delivery, however, when loading the site in VEC, since there is no window.targetPageParams, VEC is not able to pick up the correct workspace.

Resolution resolution

Workaround Steps:

  1. Create a Launch custom code action that would define the window.targetPageParams function with at_property.

    window.targetPageParams = function() {return {"at_property" : "%atproperty%"}; }
  2. Also make sure that this action is executed right before loading the Target library or firing a global mbox request.
  3. An alternative would be to adjust VEC so that there is native integration between VEC and Adobe Launch, but this would require proper scoping, and it will take more time to implement.

The above steps should ensure that VEC recognizes the property correctly while creating the activity.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f