Using the viewer API, it is possible to define any given embedded publication page as a "custom channel" to be used in conjunction with our Preferred Viewers. Simply add the following line to your embedded viewer script:
Rather than "channel_name_here", choose a channel name to be used in the Publicator later. When placed in the script, it should be somewhere after the viewer is created, but before the viewer is shown, like so:
Once that's done, you will need to create a corresponding entry in the Preferred Viewer settings for your publication:
1) Log into the Zmags Publicator and click "All Publications" on the left.
2) Find your publication in the list and click on its name.
3) Click on the "Preferred Viewers" tab at the top.
4) Click "Add a Context".
5) Type a name, choose a device and 'Custom' for the channel.
6) For "Custom Channel" type the channel name you selected earlier.
7) Choose a viewer to be loaded in this context.
8) Click 'Save'.
Your selected viewer will then be loaded for visitors to any pages in which your custom channel is specified by the API code.
Please sign in to leave a comment.