Testing the export
We recommend that you test an audience export before running it. Testing involves previewing the export for a single guest. A successful test indicates that the output structure is correctly configured.
A successful test doesn't guarantee that the export will be free of errors. That's because a test is based on a single guest, while the export is usually based on a large number of them.
For example, if a data extension value is available for the test guest but not for some other guests in the export, the test will succeed but the export might contain errors.
Selecting a guest for the test
In an audience export, you can select a random guest for the test by clicking Test > Test scenario on the audience export page or directly on the Define output screen. Then, in the search field, clicking Visitor or Customer.
Alternatively, you can select a guest from the exact segment you're using for the export by opening the segment and clicking Calculate audience. Calculating the audience will take some time. After the calculation is done, you can click View sample to see guest references for the guests included in the segment. You can copy a guest reference, and then, in the audience export, click Test > Test scenario > Guest reference, and paste it into the search field. Then, when you click Test, the test will run for this guest.
Test output
After the test finishes running, you can preview the exported data for the guest by clicking Test > Response > Output. The test output follows the output structure and file format you configured for the export.
If some data that you included in the output structure doesn't display in the test output, the data might not be available in the guest profile of the guest you chose for the test.
For example, maybe you added a string column in the output structure where the Header is email and the Attribute value is ${guest.email}. If the guest profile used in the test doesn't contain the email address, the email column will not be included in the test output.
If the output displays errors, there might be problems with:
-
The attribute values you entered in the output structure. See Errors in the test output.
-
The JavaScript you included in the audience export. See Test log and JavaScript in the export.
Test log
In the JavaScript of an audience export, you can use print()
to log messages to the test log.
After running the test, you can view the test log by clicking Test > Response > Logs.
We recommend that you use the test log when writing your JavaScript to make sure that the JavaScript computation is successful.