Property token of the page is not identified by Target VEC

In this article you will learn why Target VEC is not able to recognize 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.

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 A uthoring and D elivery?

Authoring:When a customer loads his 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, customers can add parameters to Launch actions in any way that they 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 One way to get around this issue and make sure that VEC works as expected, is to ask customers to create a Launch custom code action that would define the window.targetPageParams function with at_property.

**The customer would have to make sure that this action is executed right before loading the Target library or firing a global mbox request.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.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%"}; }
  1. Also make sure that this action is executed right before loading the Target library or firing a global mbox request.The above steps should ensure that VEC recognizes the property correctly while creating the activity. **
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f