targetPageParams not called | Community
Skip to main content
Level 3
November 30, 2022
Solved

targetPageParams not called

  • November 30, 2022
  • 1 reply
  • 894 views

Hello, a relative AEM newbie here.

 

I am trying to pass params with the following `targetPageParams` function to be called by AT.js. 

targetPageParamsAll = function() { let referrer = document.referrer console.log("called targetPageParams: referrer"); console.log(referrer); return { "mboxReferrer": referrer, "context.address.referringUrl": referrer }; };

 

I even have it defined in the two places below, before Target loads

  • Target > Implementation
  • Data Collection > Rules
    •  

When I load my site page, I was expecting the `console.log("called targetPageParams: referrer");`  to be called by AT.js, but nothing is logged, which makes me think that the function `targetPageParamsAll` is not being called. 

 

Some other source suggest to define it directly on top of the AT.js file. But I don't know how to find/edit that file.

 

Also, I don't know if this matters, but my Target debugger shows empty Network Request.

 

 

Thanks for your inputs, 

 

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

Hi Sean,

 

If your using Launch Tag Management implementation Method , then you dont need to put it in custom code , you can directly set the global params using action Type(Refer Below)

 

and select all params to all request. There you can select the key name and value(from data element also)

Further if it doesn't show in debugger, please share screenshot of the rule(including event selected)

 

1 reply

VinoAccepted solution
Level 4
November 30, 2022

Hi Sean,

 

If your using Launch Tag Management implementation Method , then you dont need to put it in custom code , you can directly set the global params using action Type(Refer Below)

 

and select all params to all request. There you can select the key name and value(from data element also)

Further if it doesn't show in debugger, please share screenshot of the rule(including event selected)