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
When testing 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 specific segment used in the audience export by opening the segment. To do this, on the Build screen, in the Audience section, click the segment name. View the segment's usage and details, and from the Usage section, copy a guest reference. Then, return to the audience export and click Test > Test scenario > Guest reference, and paste the copied reference into the search field.
For both methods, clicking Test will run the test for the specified 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 console.log() 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.