How to debug Profile Scripts

Accepted Solutions (1)

Accepted Solutions (1)

ryanr701

Employee

20-11-2017

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.

1353321_pastedImage_0.png

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.

1353322_pastedImage_1.png

Answers (5)

Answers (5)