Edit in GitHubLog an issue

adobe.target.triggerView (viewName, options) - at.js 2.x

This function can be called whenever a new page is loaded or when a component on a page is re-rendered. adobe.target.triggerView() should be implemented for single page applications (SPAs) in order to use the Visual Experience Composer (VEC) to create A/B Tests and Experience Targeting (XT) activities. If adobe.target.triggerView() is not implemented on the site, the VEC cannot be utilized for SPA. For more information, see Single Page Application implementation.

ParameterTypeRequired?Description
viewNameStringYesPass in any name as a string type that you want to represent your view. This view name appears in the Modifications panel of the VEC for marketers to create actions and run their A/B and XT activities.
optionsObjectNo
options > pageBooleanNoTRUE: Default value of page is true. When page=true, notifications are sent to the Target backend for incrementing impression count.
A notification is always sent by default when a triggerView is called, except when options > page is set to false.
FALSE: When page=false, notifications are not sent for incrementing impression count. This should be used when you want to only re-render a component on a page with an offer.

Example: True#

triggerView() call to send a notification to the Target backend for incrementing activity impressions and other metrics.

Copied to your clipboard
adobe.target.triggerView("homeView")

Example: False#

triggerView() call to not have notifications sent to the Target backend for impression counting.

Copied to your clipboard
adobe.target.triggerView("homeView", {page: false})
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.