Access / Use targetPageParams() values in Target activity | Community
Skip to main content
ActiveMitchell
New Participant
June 22, 2022
Solved

Access / Use targetPageParams() values in Target activity

  • June 22, 2022
  • 3 replies
  • 2275 views

Hello - I have a Target beginner's question - I understand how to pass data values into a Target mbox using targetPageParams(), my question is how do I access the values from within my Target Activity to display the dynamic values back to the visitor or use these values otherwise within the activity.

 

This seems to be a rather basic item, but I can't seem to find any examples. Any suggestions are welcome: links to documentation/examples or terminology or search terms are appreciated.

 

Another important item, I'm loading Target via Tealium iQ tag management, not Launch.  I can view my custom targetPageParams values in the Adobe Debugger, but would love a code sample or link to same explaining how to work with these values from within my Activity.

 

Thanks

 

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 Tanvi_Agarwal_

Hi @activemitchell 

 

Once the parameters are passed in Target calls, they can used in below ways

 

1, You can create an audience using these parameters , for activity qualification or reporting audience.

This can be created from Create audience > 

 

2. These values can be used in experience offers, to be shown  to customers.

If the parameter name is 'favoriteColor' then you can fetch the value of this parameter in your code with ${mbox.favoriteColor}

Here is a document for reference > https://experienceleague.adobe.com/docs/target/using/experiences/offers/passing-profile-attributes-to-the-html-offer.html?lang=en#technical-advantages:~:text=%24%7Bmbox.favoriteColor%7D

 

 

3 replies

New Participant
May 10, 2024

In Tealium how are you using the targetPageParams()? I am using it in an extension but it is not being called.

New Participant
October 22, 2023

Accessing data passed through targetPageParams() in Target activities is crucial for personalization. To access these values, you typically use the Adobe Target JavaScript library. Here's a brief explanation:

In your Target activity, you can access the data passed through targetPageParams() using JavaScript. Let's say you've passed a parameter named "myParameter" into your activity. You can access it within your activity code like this:

// Access the value passed through targetPageParams
var myValue : targetPageParams.myParameter;

// Now you can use myValue for personalization or other purposes within your activity

Remember to include error handling in your code in case the parameter isn't defined to prevent unexpected issues.

Feel free to explore Adobe's Target documentation or consult Tealium's resources for further guidance on your specific setup.

 

 

Tanvi_Agarwal_
Tanvi_Agarwal_Accepted solution
Employee
June 22, 2022

Hi @activemitchell 

 

Once the parameters are passed in Target calls, they can used in below ways

 

1, You can create an audience using these parameters , for activity qualification or reporting audience.

This can be created from Create audience > 

 

2. These values can be used in experience offers, to be shown  to customers.

If the parameter name is 'favoriteColor' then you can fetch the value of this parameter in your code with ${mbox.favoriteColor}

Here is a document for reference > https://experienceleague.adobe.com/docs/target/using/experiences/offers/passing-profile-attributes-to-the-html-offer.html?lang=en#technical-advantages:~:text=%24%7Bmbox.favoriteColor%7D

 

 

ActiveMitchell
New Participant
June 30, 2022

Delayed reply, but Thank you @tanvi_agarwal_  - the info you provided was most helpful.  I was able to complete my proof of concept in very short order.