There are two ways to add scripts to a Zipify Pages page through the ZP app
- Global scripts - these are active across ALL pages created with ZP.
- Local scripts - these are specific to a single page.
Accessible through the Settings -> Global Scripts section, this allows you to add scripts which will work for ALL ZP pages where you choose to use Global Scripts.
In order to add a Global Script:
- Give it a title (used internally, so you can easily navigate through scripts) in the "Script Title" field.
- Paste the script's code in the "Paste Code With <Script></Script> Tags" field.
- Choose if the script should be added to your page's Header section (before the closing </head> tag) or to the page's Footer section (after the main content of the <body> section).
Not sure where to place your script? Contact the company or service that provided the script for directions on where it should go.
- Please note: Newly-added global scripts will be automatically added into all pages including published ones.
- If you'd like to disable this feature for the script you're adding, un-check the "Add this script into all published pages which are configured to use Global Scripts" checkbox before choosing the "+ Add Script to Header" or "+ Add Script to Footer" option. You can always update a published page to include a new script at any time.
Local page scripts
In order to add specific script(s) to a particular page, you can do this through the Manage Scripts section of the Page Constructor when editing the page.
Click the "</> Scripts" button to open up the Manage Scripts popup window.
The Manage Scripts popup window allows you to choose one of the following options (separately for Header and Footer section):
- Use global scripts only: This option will only use the Global scripts which have been added. The Global scripts will appear for you to select which ones you want to have used.
- Use local scripts only: This option will open up the script addition form (similar to the Global scripts form in the Settings > Global Scripts section of the app) where you can add Local scripts to the page.
- Use both global and local scripts: This will show a list of both Global and Local scripts which allows you to check the ones you want to use for the page.
- Use no scripts for this section: No scripts added through Zipify Pages will be used for the page. Note: If the "Use no scripts for this section" option is chosen, the scripts for the native integrations for the Facebook Pixel ID and Google Analytics will still be used.
The default option selected is to "Use global scripts only". If you want to add local script(s), choose either the "Header Section" or "Footer Section" tab to choose where you want the scripts added to the page.
Once the "+ Add" button is clicked, it will add the script to the list of Local scripts. From there, you can view the script's code (by hovering over the script's title) or delete the script (by clicking the trashcan icon).
Click the "Save" button to save your script settings and close the Manage Scripts popup window.
Note: In order to apply changes made within the Manage Scripts popup window to the actual page, you need to update the page by clicking on the "Update" button in the Page Constructor's navigation bar:
We recommend to use scripts carefully and to follow the script provider's instructions.
Adding custom Facebook Pixel Events to your ZP pages
You should add the Base pixel code to the Header of the page and the Event code to the Footer.
For example, to have the "Lead" event fire, you would add the FB Pixel base code to the scripts Header section and the code with the Lead event to the scripts Footer section.
Here is a short video example: https://www.screencast.com/t/qx5vPsAaZnMX