How to activate
CD API campaign development may require iterative code changes. To facilitate campaign developers Maxymiser provides:
- Browser address bar commands
- Browser console debugging interface
Please make sure you are an authorized user before trying these capabilities. You should be either logged in to Maxymiser UI, or added to Company IPs list.
URL parameters
Commands to the Maxymiser tag can be entered as URL parameters. All the supported out-of-the-box parameters can be set in the following format:
URL example:
Below are URL parameters available for the authorized users you may find useful:
?mmcore.un={utilities}
Enables a debugging tool on a site. The following values are applicable:
- debug – campaign code debugging tool
- qa – QA tool
These can be also stacked in one request as ?mmcore.un=debug,qa
Alternatively you can use browser's console to run the following command:
?mmcore.disabled=1
Disables Maxymiser for the current page view. Alternatively you can use browser's console:
?mmcore.cfgID=1
Switches to Sandbox configuration for the current page view without enabling the QA tool.
?mmcore.uat={custom attributes}
Passes the specified Custom Attributes' values to Maxymiser on a page. The value should be constructed in the following format and then encoded:
Just use the returned value as the URL parameter value: ?mmcore.uat=Name1%3DValue1%3BName2%3DValue2
Console commands
Whenever you enable the debugging tool, a new object mmsystem.debug becomes accessible via browser's console.
Below you can find the list of available methods and properties.
mmsystem.debug.getResponses() → {Array<Object>}
Returns an array of JSON responses from Maxymiser Content Generator that arrived to the current page.
Code example
mmsystem.debug.site() → {Object}
Returns an object where references to all site modules (available in the site scripts) are stored.
Code example
mmsystem.debug.campaign( campaignName ) → {Object}
Returns an object where references to all site modules (available in the campaign scripts) are stored.
Parameters
Name | Description | Type |
campaignName |
Name of the campaign you would like to retrieve modules of. Is a required argument, because every campaign has its own scope and data space. |
String |
Code example
What if more than one CD API version exists on a page?
If you have campaigns / scripts of different CD API versions (e.g., 1.5 and 2.1) on the same page, mmsystem.debug becomes extended with both versions as its branches: