All Collections
Setting up tracking and analytics
Custom Scripting: What is it, and what can you use it for?
Custom Scripting: What is it, and what can you use it for?

Custom Scripting allows you to inject third-party scripts into your Flipbook: from custom tracking, to pop-ups and everything in between.

Updated over a week ago

📖 This article explains:

What is Custom Scripting?

Custom Scripting is a feature that allows you to inject third party scripts into your Flipbook. Specifically, this feature allows you to add non-native scripts into the header and footer tags around your Flipbook.

What can you use Custom Scripting for?

The beauty of Custom Scripting is its versatility—it allows you to essentially inject any script into your Flipbook, allowing it to be loaded when a visitor views your Flipbook.

For example, you may already use an analytics tracking solution, other than integrations we offer for Adobe Analytics and Google Analytics, or you may have developed a completely custom solution, in house.

Alternatively, you might want to integrate the same third-party cookie banner experience on your Flipbook, as you do on your website. Or, how about implementing a chatbot that allows your visitors to chat to your customer service agents, directly from your Flipbook? Custom Scripting allows you to inject the scripts necessary for all of these things, into your Flipbook.

How to enable Custom Scripting on your account

Custom scripting is available on all iPaper accounts, but can only be accessed by account Administrators. If you’re unsure who your account administrator is, you can easily find out, using this method.

As an account Admin, you need to enable Custom Scripting before you can start injecting your custom scripts into your Flipbook. You can do this in a few easy steps:

  1. From the Flipbook overview view, right click on either the account, folder, or Flipbook level for which you wish to inject a custom script.

  2. Select Edit settings from the drop-down menu.

  3. Select the Modules tab.

  4. Select Custom Scripting from the vertical menu on the left.

  5. On the Custom Scripting view, select the toggle to enable it. Once enabled, the toggle will turn green.

Once you've clicked on Save changes, you’re ready to start injecting your custom scripts!

Using Custom Scripting with inherited settings

By utilizing the inherited settings feature, injecting a custom script on the account level means that your custom script will apply to any and all Flipbooks on your account.

If, for example, you want to apply a cookie banner on all your Flipbooks for a specific market, simply inject your script on the appropriate folder, and inherited settings will apply it to every Flipbook in the folder. The same applies for scripts for individual Flipbooks: inject them on the Flipbook level, and they’ll only apply to that specific Flipbook.

📕 Want to know more about how inherited settings work in iPaper? We've got a guide all about it:

Why two script fields?

💡 We have designed Custom Scripting as such to allow for the firing of multiple scripts, asynchronously.

For all intents and purposes, we recommend that scripts are inserted into the Scripts field, for a Flipbook, folder, or account.

If you have a special case where a certain subfolder, or specific Flipbook requires additional scripts, besides the global ones, we recommend that these are inserted in the Extra scripts field. This allows you to differentiate between scripts inserted globally, and those which are inserted on a specific folder, or Flipbook.

Additional considerations when using Custom Scripting

Custom Scripting is incredibly versatile in that you can inject almost any kind of third-party script into your Flipbook. When using it, however, there are a few things to be aware of:

As stated in the Custom Scripting pane in iPaper, custom scripts that interact, or alter the Document Object Model (DOM) are not recommended. These types of scripts can have unintended consequences on the performance of your Flipbook, and can lead to your Flipbook not loading or working properly.

As such, any scripts that interact with the DOM that are pasted into the header, or footer fields are done so at your own risk. iPaper cannot guarantee that any such script will work properly, or offer support for ensuring that they do.

Before writing, or attempting to inject any scripts that modify the DOM or iPaper variables, we encourage you to contact us, and we can advise you on alternative solutions.

💬 As always, if there's anything you're unsure about, or have questions about how you can use Custom Scripting, just reach out to us via the chat bubble in the corner.

Did this answer your question?