Skip to main content
gylesf73140248
Level 2
Oct 4, 2017 10:04 PM UTC
Solved

How to debug Profile Scripts

Hello!

How do you go about debugging profile scripts?

I assume a normal console.log doesn't work since its server side?

Thanks!

Gyles

ryanr7Accepted solution
Adobe Employee
Nov 21, 2017 1:27 AM UTC

Hi Gyles,

You are correct console.log isn't helpful because they run server side. There are two methods that I use to debug them.

1. Add them as response tokens. This is easy to do: target > setup > response tokens enable the profile you want to debug. Now any time you load a page for your site with Target on it part of the response from Target will contain your value for the given profile script.

2. The other option is to use the mboxTrace debugging tool. This requires the an authorization token found here: target > setup > implemenation > authorization. Then you add these 2 parameters to your page url after the "?" mboxTrace=window&authorization=YOURTOKEN.

This is a little more informative than the response token because you get a before executed snapshot and an after snapshot of your profile. It will also show all the profiles availalbe for your profile.

7 replies

YogitaBist
Level 3
Nov 2, 2017 9:11 AM UTC

I have same question.

Please do share if you were able to figure out.

Regards

Yogita

Translate
ryanr7Adobe EmployeeAccepted solution
Adobe Employee
Nov 21, 2017 1:27 AM UTC

Hi Gyles,

You are correct console.log isn't helpful because they run server side. There are two methods that I use to debug them.

1. Add them as response tokens. This is easy to do: target > setup > response tokens enable the profile you want to debug. Now any time you load a page for your site with Target on it part of the response from Target will contain your value for the given profile script.

2. The other option is to use the mboxTrace debugging tool. This requires the an authorization token found here: target > setup > implemenation > authorization. Then you add these 2 parameters to your page url after the "?" mboxTrace=window&authorization=YOURTOKEN.

This is a little more informative than the response token because you get a before executed snapshot and an after snapshot of your profile. It will also show all the profiles availalbe for your profile.

Translate
Michael_Soprano
Level 10
Mar 28, 2025 1:34 PM UTC

Do you know how to that using Web SDK? 😄

Translate
YogitaBist
Level 3
Nov 21, 2017 7:40 AM UTC

ryanr8​

This was very helpful .. Specially the second method ..

Thanks a lot for sharing it with us.

Translate
Level 2
Nov 27, 2017 1:29 PM UTC

Hi Yogita,

Hope you doing well!.

Are you writing profile scripts these days.

Regards

Harpreet Singh (ex-colleague)

Translate
YogitaBist
Level 3
Nov 28, 2017 11:27 AM UTC

Yes, is there anything specific you would like to enquire about?

Translate
Level 2
Nov 28, 2017 11:38 AM UTC

Nothing specific - So what all scenarios you have created profile scripts

Translate