Skip to main content

Integrate with sandbox

With a sandbox integration, you can pass a configuration flag to test against a sandbox environment. The sandbox environment follows a normal offers, bidding, and matching process against your production configuration. While a sandbox environment is part of the Rokt production environment, it does not charge advertisers or generate revenue. As a result, you can use it for acceptance testing before deploying to production.

The integration follows exactly the same steps as in previous examples, with an additional sandbox attribute required to be passed to the execute function.

Warning

You must remove the sandbox attribute before going live with your placement.

Overlay placement example

To run an overlay placement in the sandbox environment, the list of attributes passed to Rokt needs to be updated to include "sandbox": "true".


RoktSDK.execute(
"RoktExperience",
{
"email" : "j.smith@example.com",
"sandbox": "true",
"firstname": "Ginger",
"lastname": "Smith",
"mobile": "(555)867-5309",
"postcode": "90210",
"country": "US"
},
function(msg) {
console.log(msg);

// msg can be any of these
// 1. onLoad - your placement loads
// 2. onUnload - your placement unloads
// 3. onShouldHideLoadingIndicator - hook to show a loading indicator
// 4. onShouldShowLoadingIndicator - hook to hide a loading indicator
},
function(err) {
console.log(err);
}
);
Was this article helpful?