Pass mbox params after each view change for Adobe Target SPA | Community
Skip to main content
Level 2
February 28, 2024
Solved

Pass mbox params after each view change for Adobe Target SPA

  • February 28, 2024
  • 1 reply
  • 2186 views

Hello community, 

 

I have a client that have a site built on Next.js. It has tealium IQ as the tag manager and a datalayer already setup with page variables that are updated on each view change without a full page reload.

 

Recently, they want to add Adobe Target to the web. I am struggling on how to add mbox parameters every time the view (page) changes as there is no page reload and the adobe.target.triggerView() function only accepts the viewName as arguments and no params can be added to the function. 

 

I have seen on other React like websites that with every "notifications" request (each time the triggerView is executed) the mbox params like page_category or profile params are updated without a full page reload or a target-global-mbox call. 

 

How can I achieve here the same behaviour?

 

Thanks a lot!

 

 

Best answer by Rajneesh_Gautam_

hi @danielma21  - if you are using TiQ then the recommended approach will be to use its view() method after every view change, passing all the data-layer. You need not add AT.js on the page. Rather enable the Adobe Target tag in TiQ and map all required parameters under tag-configuration. You may find more information here: https://docs.tealium.com/client-side-tags/adobe-test-target-tag/ 

 

 

1 reply

Rajneesh_Gautam_
Community Advisor
Rajneesh_Gautam_Community AdvisorAccepted solution
Community Advisor
February 28, 2024

hi @danielma21  - if you are using TiQ then the recommended approach will be to use its view() method after every view change, passing all the data-layer. You need not add AT.js on the page. Rather enable the Adobe Target tag in TiQ and map all required parameters under tag-configuration. You may find more information here: https://docs.tealium.com/client-side-tags/adobe-test-target-tag/ 

 

 

Level 2
February 28, 2024

Hello Rajneesh, 

 

Thank you very much on the response. Can you expand more on some aspects?

 

Specifically, 

 

1) I do not understant "you need not add AT.js on the page". Why I don´t need at.s on page?

 

2) "view() method after every view change, passing all the data-layer. " I do not need to call triggerView() from adobe target? why?

 

Thank you so much!

Level 2
February 28, 2024

Hi @danielma21  - purpose of any Tag management system is to centralise all the client-side tags for efficiently controlling where data should be passed and how. By passing data to TiQ's view() method, you are ensuring that all destination systems such as Adobe Target, Adobe Analytics and more, have access to to same data-layer.

 

If you add AT.js to the pages, then you will have to manage tags at 2 places - some in TiQ and Adobe Target in the website which is not best practice and also makes Adobe Target tag dependent of app-releases. For instance, if you need to upgrade to newer version of AT.js - you will have to update the website code and therefore will have to wait for the next release cycle.

 

To answer your second question, if you are using TiQ view() method then you do not need triggerView(). 

 

Regards

Rajneesh


Thanks Rajneesh,

 

So assuming I do the implementation with tealium view method. When building experiences on the VEC the composer will not recognize views (as they are not implemented) and I´ll be able to build and create the segmenting rules for the experience as normal? like it is not an SPA.